F#Build更新单声道后无法找到两个软件包



我在Linux下有一个现有的F#/Mono/Paket/Fake Project,该项目曾经正确编译。

我使用APT-GET更新了单声道,现在我的项目不会编译。

它找不到两个引用的软件包:Mathnet.numerics和newtonsoft.json。

这是我在构建项目时得到的:

Primary reference "MathNet.Numerics".
/usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1980,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "MathNet.Numerics". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/home/bleakcabal/Documents/projects/genesis/genesis/genesis/genesis.fsproj]
          For SearchPath "{TargetFrameworkDirectory}".
          Considered "/usr/lib/mono/xbuild-frameworks/.NETFramework/v4.5/MathNet.Numerics.winmd", but it didn't exist.
          Considered "/usr/lib/mono/xbuild-frameworks/.NETFramework/v4.5/MathNet.Numerics.dll", but it didn't exist.
          Considered "/usr/lib/mono/xbuild-frameworks/.NETFramework/v4.5/MathNet.Numerics.exe", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/MathNet.Numerics.winmd", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/MathNet.Numerics.dll", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/MathNet.Numerics.exe", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/Facades/MathNet.Numerics.winmd", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/Facades/MathNet.Numerics.dll", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/Facades/MathNet.Numerics.exe", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/Facades/MathNet.Numerics.winmd", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/Facades/MathNet.Numerics.dll", but it didn't exist.
          Considered "/usr/lib/mono/4.5-api/Facades/MathNet.Numerics.exe", but it didn't exist.
          For SearchPath "{GAC}".
          Considered "MathNet.Numerics", which was not found in the GAC.
          For SearchPath "{RawFileName}".
          Considered treating "MathNet.Numerics" as a file name, but it didn't exist.
          For SearchPath "/home/bleakcabal/Documents/projects/genesis/build/".
          Considered "/home/bleakcabal/Documents/projects/genesis/build/MathNet.Numerics.winmd", but it didn't exist.
          Considered "/home/bleakcabal/Documents/projects/genesis/build/MathNet.Numerics.dll", but it didn't exist.
          Considered "/home/bleakcabal/Documents/projects/genesis/build/MathNet.Numerics.exe", but it didn't exist.

该文件位于我的项目中的packages文件夹中(我使用Paket和Fage使用VS代码创建了该文件(,但是此文件夹并未出现在错误消息中。

我收到newtonsoft.json的消息完全相同。

这是我的paket.dependencies文件:

source https://www.nuget.org/api/v2
nuget FAKE
nuget FSharp.Core
nuget MathNet.Numerics
nuget Newtonsoft.Json

我的 paket.lock文件太长了,以至于以下是相关部分:

MathNet.Numerics (3.19)
      TaskParallelLibrary (>= 1.0.2856) - framework: net35
Newtonsoft.Json (10.0.2)
      Microsoft.CSharp (>= 4.3) - framework: netstandard10, >= netstandard13
      NETStandard.Library (>= 1.6.1) - framework: netstandard10, >= netstandard13
      System.ComponentModel.TypeConverter (>= 4.3) - framework: netstandard10, >= netstandard13
      System.Runtime.Serialization.Formatters (>= 4.3) - framework: >= netstandard13
      System.Runtime.Serialization.Primitives (>= 4.3) - framework: netstandard10, >= netstandard13
      System.Xml.XmlDocument (>= 4.3) - framework: >= netstandard13

这是我的多个.fsproj文件之一的摘录,该文件引用了这些软件包:

...
<Reference Include="MathNet.Numerics" />
<Reference Include="Newtonsoft.Json" />
...
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v3.5'">
  <ItemGroup>
    <Reference Include="MathNet.Numerics">
      <HintPath>....packagesMathNet.Numericslibnet35MathNet.Numerics.dll</HintPath>
      <Private>True</Private>
      <Paket>True</Paket>
    </Reference>
  </ItemGroup>
</When>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.0' Or $(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1' Or $(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3' Or $(TargetFrameworkVersion) == 'v4.7')">
  <ItemGroup>
    <Reference Include="MathNet.Numerics">
      <HintPath>....packagesMathNet.Numericslibnet40MathNet.Numerics.dll</HintPath>
      <Private>True</Private>
      <Paket>True</Paket>
    </Reference>
  </ItemGroup>
</When>

如果我做mono --version,我会得到以下内容:

Mono JIT compiler version 5.0.1.1 (2017-02/5077205 Thu May 25 09:16:53 UTC 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com

我尝试使用以下命令,但无济于事: .paket/paket.exe restore.paket/paket.exe install.paket/paket.exe outdated

要运行paket,您将需要运行

$ mono paket.exe install

如果您仍然丢失了组件或奇怪的参考,请尝试

$ apt-get install mono-dev

$ apt-get install mono-complete

有关单声道安装的更多信息,请查看http://www.mono-project.com/download/download/#download-lin

我最终做了一个 paket.exe update --redirects,例如@taylerfraley推荐了修改某些文件。

然后使用Paket Ionide插件我从我的解决方案中删除了两个软件包。

我然后搜索了解决方案,以获取有关这两个软件包的任何内容(我的.fsproj中包含两个引用(,然后我手动删除。

我再次使用Paket Ionide插件重新安装了包装,一切都起作用。

因此,解决方案将是删除所有内容并再次添加它们。不确定为什么Paket更新不起作用。

相关内容

  • 没有找到相关文章

最新更新