gpt4 book ai didi

c# - 在构建服务器中构建可移植类库项目失败

转载 作者:可可西里 更新时间:2023-11-01 03:08:24 25 4
gpt4 key购买 nike

我最近向构建服务器中构建的应用程序添加了一些自定义可移植类库项目。构建工作正常,但之后它停止工作并向我显示以下消息:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(983, 5): warning MSB3644: The reference assemblies for framework ".NETPortable,Version=v4.0,Profile=Profile136" were not found.

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1578, 5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll", "AMD64".

error CS0234: The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)

构建服务器规范:

解决方案是 .NET 4.0 应用程序,可移植项目仅针对 .NET4.0+ e Silverlight 5。 portable targets

我检查了我的开发机器(Windows 8、Visual Studio 2012)。确实有一个文件夹“C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable\v4.0\Profile\Profile136”(事实上,.NET 4.0 的配置文件最多可达 158 个)。然而,在构建机器中,最多只有 131 个配置文件的文件夹。

可移植类库工具是最新的吗?它似乎错过了为最新平台安装配置文件。

更新

我将开发机器的“.NETPortable\v4.0\Profile\Profile136”复制到构建服务器,现在应用程序构建成功。我仍然想知道为什么无法立即安装可移植类库工具。

最佳答案

一个更通用和优雅的解决方案是安装最新的 Microsoft .NET 可移植库引用程序集。这将安装 profile138 等。

可以在以下位置找到独立安装程序:

关于c# - 在构建服务器中构建可移植类库项目失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20518424/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com