Skip to content

Retarget to .NET 5.0 - #1684

Merged
RussKie merged 1 commit into
dotnet:masterfrom
RussKie:retarget-5.0
Sep 4, 2019
Merged

RussKie merged 1 commit into
dotnet:masterfrom
RussKie:retarget-5.0

Conversation

@RussKie

@RussKie RussKie commented Aug 23, 2019 •

Copy link
Copy Markdown
Contributor

Proposed changes

  1. Update dependencies with darc tool: darc update-dependencies --channel ".NET Core 5 Dev"

  2. Manually update references to netcoreapp5

  3. Delete all the hard-coded assembly versions and just rely on the product version since the version is higher than the NET Fx

  4. Update serialization tests due to assembly version change.
    Test serialisation only one way .NET Fx -> .NET, as well as .NET -> .NET.
    Serialisation .NET -> .NET Fx will need to be added later, if it is deemed necessary.

Test methodology

  • manually build
    image
Microsoft Reviewers: Open in CodeFlow

@RussKie
RussKie requested a review from a team as a code owner August 23, 2019 17:44
@RussKie RussKie self-assigned this Aug 23, 2019
@RussKie

This comment has been minimized.

@RussKie RussKie added the enhancement Product code improvement that does NOT require public API changes/additions label Aug 23, 2019
@RussKie RussKie added this to the 5.0 milestone Aug 23, 2019
@RussKie

This comment has been minimized.

@AdamYoblick

Copy link
Copy Markdown
Contributor

Looks good to me, but Eric and Will would know much better. I've never moved us up to a new major version sdk before :)

@ericstj

ericstj commented Aug 23, 2019

Copy link
Copy Markdown
Member

@ericstj

ericstj commented Aug 23, 2019

Copy link
Copy Markdown
Member

Could be related to dotnet/coreclr@4e960d7 /cc @jkoritzinsky

@jkoritzinsky

Copy link
Copy Markdown
Member

There's a typo in that PR that I missed since it's only on the ildasm side. 😢

I'll put out a PR to coreclr to fix it and ping back here once the fix is in.

jkoritzinsky added a commit to dotnet/coreclr that referenced this pull request Aug 23, 2019
When I cleaned up the Microsoft.NET.SDK.IL implementation, I missed one typo. This causes the SDK to fail to resolve ILDasm as discovered in dotnet/winforms#1684.
jkoritzinsky added a commit to dotnet/coreclr that referenced this pull request Aug 23, 2019
When I cleaned up the Microsoft.NET.SDK.IL implementation, I missed one typo. This causes the SDK to fail to resolve ILDasm as discovered in dotnet/winforms#1684.
@wtgodbe

wtgodbe commented Aug 26, 2019

Copy link
Copy Markdown
Member

Changes look reasonable, but I suggest adding a property for the default TFM so you don't have to hardcode netcoreapp5.0 in every .csproj

@zsd4yr

zsd4yr commented Aug 26, 2019

Copy link
Copy Markdown
Contributor

Changes look reasonable, but I suggest adding a property for the default TFM so you don't have to hardcode netcoreapp5.0 in every .csproj

perhaps move these out to Directory.Build.Props / Targets ?

jkoritzinsky added a commit to dotnet/coreclr that referenced this pull request Aug 26, 2019
When I cleaned up the Microsoft.NET.SDK.IL implementation, I missed one typo. This causes the SDK to fail to resolve ILDasm as discovered in dotnet/winforms#1684.
@RussKie

RussKie commented Aug 28, 2019

Copy link
Copy Markdown
Contributor Author

@wtgodbe - thank you; updated, please have a look

@wtgodbe wtgodbe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, other than the 1 question

@zsd4yr zsd4yr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The future is now

@ericstj

ericstj commented Aug 28, 2019

Copy link
Copy Markdown
Member

Do you want to delete all the hardcoded assembly versions now that you can just rely on the product version and be higher than desktop?
https://github.com/dotnet/winforms/search?q=AssemblyVersion&unscoped_q=AssemblyVersion
(similarly in 3.1 you might want to manually increment all these).

@RussKie

RussKie commented Aug 29, 2019

Copy link
Copy Markdown
Contributor Author

Do you want to delete all the hardcoded assembly versions now that you can just rely on the product version and be higher than desktop?

Thank you

similarly in 3.1 you might want to manually increment all these

You've lost me here, increment to what?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the failure is attributed to the fact the assembly version is changed:

Version
3.0 image
5.0 image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does 42.42.42.42 come from though? I couldn't find it in the codebase

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That’s the default version that Arcade uses if you don’t explicitly tell it to use shipping versions in non-CI builds.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Jeremy.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bug actually. To correctly round-trip with .NET Framework you need TypeForwardedFrom attribute with desktop identity. Otherwise a version update to core breaks back-compat

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had an offline chat with Eric and I'm going to fix our serialisation tests to flow NET Fx --> NET5 for now.
@merriemcgaw @Tanya-Solyanik we need to decide how important NET5 --> NET Fx serialisation compat

@RussKie RussKie changed the title Retarget to .NET 5.0 WIP: Retarget to .NET 5.0 Aug 29, 2019
@ericstj

ericstj commented Aug 29, 2019

Copy link
Copy Markdown
Member

similarly in 3.1 you might want to manually increment all these

You've lost me here, increment to what?

In 3.1 you probably want a different assembly version for your assemblies. In CoreFx we followed the pattern of incrementing 3rd portion by default on a new release (reserving 4th part for servicing), we'd increment the second/minor version if API changed. Essentially doing our best to follow SemVer by communicating bugfixes in 3rd portion API/features in 2nd portion. This is really up to you to decide. After 3.x it's much easier since you can just rely on product versioning.

You may encounter some issues with the version bump since it will be the first time the .NETCore assembly versions differ from desktop for WinForms, but I think this is something you need to do to see what breaks. Best to do it before all the design-time work is "done".

@RussKie

This comment has been minimized.

Comment thread Directory.Build.props Resolved
@zsd4yr

This comment has been minimized.

@ericstj

This comment has been minimized.

@RussKie

This comment has been minimized.

1. Update dependencies with darc tool:
    `darc update-dependencies --channel ".NET Core 5 Dev"`

2. Centralise and update references to `netcoreapp5`

3.  Delete all the hard-coded assembly versions and just rely on
the product version since the version is higher than the NET Fx

4. Update serialization tests due to assembly version change.
Test serialisation only one way .NET Fx -> .NET, as well as .NET -> .NET
Serialisation .NET -> .NET Fx will need to be added later, if it is deemed
necessary.
@RussKie RussKie changed the title WIP: Retarget to .NET 5.0 Retarget to .NET 5.0 Sep 4, 2019
@dotnet dotnet deleted a comment from codecov Bot Sep 4, 2019
@codecov

codecov Bot commented Sep 4, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #1684 into master will increase coverage by 0.00635%.
The diff coverage is n/a.

@@                Coverage Diff                 @@
##              master      #1684         +/-   ##
==================================================
+ Coverage   25.93825%   25.9446%   +0.00635%     
==================================================
  Files            807        807                 
  Lines         267786     267786                 
  Branches       37960      37960                 
==================================================
+ Hits           69459      69476         +17     
+ Misses        193398     193382         -16     
+ Partials        4929       4928          -1
Flag Coverage Δ
#Debug 25.9446% <ø> (+0.00635%) ⬆️
#production 25.9446% <ø> (+0.00635%) ⬆️
#test 100% <ø> (ø) ⬆️

@RussKie
RussKie merged commit 0fcea83 into dotnet:master Sep 4, 2019
@RussKie
RussKie deleted the retarget-5.0 branch September 4, 2019 15:41
@ghost ghost locked as resolved and limited conversation to collaborators Feb 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement Product code improvement that does NOT require public API changes/additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants