2014-05-20 26 views
0

我使用Web Platform Installer在我們的開發服務器上安裝了Azure SDK 2.1。更新完成後,我們的測試項目(這是WCF服務)現在已損壞。當您瀏覽到項目(更新前正在工作)時,會出現以下錯誤:Azure SDK 2.1 - 無法加載文件或程序集'System.Web.WebPages.Deployment,

Could not load file or assembly 'System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

所有我搜索引用的MVC。我們不使用MVC,也從來沒有,它甚至不應該安裝在服務器上。爲什麼我會收到此錯誤消息?

編輯:我通過在另一臺服務器上測試發現安裝「Windows Azure SDK for .NET(VS 2010 SP1) - 2.1」包括MVC 4.0作爲依賴項。爲什麼安裝?

回答

0

我已經能夠通過簡單地卸載由Azure SDK更新安裝的MVC 4.0軟件包來實現此功能。

爲什麼這甚至是必要的超出了我,但至少它現在正在工作,並希望這可以幫助其他人有類似的問題。

0

創建一個新的項目,然後測試:

我解決了這個問題,下面將在項目的web.config行......我之前標記在管理的NuGet「Microsoft.AspNet.Mvc/5.1.2」 「微軟的ASP.NET Web頁/ 3.1.2」,我嘗試任何事情,但沒有工作(真的!!卸載VS和閱讀了很多文章)

<dependentAssembly> 
     <assemblyIdentity name="System.Web.WebPages.Deployment" publicKeyToken="31bf3856ad364e35" /> 
     <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> 
     </dependentAssembly> 

好幸運

相關問題