Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Relationship between C# 8.0, NET Core 3.0 and Visual Studio

The article Building C# 8.0 states

The current plan is that C# 8.0 will ship at the same time as .NET Core 3.0. However, the features will start to come alive with the previews of Visual Studio 2019 that we are working on.

What is the relationship between C# 8.0, NET Core 3.0 and Visual Studio?

As a followup, I'm also confused as to what a new language version actually is in terms of physical deployment. Is it new assemblies deployed as part of a new visual studio deploy, or part of a net core sdk install or something else? Does C# 8 need to be added to both full framework and .NET Core?

like image 340
kimsagro Avatar asked Feb 19 '19 13:02

kimsagro


People also ask

What's the relationship between C and C++?

C++ is derived from the C language. Strictly speaking, it is a superset of C: Almost every correct statement in C is also a correct statement in C++, although the reverse is not true. The most important elements added to C to create C++ concern classes, objects, and object oriented programming.

What is the relation between FC and K?

Kelvin, Celsius and Fahrenheit scale Relation between Kelvin, Celsius and Fahrenheit scale is F – 32 C K – 273 180 100 100 Where C= temperature in Celsius scale.

Is C similar to C+?

C++ is a superset of C, so both languages have similar syntax, code structure, and compilation. Almost all of C's keywords and operators are used in C++ and do the same thing. C and C++ both use the top-down execution flow and allow procedural and functional programming.


1 Answers

Update after release of .NET Core 3

Some features added in C# 8.0 require .NET Core 3.0, so these have a tighter relationship than C#/.NET had before. The pair can be acquired as a workload through VS, but keep in mind C# 8.0 and .NET Core 3.0 don't require VS; you can use these in other IDEs.

The C# language versioning document describes the language/.NET relationships in more detail.

For some pragmatic details, you can read how to target C# 8.0 in Visual Studio.

Old Answer

Take a look at An update to C# versions and C# tooling, which provides a good insight about the language as it relates to projects in Visual Studio.

In particular,

The default language version chosen in this scenario is Preview. The C# 8.0 features you have access to are based entirely on the version of the compiler (and thus the .NET SDK) that you are using. As you use future previews, you may get more (or slightly tweaked) features. When you build a project, the .NET SDK will emit a warning that this is all still in preview.

In answer to

What is the relationship between C# 8.0, NET Core 3.0 and Visual Studio?

The relationship between language, SDK, and Visual Studio version are much looser than they used to be. The language can evolve independent of .NET in any of its incarnations. That doesn't mean that will always be true. Visual Studio too is independent of language and framework. If you take a look at the Visual Studio Installer, you will see that language and .NET support are "workloads" that can be installed. The SDK exposes the language features and VS offers the tooling.

If you're going with VS 2017 for now, take a look at

  • SO Q&A on .NET Core 3.0 and VS 2017
  • This article on C# 8.0 in VS 2017

As a followup, I'm also confused as to what a new language version actually is in terms of physical deployment

It's the SDK that contains the compiler that can create the assemblies from C# 8.0 source.

Is it new assemblies deployed as part of a new visual studio deploy, or part of a net core sdk install or something else?

Part of the SDK, see above. This means nothing is "deployed" in addition to your code. Your code, whatever the version, targets a version of .NET. That said, the targeted version of .NET must exist on the machine or container.

Does C# 8 need to be added to both full framework and .NET Core?

It doesn't "need to be added". The newer versions of this framework (4.8) and SDK (.NET Core 3.0) come with C# 8.0 support.

like image 172
Kit Avatar answered Sep 29 '22 00:09

Kit