It may seem like forever ago but I still have a requirement to develop a class library which targets .NET Framework 2.0. Our build scripts require Visual Studio 2010 and invoke devenv.exe, passing it the path to our solution file.
We have a new requirement to produce a class library which targets .NET Core 2.0 (with a long-term goal of targeting a .NET Standard version). With the redesign of .NET, we no longer need an IDE and instead require the .NET Core 2 SDK tooling.
I noticed that the dotnet build command accepts a --framework argument. The Target Frameworks page shows net20 a supported TFM. As a let's see what happens effort, I targeted net20 and was met with the following error message:
C:\cli\sdk\2.0.0\Microsoft.Common.CurrentVersion.targets(1122,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v2.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [C:\path\to\my\project.csproj]
Within the Application tab of my project's properties in Visual Studio 2017, the Target Framework dropdown has a Install other frameworks... link. The oldest .NET Framework version listed is 3.5 SP1 and has no Dev Pack reference. Is what I'm trying to do possible? If so, where can I find the .NET Framework 2.0 Targeting Pack?