无法将 Nuget 包安装到可移植的 F# 库中,即使它应该支持它

Can't install Nuget package into a portable F# library, even though it is supposed to support it

创建一个空白解决方案。

向其中添加一个新的 F# 项目:Portable Class Library,Profile 7(.NET 4.5,Windows Store,Xamarin)。

尝试安装 NuGet 包 FSharp.Collections.ParallelSeq

根据 Don Syme,此包应支持配置文件 7。但是,运行 Install-Package FSharp.Collections.ParallelSeq 生成以下错误:

Install-Package : Could not install package 'FSharp.Collections.ParallelSeq 1.0.2'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile7', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. At line:1 char:1 + Install-Package FSharp.Collections.ParallelSeq + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Install-Package], Exception + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

项目设置如下:

  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>39db5618-025a-4e44-adf4-a5eb2df04b81</ProjectGuid>
    <OutputType>Library</OutputType>
    <RootNamespace>DeleteMe</RootNamespace>
    <AssemblyName>DeleteMe</AssemblyName>
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    <TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
    <TargetProfile>netcore</TargetProfile>
    <TargetFSharpCoreVersion>3.7.4.0</TargetFSharpCoreVersion>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
    <Name>DeleteMe</Name>
  </PropertyGroup>

有没有办法包含这个 NuGet 包,以便我可以在我的 Xamarin 应用程序中使用 PSeq

当前的 nuget 包只包含一个 net40 程序集。但是 master 有 Profile7 支持,你可以 download the artifacts from here.

编辑:好的,看起来这实际上是后来发布的 1.0.1(在 1.0.2 之后),这真的很奇怪。我认为从 1.0.2 更新到 1.0.1 可以解决这个问题。

Edit2:我创建了 an issue here 以防止这种混乱继续下去。