I have a libary that targets multiple frameworks in the project file.
<PropertyGroup>
<TargetFrameworks>netstandard1.1;netstandard2.0;net45</TargetFrameworks>
</PropertyGroup>
However, when running it on macOS I get the following errors because NETFramework 4.5 is not installed on the macOS.
/usr/local/share/dotnet/sdk/3.1.403/Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.8 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks [/Users/x.x/Repos/kevbite/CompaniesHouse.NET/src/CompaniesHouse.Tests/CompaniesHouse.Tests.csproj]
/usr/local/share/dotnet/sdk/3.1.403/Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.8 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks [/Users/x.x/Repos/kevbite/CompaniesHouse.NET/src/CompaniesHouse.IntegrationTests/CompaniesHouse.IntegrationTests.csproj]
/usr/local/share/dotnet/sdk/3.1.403/Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.5 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks [/Users/x.x/Repos/kevbite/CompaniesHouse.NET/src/CompaniesHouse/CompaniesHouse.csproj]
How do I only build the projects that are compatible with what is installed on the machine? as I'm not going to be able to get net45 for macOS.