I want to create a NuGet package that can simultaneously and explicitly target both .NET Framework 4.6.2 and .Net Standard 1.5. Here's an abbreviated .csproj file from VS 2017:
<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><TargetFrameworks>net462;netstandard1.5</TargetFrameworks> ...</PropertyGroup></Project>
When I execute the dotnet build and pack commands from my local Windows machine, the NuGet package is created perfectly well as expected.
However, when I attempt to execute the same dotnet commands on Linux, I receive the following error:
/opt/dotnet/sdk/1.0.4/Microsoft.Common.CurrentVersion.targets(1111,5): error MSB3644: The reference assemblies for framework".NETFramework,Version=v4.6.2" 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.
It then dawned on me that there aren't any regular .NET Framework assemblies on the Linux box (let alone . Thus, it appears that I won't be able to use Linux to build my NuGet package. I searched around for a "Targeting Pack", but it's only available for Windows.
At the risk of sounding naïve, is anyone successfully building NuGet packages on Linux that can target .NET Framework?