Using net core 2.0 on a MacBook with VSCode, create the helloworld app.
1) dotnet new console -o hwapp
2) Now do the Getting started with .NET Core on macOS
dotnet new sln
dotnet new classlib -o library
1)
2)
1)
2)
Since I'm new with VSCode on the Mac vs Visual Studio on Windows, this might just be a lack of knowledge on my part. Is netstandard2.0 the same as netcoreapp2.0 or did the CLI mess up?
dotnet --info output:
In a nutshell, netcoreapp2.0 is for apps (like a console application) while netstandard2.0 is for libraries, which can then be consumed by other libraries or platforms, for instance, netcoreapp2.0 or net461.
Is netstandard2.0 the same as netcoreapp2.0
No, it's not the same. netcoreapp2.0 is the framework name for .NET Core 2.0 while netstandard2.0 is the framework name for .NET Standard 2.0. You can create class libraries that target .NET Core 2.0 instead of .NET Standard 2.0, however, this means that these libraries can only be consumed from .NET Core 2.0. By targeting .NET Standard 2.0 these libraries can be used from any .NET implementation (e.g. .NET Framework, .NET Core, Unity, Xamarin, Mono). Since that is much better, the CLI defaults you to netstandard2.0. So why would ever want to target .NET Core? Only if you need access to APIs that aren't standardized yet.
Does this help?
Yes. This is great! Really appreciate it.
Lot’s to learn moving from the Windows world back to Unix and the open source world. Still deciding .Net Core leveraging years of C# vs Node with Typescript.
Thanks again.
Jim
From: Immo Landwerth [mailto:[email protected]]
Sent: Tuesday, August 1, 2017 6:50 PM
To: dotnet/cli cli@noreply.github.com
Cc: jimrand1 jimrand@ix.netcom.com; Author author@noreply.github.com
Subject: Re: [dotnet/cli] TargetFramework inconsistent - netcoreapp2.0 vs netstandard2.0 (#7335)
Is netstandard2.0 the same as netcoreapp2.0
No, it's not the same. netcoreapp2.0 is the framework name for .NET Core 2.0 while netstandard2.0 is the framework name for .NET Standard 2.0. You can create class libraries that target .NET Core 2.0 instead of .NET Standard 2.0, however, this means that these libraries can only be consumed from .NET Core 2.0. By targeting .NET Standard 2.0 these libraries can be used from any .NET implementation (e.g. .NET Framework, .NET Core, Unity, Xamarin, Mono). Since that is much better, the CLI defaults you to netstandard2.0.
Does this help?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/dotnet/cli/issues/7335#issuecomment-319518926 , or mute the thread https://github.com/notifications/unsubscribe-auth/AYSWUqG2VUJMAMcuHQrbDD7fCfYS6g7Jks5sT6uMgaJpZM4OqUSn .
Most helpful comment
No, it's not the same.
netcoreapp2.0is the framework name for .NET Core 2.0 whilenetstandard2.0is the framework name for .NET Standard 2.0. You can create class libraries that target .NET Core 2.0 instead of .NET Standard 2.0, however, this means that these libraries can only be consumed from .NET Core 2.0. By targeting .NET Standard 2.0 these libraries can be used from any .NET implementation (e.g. .NET Framework, .NET Core, Unity, Xamarin, Mono). Since that is much better, the CLI defaults you tonetstandard2.0. So why would ever want to target .NET Core? Only if you need access to APIs that aren't standardized yet.Does this help?