-
Notifications
You must be signed in to change notification settings - Fork 6k
C# 7.0 vs 7.1 #5366
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
Comments
Hi @JD-Sp, right now the tutorial is only focused on Visual Studio. So if we make the tutorial cross-plat, we should call out the right prerequisites. I assigned this issue to the author. |
@JD-Sp Thanks for pointing this out. It will run on .NET Core 2 from the command line (that has C# 7.1 installed.) |
@mairaw if I create .NET Core console app in Visual Studio (15.7) on Windows, the default C# version is 7.0 (I also have .NET Core 2 installed) Samples code has the language version specified explicitly, which is not default. So, it would be nice to specify in console app creation section that C# language version should be updated to C#7.1 at least. |
@pkulikov Same. I created a version using the CLI tools, and it defaulted to 7. I did just go into and manually target 7.1 in the .csproj file, and it works running from the command line. There were a few tweaks to the code to make it cross platform, but all in all i got a good result. |
I also noticed that our sample is set to netcoreapp2.1 which won't work with VS 15.6 AFAIK, which is the prereq version that we define on the topics. Should we bump up the VS version prereq or change TargetFramework of our sample in dotnet/samples to 2.0? |
The target framework should change to 2.0. (I built it on my machine where I was doing some preview work at the same time.) |
Thanks @BillWagner. I'll make the change then. |
Maybe I'm just inexperienced, but it should probably be noted that you have to be running C# 7.1 for this in the pre-requisites.
I'm running 7, on VS for Mac 7.5, and it gave me a compiler warning about having an asynchronous Main method. Makes sense, but was surprised when I saw the compiler error.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: