我正在使用DotNetOpenAuth(它引用System.Web.Mvc版本1.0.0.0)在Visual Studio 2010中的Mvc 3.0.0.0项目中。
我正在使用以下程序集绑定重定向:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
除了代码分析,一切都正常,但是代码分析给了我以下错误:
CA0001:读取模块 X 时遇到以下错误:无法解析程序集引用:System.Web.Mvc,Version=1.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35。
和
CA0058:找不到引用程序集“System.Web.Mvc,Version=1.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”。此程序集对于分析是必需的,并被模块 X 引用。
有没有办法让代码分析工具尊重程序集绑定重定向?
CodeAnalysisAdditionalOptions>/assemblyCompareMode:StrongNameIgnoringVersion</CodeAnalysisAdditionalOptions>
在<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
和<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
以及<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- Diganta Kumar