当我创建新的ASP.NET 4.5
网络表格应用程序来自vs2012
并更新所有nuget
包,我在构建时收到此错误:
错误 1 “EnsureBindingRedirects”任务意外失败。
System.NullReferenceException:未将对象引用设置为对象的实例。
在 Roxel.BuildTasks.EnsureBindingRedirects.MergeBindingRedirectsFromElements(IEnumerable`1 dependentAssemblies)
在 Roxel.BuildTasks.EnsureBindingRedirects.Execute()
在 Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
在 Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext()
这是一个错误Microsoft.Bcl.Build
为了解决这个问题,你必须把culture
信息在assemblyIdentity
-部分web.config
or app.config
.
例如,如果您有:
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
将其更改为:
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)