在构建服务器失败,构建可移植类库项目 [英] Building Portable Class Library Project in build server fails

查看:998
本文介绍了在构建服务器失败,构建可移植类库项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近增加了一些自定义的可移植类库项目,是建立在构建服务器的应用程序。构建工作正常,但在那之后它停止工作,让我看到以下消息:

I've recently added some custom Portable Class Library projects to an application that is built in an build server. The build was working fine, but after that it stopped working and shows me the following messages:

C:\ WINDOWS \ Microsoft.NET \ Framework64 \ v4.0.30319 \ Microsoft.Common.targets(983,   5):警告MSB3644:参考组件的框架   .NETPortable,版本= V4.0,外形= Profile136没有找到。

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):警告MSB3270:有处理器之间的不匹配   该项目的建筑正在兴建MSIL和处理器   参考架构   C:\ WINDOWS \ Microsoft.NET \ Framework64 \ v4.0.30319 \ mscorlib.dll中,   AMD64。

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".

错误CS0234:类型或命名空间名称'LINQ的'不中存在   命名空间'系统'(是否缺少程序集引用?)

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

在构建服务器规格:

  • Windows Server 2008 R2 Standard
  • TeamCity 8.0.4
  • .NET 4.5
  • Portable Class Library Tools (as advised here)
  • Silverlight 5 SDK

该解决方案是一个.NET 4.0应用程序和便携式项目针对.NET4.0 + E的Silverlight 5日止。

The solution is a .NET 4.0 application and the portable projects target .NET4.0+ e Silverlight 5, only.

我已经检查了我的开发机器(Windows 8中,的Visual Studio 2012)。确实是有一个文件夹C:\ Program Files文件(x86)的\参考大会\微软\ Framework.NETPortable \ V4.0 \档案\ Profile136(事实上,对于.NET 4.0的配置文件上升到158)。 在构建机器,但是,也有多达131只的文件夹中的配置文件。

I have checked my development machine (Windows 8, Visual Studio 2012). There is indeed a folder "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable\v4.0\Profile\Profile136" (in fact, the profiles for .NET 4.0 go up to 158). In the build machine, however, there are only folders for profiles up to 131.

是可移植的类库工具最新的吗?现在看来,这会错过的最新平台上安装配置文件。

Is Portable Class Library Tools up to date? It seems it miss installing profiles for the most recent platforms.

更新

我复制了.NETPortable \ V4.0 \档案\ Profile136我的开发机上构建服务器,而现在的应用程序成功生成。我还是想知道为什么安装便携式类库工具不起作用开箱即用。

I copied the ".NETPortable\v4.0\Profile\Profile136" of my development machine to the build server, and now the application builds successfully. I still would like to know why installing the Portable Class Library Tools does not work out of the box.

推荐答案

一个更一般的,优雅的解决办法是安装最新的Microsoft .NET移植库引用程序集。这将安装profile138在许多其他。

A more general and elegant solution is to install the latest Microsoft .NET Portable Library Reference Assemblies. This will install profile138 among many others.

独立安装程序(S)可以在这里找到:

The standalone installer(s) can be found at:

  • 4.6 (June 2014):

这篇关于在构建服务器失败,构建可移植类库项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆