fsprojects / fsprojects/Paket

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

Open
#4,156 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure on macOS with the described Windows and macOS solutions by running dotnet paket install, then compare the behavior with Paket 6.0.13. Trace Paket's restore handling for multi-target solutions and the listed .sln and .fsproj files. Done means Paket 7 completes installation without requiring Windows for the Windows-targeted projects.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.