簡體   English   中英

為什么當我使用 aspnet_compiler.exe 編譯我的網站時會出現構建錯誤,而當我使用 VS 的構建工具時卻不會?

[英]Why do I get build errors when I compile my site with aspnet_compiler.exe, but not when I VS's build tool?

我有一個包含 MVC、測試、數據訪問等項目的解決方案,當我在 VS 2010 中單擊“構建”時,它構建得很好。

當我嘗試在命令提示符( aspnet_compiler.exe -c -v temp -p \\absolute\\path\\to\\my\\solution\\directory )下使用 aspnet_compiler 時,出現兩個錯誤並且構建失敗!

  • C:\\myFrameworkPath\\Temporary ASP.NET Files\\temp\\6d21e425\\4455c27d\\App_Web_y5rq3jcy.0.vb(17):警告 BC40056:導入中指定的命名空間或類型“myExternalLib.Controls”不包含任何公共成員或不能被發現。 確保命名空間或類型已定義並且至少包含一個公共成員。 確保導入的元素名稱不使用任何別名。
  • C:\\myFrameworkPath\\Config\\web.config(130): 錯誤 ASPCONFIG: 無法加載類型“System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider”。

注意:我想使用 aspnet_compiler 來實現Luis Rocha 的預構建視圖。

我不知道為什么會發生這種情況(我仍然希望得到那個答案),但看起來 aspnet_compiler 工具不知道在哪里可以找到System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider類型而沒有明確的說明web.config 文件。 VS 2010 內部的構建例程不知何故知道,我不明白為什么 aspnet_compiler 不這樣做!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM