问题描述
我是preparing一个全新的ASP.NET MVC 5.1的解决方案。我添加一堆的NuGet包和Zurb基金会等设置它。
I'm preparing a brand new ASP.NET MVC 5.1 solution. I'm adding in a bunch of NuGet packages and setting it up with Zurb Foundation etc.
作为其中一部分,我已经加入到了一个内部的NuGet包,它是一种便携式类库参考,我认为这是构建服务器上导致问题。
As part of that, I've added a reference to an in-house NuGet package which is a Portable Class Library and I think this is causing a problem on the build server.
TeamCity的失败与构建:
TeamCity fails the build with:
类型'System.Object的在没有引用的程序集的定义。您必须添加一个引用程序集System.Runtime,版本= 4.0.0.0
我编译剃刀网页,即固定在是最初时增加了对相同或类似的错误修复的web.config
I originally added the fix for the same or similar error when compiling the Razor web pages, that fix being in the web.config
<compilation ... >
<assemblies>
<add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</assemblies>
</compilation>
然而,问题没有得到解决。
However the issue is unresolved.
推荐答案
添加到这个System.Runtime.dll集的引用解决了该问题:
Adding a reference to this System.Runtime.dll assembly fixed the issue:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Facades\System.Runtime.dll
虽然在显式路径该文件不生成服务器上存在。
Though that file in that explicit path doesn't exist on the build server.
我会后回来更多信息,一旦我发现PCL和这些外立面一些文档。
I will post back with more information once I've found some documentation on PCL and these Facades.
更新
呀pretty上门面组件没什么太大了整个互联网。
Yeah pretty much nothing on facade assemblies on the whole internet.
谷歌:
(Facades OR Facade) Portable Library site:microsoft.com
这篇关于您必须在裁判添加到System.Runtime的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!