I use Reinforced.Typings
and target my project as net5.0-windows
.
Build fails with the below error because such a moniker is not targeted: the tools
folder contains net5.0
among others, but not net5.0-windows
.
C:\Users\username\.nuget\packages\reinforced.typings\1.6.1\build\Reinforced.Typings.targets(61,3): error MSB6006: "" exited with code 1.
C:\Program Files\dotnet\dotnet.exe "C:\Users\username\.nuget\packages\reinforced.typings\1.6.1\tools\net5.0-windows\rtcli.dll" profile "C:\Users\username\AppData\Local\Temp\tmp813E.tmp"
Could not execute because the specified command or file was not found.
Would it be possible to target this framework too @pavel-b-novikov?
Any other ideas on how to force MSBuild to Reinforced.Typings
to "redirect" from net5.0-windows
to net5.0
?
Or maybe that's something that can be configured on the MSBuild level?
Obviously, the obvious solution would be if I change my target to net5.0
, but it's not possible due to other dependencies at the moment, unfortunately.
The solution is to specify RtForceTargetFramework
as per documentation:
<PropertyGroup>
<RtForceTargetFramework>net5.0</RtForceTargetFramework>
</PropertyGroup>