处理器架构不匹配 - Visual Studio,Nuget,Stylecop

时间:2015-11-08 01:51:45

标签: visual-studio nuget stylecop processor-architecture

我正在使用Visual Studio作为C#应用程序。我有一台64位机器。我安装了最新版的Nuget和Stylecop。当我建立时,我收到警告

There was a mismatch between the processor architecture of the project
being built "MSIL" and the processor architecture of the reference
NuGet.VisualStudio", "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."

知道这是什么意思吗?

2 个答案:

答案 0 :(得分:1)

我有两个解决此问题的工作方案: 第1步从Project>更改目标框架属性>构建标签>平台目标为x64 如果上述解决方案在大多数情况下不起作用,那么请尝试使用另一个适合我的工作。 转到项目源代码文件夹> obj> x64>调试并删除那里的所有文件 现在尝试从Visual Studio发布您的解决方案,它将起作用。 一些截图可以更好地理解

  1. enter image description here
  2. enter image description here
  3. enter image description here 4。enter image description here 5。enter image description here 6。enter image description here

答案 1 :(得分:-1)

我想通了 - 我去了配置管理器,并将项目的平台设置为x64。诀窍!