-
March 12th, 2020, 04:59 AM
#1
How do I upgrade to C# 8?
I figured you just download the latest VS and that's it, you've got the latest version of C#, but today I got an error when trying to set a property to readonly, saying "Feature 'readonly members' is not availble in C# 7.3. Please use language version 8.0 or greater."
So it seems I'm using version 7.3, how do I upgrade?
Thanks
-
March 12th, 2020, 10:16 AM
#2
Re: How do I upgrade to C# 8?
What version of Visual Studio are you using?
-
March 16th, 2020, 02:34 AM
#3
Re: How do I upgrade to C# 8?
Originally Posted by Zubon
I figured you just download the latest VS and that's it, you've got the latest version of C#, but today I got an error when trying to set a property to readonly, saying "Feature 'readonly members' is not availble in C# 7.3. Please use language version 8.0 or greater."
So it seems I'm using version 7.3, how do I upgrade?
Thanks
I see, so VS uses .NET Core 2 by default and I need to upgrade to .NET Core 3.
I have VS version 16.4.5, .NET Core 3 should be installed with this version. I don't get any option to choose which version of .NET Core to use when starting a new project though. How do I change to .NET Core 3? If I started a project with .NET Core 2 can that project be updated to use .NET core 3? Thanks for your useful advices.
-
March 17th, 2020, 01:29 AM
#4
Re: How do I upgrade to C# 8?
Download the .net core 3.1 sdk and install it.
-
September 29th, 2020, 06:12 AM
#5
Re: How do I upgrade to C# 8?
o target different/latest c# version (. NET Core 3 and C# 8)
Open the project properties window (right click on project, select properties)
Select 'Build' from the left hand side options.
Scroll down to the Advanced options.
Select the desired version of c#, click ok.
Hope this information is helpful to you
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|