Reputation: 33897
Lately I have noticed in the Output Window of Visual Studio that when I compile my solution I see this message:
You are working with a preview version of the .NET Core SDK
This seems odd to me since I'm not knowingly currently using a preview version of .NET Core SDK. To explore this further, I created a new solution that contains one project based on the default Visual Studio "Class Library (.NET Core) project template. Pretty plain vanilla.
Here is the total sum of the proj file:
And yet, when I build this project, I see "You are working with a preview version of the .NET Core SDK" in the output window (see first screenshot). What's up with that? I'm using the latest production version of Visual Studio which currently is Version 16.8.5.
I see that this SO question is closely related to my question but unfortunately the poster simply asked how to make the message go away. So the accepted answer is to suppress the message like so:
<PropertyGroup>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
</PropertyGroup>
But I don't want to just suppress the message if under the hood the compiler is really compiling against a preview SDK. I want the compiler to stop using the preview SDK and use the one specified in the proj file. Namely the the production netcoreapp3.1
SDK.
Here are the SDKs I currently have installed:
So how do I make that happen and why is it not already happening?
Upvotes: 1
Views: 1774
Reputation: 2089
There are a few things you can do:
false
will ensure your project (or solution) is only built with a released SDK.NOTE: the defaults are different in different versions of Visual Studio. If you are using a Preview release of Visual Studio it will automatically use preview SDKs. If you are using a released build of Visual Studio it should prefer releases SDKs (unless the option shown in Tools->Options is checked).
Upvotes: 2