I have a project in Visual Studio 2015 update 3 which uses target framework 4.6.1.
I would like to change its target to ".Net Standard".
".Net standard" is not listed in the "Target framework" drop down list:Net standard is not listed
How can I do that ?
I'm using a Microsoft Dynamics 365 SDK version 10.
Thank you.
01 Answer
How can I do that?
Your inability to target .NET Standard is directly relate to the version of Visual Studio you are using.
Source: How to install .NET Standard 2.0
In order to build .NET Standard libraries in Visual Studio, make sure you have Visual Studio 2017 version 15.3 or later installed on Windows, or Visual Studio for Mac version 7.1 or later installed on macOS.
You will have to upgrade to the current version of Visual Studio 2017 or Visual Studio 2019 to acomplish your goal.
Source:
Installing a .NetStandard 2.0 Nuget package into a VS2015 Net 4.6.1 project
Cross-platform targetingOnce you upgrade to Visual Studio 2017+ you would make the following modifications to your project's solution.
netstandard2.0;net461