在假项目中警告MSB3270 [英] Warning MSB3270 in Fakes projects

查看:459
本文介绍了在假项目中警告MSB3270的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在迁移到VS2012(更新2)并使用Fakes之后,MSBuild开始显示新的警告:

T 这里正在构建的"MSIL"项目的处理器架构与以及参考"System.Data","x86"的处理器架构.这种不匹配可能会导致运行时失败. 请考虑通过Configuration Manager更改项目的目标处理器体系结构,以使项目和引用之间的处理器体系结构保持一致,或者依赖具有处理器体系结构的引用 与您的项目的目标处理器体系结构相匹配.

我们解决方案中的所有项目都配置为"AnyCPU"平台目标.但是动态生成的Fakes项目包含对System.Data的引用,具有以下路径:C:\ Windows \ Microsoft.Net \ assembly \ GAC_32 \ System.Data \ v4.0_4.0.0.0__b77a5c561934e089 \ System.Data.dll
那么,如何配置Fakes以使用GAC_64而不是GAC_32的System.Data.dll?

我发现该文件的伪造设置为C:\ Program Files(x86)\ MSBuild \ Microsoft \ VisualStudio \ v11.0 \ Fakes \ Microsoft.QualityTools.Testing.Fakes.targets

After migration to VS2012 (Update 2) and using Fakes, MSBuild began to show a new warning: 

There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Data", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. 

All projects in our solution are configured to "AnyCPU" Platform Target. But dynamically generated Fakes projects contain a reference to System.Data with next path: C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll
So, how to configure Fakes to use System.Data.dll from GAC_64 instead of GAC_32?

I found the file with some fakes settings C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Fakes\Microsoft.QualityTools.Testing.Fakes.targets
Can it help me?

推荐答案

你好,

我已将此线程移至 MSBuild论坛以获得更好的响应.

最好的问候


这篇关于在假项目中警告MSB3270的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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