Skip to content

Is .NET Standard being retired with .NET Core 3.0? #29670

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

Closed
shaulbehr opened this issue May 27, 2019 · 7 comments
Closed

Is .NET Standard being retired with .NET Core 3.0? #29670

shaulbehr opened this issue May 27, 2019 · 7 comments

Comments

@shaulbehr
Copy link

I'm attempting to upgrade my project to .NET Core 3.0 preview. I've installed the SDK, and updated all my .NET Core projects to netcoreapp3.0.
I figured that I should do the same for my .NET Standard projects, and update those to the latest version, i.e. netstandard2.1. But now when I try to compile my .NET Core projects, I get a compiler error:

MyNetCoreApp.csproj: [NU1201] Project MyNetStandardLib is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Project MyNetStandardLib supports: netstandard2.1 (.NETStandard,Version=v2.1)

I searched for this issue and couldn't find anyone else reporting it, but I did find some other projects on GitHub where for .NET Core 3.0 they're moving their .NET Standard projects to .NET Core 3.0, e.g. here and the pull request referenced here.

Does this mean that .NET Standard is being deprecated, and all projects in future will be .NET Core?

@sliepie
Copy link

sliepie commented May 27, 2019

.NET Standard is not deprecated and as long as you don't need API's from .netcore3.0 or .netstandard2.1, you should target .netstandard2.0. The projects you are referencing are ASP.Net projects and ASP.Net 3.0 only works on .net core 3.0. Asp.net 2.x was targetting .netstandard 2.0 because it supported .net core and .net full framework.

@Wraith2
Copy link
Contributor

Wraith2 commented May 27, 2019

Does this mean that .NET Standard is being deprecated, and all projects in future will be .NET Core?

No. At least that isn't the plan currently. Corefx in 3.0 will support netstandard 2.1. Desktop framework (netfx) will only support netstandard 2.0 and the plan is to not implement ay later netstandard versions on desktop. After core 3.0 it will be rebranded as 5.0 and a lot of work will be done to integrate multiple framework and runtime implementations into a more coherent ecosystem.

for the 3.0 release timeframe you will still end up with mono and corefx separately supporting netstandard 2.1 as far as I know.

@davidfowl
Copy link
Member

@shaulbehr What version of visual studio are you using?

@karelz
Copy link
Member

karelz commented May 29, 2019

The error above should not happen netcoreapp3.0 does support netstandard2.1. Please use latest preview and latest Visual Studio.
cc @wtgodbe @ericstj

@ericstj
Copy link
Member

ericstj commented May 29, 2019

Correct, this should work when using VS 2019 with a recent .NET SDK. If you're still seeing issues, please reactivate this and share your dotnet --info output.

@ericstj ericstj closed this as completed May 29, 2019
@Gladskih
Copy link

Gladskih commented Jan 16, 2020

My solution contains .Net Standard 2.0 library project (with nuget packing configured) and two test projects on .Net Framework 4.7.2 and on .Net Core 3.1. Test projects reference the library project. It's ok in local build and test run. But I get Error in Asure (corporate infrastructure) Pipeline on nuget restore:

...
Checking compatibility for MyClient with .NETCoreApp,Version=v3.1.
Project MyClient is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1). Project MyClient supports: netstandard2.0 (.NETStandard,Version=v2.0)
...

The same with .Net Core 3.0 as target of test project. It works only if I remove Core test project from solution.
So do I need install some specific Build Agent or nuget version except installing corresponding Core SDK?

dotnet --info on build server reports:

.NET Core SDK (reflecting any global.json):
Version: 3.1.101
Commit: b377529961

Runtime Environment:
OS Name: Windows
OS Version: 6.3.9600
OS Platform: Windows
RID: win81-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.101\

Host (useful for support):
Version: 3.1.1
Commit: a1388f194c

.NET Core SDKs installed:
2.0.0 [C:\Program Files\dotnet\sdk]
2.0.3 [C:\Program Files\dotnet\sdk]
2.1.4 [C:\Program Files\dotnet\sdk]
2.1.300 [C:\Program Files\dotnet\sdk]
2.2.103 [C:\Program Files\dotnet\sdk]
2.2.104 [C:\Program Files\dotnet\sdk]
3.0.100 [C:\Program Files\dotnet\sdk]
3.1.101 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

@ericstj
Copy link
Member

ericstj commented Jan 16, 2020

@Gladskih you should open a new issue. If you're having an issue during restore, the correct location for the issue is https://github.com/nuget/home. My best guess is that your corporate build infrastructure is using a very old nuget.exe to restore the project. Make sure you're using dotnet.exe to restore the project. If that doesn't help, open the new issue in nuget repo and attach the msbuild.binlog you get when running dotnet restore /bl on the project.

@msftgits msftgits transferred this issue from dotnet/corefx Feb 1, 2020
@msftgits msftgits added this to the 3.0 milestone Feb 1, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants