更新单声道后,F# build 无法找到两个包
F# build fails to locate two packages after updating mono
我在 Linux 下有一个现有的 F# / Mono / paket / fake 项目,用于正确编译。
我使用 apt-get 更新了 mono,现在我的项目无法编译。
找不到两个引用的包: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
文件夹中(我使用 Ionide-fsharp 和使用 paket 和 fake 的 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
文件太长 post 但这里是相关部分:
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>..\..\packages\MathNet.Numerics\lib\net35\MathNet.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>..\..\packages\MathNet.Numerics\lib\net40\MathNet.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
.
要 运行 数据包,您需要 运行
$ mono paket.exe install
如果您仍然遇到缺少程序集或不稳定引用的问题,请尝试
$ apt-get install mono-dev
或
$ apt-get install mono-complete
有关 Mono 安装的更多信息,请查看 http://www.mono-project.com/download/#download-lin
我最终做了一个 paket.exe update --redirects
就像 @TaylorFraley 推荐的那样修改了一些文件。
然后使用 paket ionide 插件从我的解决方案中删除了两个包。
然后我在解决方案中搜索关于这两个包(我的 .fsproj 中包含两个参考)的任何剩余内容,然后我手动将其删除。
我再次使用 paket Ionide 插件重新安装了软件包,一切正常。
因此解决方案是删除所有内容并重新添加。不知道为什么小包更新不起作用。
我在 Linux 下有一个现有的 F# / Mono / paket / fake 项目,用于正确编译。
我使用 apt-get 更新了 mono,现在我的项目无法编译。
找不到两个引用的包: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
文件夹中(我使用 Ionide-fsharp 和使用 paket 和 fake 的 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
文件太长 post 但这里是相关部分:
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>..\..\packages\MathNet.Numerics\lib\net35\MathNet.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>..\..\packages\MathNet.Numerics\lib\net40\MathNet.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
.
要 运行 数据包,您需要 运行
$ mono paket.exe install
如果您仍然遇到缺少程序集或不稳定引用的问题,请尝试
$ apt-get install mono-dev
或
$ apt-get install mono-complete
有关 Mono 安装的更多信息,请查看 http://www.mono-project.com/download/#download-lin
我最终做了一个 paket.exe update --redirects
就像 @TaylorFraley 推荐的那样修改了一些文件。
然后使用 paket ionide 插件从我的解决方案中删除了两个包。
然后我在解决方案中搜索关于这两个包(我的 .fsproj 中包含两个参考)的任何剩余内容,然后我手动将其删除。
我再次使用 paket Ionide 插件重新安装了软件包,一切正常。
因此解决方案是删除所有内容并重新添加。不知道为什么小包更新不起作用。