[Asp.Net] Could not load type 'System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider'

  • 3974
  • 0

摘要:[Asp.Net] Could not load type 'System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider'

 

嘗試在 Solution 中加入 Web Depolyment Project 與 Web Setup Project 將開發好的 Web 專案打包成安裝檔時發現這個錯誤
 
Could not load type 'System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider'. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config

點選錯誤之後開啟了發生錯誤的文件,是一個 web.config,路徑如上,你哪位阿? 他說他不認識裡面的某行

<buildProviders>
    <!-- 略 -->
    <add extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider" />
    <!-- 略 -->
</buildProviders>

 

 

查了資料之後在< assemblies>之中 加一行再重編就可以了

 

<assemblies>
<!-- 略 -->
<add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<!-- 略 -->
</assemblies>

 

 

Try It!
 
參考資料
 

Deploying Silverlight Projects using VS10

How to deploy Silverlight web application through installer