我再也无法部署我的天蓝色webrole,它无限循环.所以我穿上了Intellitrace,我发现了这个异常:
Exception:Thrown: “Unable to load the role entry point due to the
following exceptions:
— System.IO.FileLoadException: Could not load file or assembly ‘System.Web.Http,Version=5.0.0.0,Culture=neutral,
PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The
located assembly’s manifest deFinition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
在我的项目中,web.config和包(Webapi,webhost等)都在5.2.0.0中,所以我不明白为什么Azure试图找到5.0.0.0?
例:
<dependentAssembly> <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0" /> </dependentAssembly>
你有什么主意吗 ?谢谢
ps:System.Web.Http得到了本地复制:true