问题描述
我正在准备一个全新的ASP.NET MVC 5.1解决方案.我要添加一堆NuGet软件包,并使用Zurb Foundation等对其进行设置.
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:
我最初是在编译Razor网页时添加针对相同或相似错误的修复程序,该修复程序位于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>
但是问题尚未解决.
推荐答案
添加对此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和这些Facade的文档,我将回发更多信息.
I will post back with more information once I've found some documentation on PCL and these Facades.
更新
是的,整个互联网上的外墙组件几乎没有.
Yeah pretty much nothing on facade assemblies on the whole internet.
Google:
(Facades OR Facade) Portable Library site:microsoft.com
这篇关于生成错误:您必须添加对System.Runtime的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!