Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TFM from .netcoreapp5.0 -> .net5.0 #223

Closed
AdamBraden opened this issue Apr 27, 2020 · 4 comments · Fixed by #234
Closed

Update TFM from .netcoreapp5.0 -> .net5.0 #223

AdamBraden opened this issue Apr 27, 2020 · 4 comments · Fixed by #234
Assignees
Labels
fixed Issue has been fixed in an upcoming or existing release

Comments

@AdamBraden
Copy link
Contributor

Need to move to the updated TFM for .net5.0

@Scottj1s
Copy link
Member

@AdamBraden, is this safe now? For what version(s) of .NET 5 SDK and Visual Studio?

@azchohfi
Copy link
Contributor

It should be safe:
https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-5-preview-3/

Change the TFM in your *.csproj file from netcoreapp5.0 to net5.0

@Scottj1s
Copy link
Member

Scottj1s commented Apr 29, 2020

Turns out it's not safe, quite yet.

Latest public nuget.exe, v.5.5.1, results in 5 build breaks like this:
error : Project '..\WinUIProjection\WinUIProjection.csproj' targets 'net5.0'. It cannot be referenced by a project that targets '.NETCoreApp,Version=v5.0'. [C:\git\cswinrt2\WinUI\WinUITest\WinUITest.csproj]

The latest pre-release nuget.exe, v5.6.0-preview2, reduces that number of breaks to 2.

Per .NET team, using 'msbuild /t:restore' from VS 16.6 p2 or later is required. But that doesn't work for packages.config-based vcxproj. The workaround is to split out restores based on project type: msbuild for csproj, and nuget for vcxproj.

In VS, the nuget console reports these versions:
VS 16.5.4: 5.5.0.6473
VS 16.6 p4: 5.6.0.6558
So it may be necessary for a nuget.exe v5.6.0.6558 or better to work for command-line builds.

Until VS 16.6 is deployed to hosted build agents, or the nuget client supports net5.0 TFM, in a holding pattern.

Update: turns out nuget v5.6 is necessary but not sufficient. The build breaks reference VS 16.6 targets files.

@Scottj1s
Copy link
Member

VS 16.6 rollout on Azure Devops has been very nearly complete (~99%) for several days. I'll go ahead and complete the PR now so dependents can start to move forward.

@angelazhangmsft angelazhangmsft added the fixed Issue has been fixed in an upcoming or existing release label May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed Issue has been fixed in an upcoming or existing release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants