I have a VS solution that contains both .Net CORE and .Net standard projects. I have just changed all the .Net CORE projects to use .Net 5 by switching the Target Framework property as below
But I can't do the same with the .Net standard projects because the Framework property dropdown doesn't have an option for .Net 5.
I did try the "Install other framework" option and installed the .Net 5 SDK (not sure why I need to do that as I already have .Net 5 on my system) but it didn't help - the dropdown still doesn't have .Net 5 afterwards.
What am I missing here?
The C# extension for Visual Studio Code already supports . NET 5.0 and C# 9. . NET 5.0 is the first release in our .
I was able to convert all my .Net standard projects to .Net 5 mainly by modifying the project files. What I did was removing all the PropertyGroup sections in a project file and adding this
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>MyNameSpace</RootNamespace>
</PropertyGroup>
I was able to leave all the ItemGroup unchanged. Some of the project references didn't work initially but I was able to correct them by simply removing and adding them back again.
Make sure to Unload project, Edit for the below PropertyGroup change and then Reload project
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With