为什么当我使用aspnet_compiler.exe编译网站时却出现构建错误,而当我使用VS#39的构建工具时却没有生成错误? [英] Why do I get build errors when I compile my site with aspnet_compiler.exe, but not when I VS's build tool?

查看:91
本文介绍了为什么当我使用aspnet_compiler.exe编译网站时却出现构建错误,而当我使用VS#39的构建工具时却没有生成错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含MVC,测试,数据访问等项目的解决方案,当我在VS 2010中单击生成"时,该解决方案就可以很好地构建.

I have a solution with projects for MVC, testing, data access, etc which builds fine when I click "build" in VS 2010.

当我尝试在命令提示符(aspnet_compiler.exe -c -v temp -p \absolute\path\to\my\solution\directory)上使用aspnet_compiler时,出现两个错误,构建失败!

When I try to use aspnet_compiler at the command prompt (aspnet_compiler.exe -c -v temp -p \absolute\path\to\my\solution\directory), I get two errors and the build fails!

  • C:\ myFrameworkPath \ ASP.NET临时文件\ 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的预先构建视图.

NOTE: I want to use aspnet_compiler to implement Luis Rocha's pre building views.

推荐答案

我不知道为什么为什么发生(而且我仍然希望有这个答案),但看起来像aspnet_compiler工具在Web.config文件中没有明确说明的情况下,不知道在哪里可以找到System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider类型. VS 2010内部的构建例程以某种方式知道,而且我不明白为什么aspnet_compiler不会做同样的事情!

I don't know why this happen (and I would still prefer to have that answer), but it looks like the aspnet_compiler tool does not know where to find the System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider type without explicit instructions in the web.config file. The build routine inside of VS 2010 somehow knows, and I do not understand why aspnet_compiler does not do the same!

这篇关于为什么当我使用aspnet_compiler.exe编译网站时却出现构建错误,而当我使用VS#39的构建工具时却没有生成错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆