我有一个可以在我的本地机器上正常构建的项目,但是,当我让 TFS 构建它时,我收到以下错误 -
I have a project that can build fine on my local machine, however, when I get TFS to build it, I receive the following error -
SGEN:尝试加载格式不正确的程序集:
SGEN: An attempt was made to load an assembly with an incorrect format:
在阅读了此处有关此主题的许多其他帖子后,大多数人只是说我需要将构建类型更改为 x86 或 Any CPU,而不是 x64,但在尝试了无数组合之后,这不是解决方案.我的程序也是一个windows服务,所以设置App Pool允许32位应用(其他人建议)也不是解决办法.
After reading through many other posts here on this topic, most people just say I need to change the build type to either x86 or Any CPU, rather than x64, but after trying countless combinations, this was not the solution. My program is also a windows service, so setting the App Pool to allow 32 bit applications (as suggested by others) is also not the solution.
这个页面终于解决了我的问题 - http://aplocher.wordpress.com/2012/10/12/sgen-an-attempt-was-made-to-load-an-assembly-with-an-incorrect-format-tfs-2010/
My problem was finally solved by this page - http://aplocher.wordpress.com/2012/10/12/sgen-an-attempt-was-made-to-load-an-assembly-with-an-incorrect-format-tfs-2010/
以防万一该页面将来消失,以下是所涉及的步骤 -
Just in case that page ever disappears in the future, here are the steps involved -
这篇关于SGEN:试图加载格式不正确的程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!