团队建设,SGen&混合模式组装 [英] Team Build, SGen & Mixed mode assembly

查看:90
本文介绍了团队建设,SGen&混合模式组装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里有些奇怪。

我们有一个相当复杂的解决方案(111个项目分布在asp.net,silverlight,WFC,Ria Services等),可以在我的开发箱(2010)上正确构建。如果我在构建机器上启动VS,我也可以正确构建解决方案。但是,当我对构建进行排队时,它几乎可以通过,直到尝试运行SGen为止-此时,我得到的是旧的混合模式程序集是针对运行时的版本'v2.0.50727'构建的,无法在4.0运行时,无需其他配置信息。栗子。

We have a fairly complex (111 projects spread across asp.net, silverlight, WFC, Ria Services etc) solution, which builds correctly on my dev box (2010). If I fire up VS on our build machine, I can also build the solution correctly. However, when I queue a build, it almost makes it through, until it attempts to run SGen - at which point I get the old "Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information." chestnut.

我已经在Google上努力寻找解决方案,但似乎无济于事-错误发生在编译时而不是运行时,我已将v2激活密钥添加到Team build主机的配置文件中,但无效。解决方案中没有测试可能会导致加载内容。

I've googled to try to find a solution, but nothing appears to do the job - the error is occurring at complile time rather than runtime, and I've added the v2 activation key to Team build host's config file to no effect. There are no tests in the solution which might cause things to be loaded.

有什么想法吗?任何人?尤其令人困惑的是,VS可以在服务器上正常构建,但团队构建失败。

Any ideas? Anyone? Particularly confused that VS can build ok on the server, but team build fails.

推荐答案

以下技巧对我有用( a href = http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/2a5bf31e-df96-4bf1-a846-699da46b62fb rel = noreferrer>参考。)

The following trick has worked for me (ref.)

编辑(或创建不存在的文件) sgen.exe.config ,该文件应位于以下位置:

Edit (or create if it does not exist) sgen.exe.config which should be located under:


  • C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\

  • C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\

或在x64操作系统上:

or on a x64 OS:


  • C:\Program Files(x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\

  • C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\

然后添加:

<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
  </startup>
</configuration>

据我了解,在 app.config中添加相同的代码段项目的可能还不够,因为 sgen 工具无法读取它:(

As far as I understand, adding the same snippet in the app.config of the project might no be sufficient as it's not read by the sgen tool :(

这篇关于团队建设,SGen&amp;混合模式组装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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