.netf#paket

Migrating to paket: use Windows only


I've been trying to migrate my repository to use paket with convert-from-nuget and in general everything goes smooth. The only problem I have is I noticed that my netstandard2.0 projects started to download non-Windows versions of some NuGet packages (e.g. those targeting Android or OS X - I don't need them).

After reviewing this doc page I think it's enough to set framework win{version} in paket.dependencies file.

My question: what exactly shall I use as {version}? Is framework win10 the right one?


Solution

  • This was actually simpler than I thought. I found out that in my *.fsproj files there's a tag:

    <TargetFramework>net5.0-windows</TargetFramework>
    

    So I tried adding the following line to paket.dependencies and it worked:

    framework: net5.0-windows
    

    No idea however why it wasn't autogenerated by paket convert-from-nuget, but it's not a big deal.