Paket icon indicating copy to clipboard operation
Paket copied to clipboard

Paket 7 in multi-target repo fails with: 'Windows is required to build Windows desktop applications.'

Open jwosty opened this issue 3 years ago • 0 comments

Description

In a solution with separate macOS and Windows Desktop projects, paket install now fails with errors such as:

/usr/local/share/dotnet/sdk/6.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/Users/jwostenberg/Code/Interstellar/src/Interstellar.Wpf.Chromium/Interstellar.Wpf.Chromium.fsproj]
/usr/local/share/dotnet/sdk/6.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/Users/jwostenberg/Code/Interstellar/Examples/Examples.Wpf.Chromium/Examples.Wpf.Chromium.fsproj]
/usr/local/share/dotnet/sdk/6.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/Users/jwostenberg/Code/Interstellar/src/Interstellar.WinForms.Chromium/Interstellar.WinForms.Chromium.fsproj]
/usr/local/share/dotnet/sdk/6.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error NETSDK1100: Windows is required to build Windows desktop applications. [/Users/jwostenberg/Code/Interstellar/Examples/Examples.WinForms.Chromium/Examples.WinForms.Chromium.fsproj]
Total time taken: 10 milliseconds
Paket failed with
-> dotnet restore "Interstellar.Windows.sln" failed

Repro steps

  1. Have a repo with two solutions and two projects 1a. MyProject.Windows.sln which contains MyProject.Windows.fsproj with a TFM of net6.0-windows 1b. MyProject.macOS.sln which contains MyProject.macOS.fsproj with a TFM of net6.0-macos
  2. On macOS, try to do a dotnet paket install

Expected behavior

paket install should work and not fail

Actual behavior

Paket blows up

Known workarounds

Downgrade to Paket 6.0.13.

jwosty avatar May 30 '22 23:05 jwosty