【问题标题】:Why do I get build errors when I compile my site with aspnet_compiler.exe, but not when I VS's build tool?为什么我在使用 aspnet_compiler.exe 编译我的站点时会出现构建错误,但在我使用 VS 的构建工具时却没有?
【发布时间】:2012-08-04 21:17:46
【问题描述】:

我有一个包含 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:在 Imports 'myExternalLib.Controls' 中指定的命名空间或类型不包含任何公共会员或找不到。确保命名空间或类型已定义并包含至少一个公共成员。确保导入的元素名称不使用任何别名。
  • C:\myFrameworkPath\Config\web.config(130):错误 ASPCONFIG:无法加载类型“System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider”。

注意:我想使用 aspnet_compiler 来实现 Luis Rocha's 预构建视图。

【问题讨论】:

    标签: asp.net-mvc vb.net visual-studio-2010 compiler-construction


    【解决方案1】:

    我不知道为什么会发生这种情况(我仍然希望得到这个答案),但它看起来像 aspnet_compiler 工具 does not know 在哪里可以找到 System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider 类型而无需明确web.config 文件中的说明。 VS 2010 内部的构建例程不知何故知道,我不明白为什么 aspnet_compiler 不这样做!

    【讨论】:

      猜你喜欢
      • 2023-03-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-08
      • 2017-04-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多