Web 部署项目构建不再属于项目的文件
这是我得到的错误:
错误 101 无法加载类型 '控制'。 /Test.vbproj/x.ascx 1 1 Web部署项目
这是上周项目的一部分遗留文件,但其中一位开发人员将其从项目中删除了。 我必须手动删除该文件才能构建 WDP。 有没有办法告诉 WDP 忽略不属于项目的文件或查看这些文件不属于项目并删除它们?
This is the error I get:
Error 101 Could not load type
'control'. /Test.vbproj/x.ascx 1 1
WebDeployProject
This is a left over file that was part of the project last week, but one of the developers deleted it from the project. I have to manually delete the file in order to get the WDP to build. Is there a way to tell the WDP to ignore the files that are not part of the project or to see that these files are not part of the project and delete them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您需要使用源代码控制工具来查找并删除不受源代码控制的本地文件。
例如,如果您使用的是 TFS,请执行以下操作:
您现在已获得本地工作副本中存在但未包含的所有文件的列表不在源代码管理中。 对于每个文件,删除本地副本或将其添加到源代码管理中。
You'll need to use your source control tools to find and remove local files that aren't under source control.
For instance, if you're using TFS, do the following:
You've now got a list of all the files that exist in your local working copy but aren't in source control. For each file, either delete your local copy or add it to source control.
它可能与网络项目的类型有关。
如果它是一个网站,那么编译器将尝试编译该文件夹中的每个文件。 但是,如果它是一个 Web 应用程序项目,那么它只会编译那些您专门添加为项目一部分的项目。
It could have something do to with the type of web project is it.
If it's a web site, then the compiler will attempt to compile every file in the folder. However, if it's a Web Application Project, then it will only compile those that you've specifically added as part of the project.
如果您最近从项目中删除/删除了文件,那么您需要转到“项目”>“ “显示所有文件”和所有删除的文件将显示在您的解决方案资源管理器中。 您可以删除文件 /x.ascx 并重建 WDP。
If you have recently deleted/removed a file from your project then you need go to Project > "Show all files" and all removed files will apear in your solution explorer. You can delete the file, /x.ascx and rebuild your WDP.
它与Web项目的类型无关: http://amiraryani.wordpress.com/2008/11/06/web-deployment-project-aspparse-could-not-load-type/。
网站本身将其根目录下的文件视为网站的一部分。
Web 应用程序项目本身允许您在每个文件的基础上自定义构建操作等。
然而,即使 WDP 与 WAP 关联,Web 部署项目也会尝试将文件包含在根目录(a la 网站)下。 这就是为什么它是哪种类型的 Web 项目并不重要。
编辑:澄清一下,如果您尝试构建、调试或发布该项目本身而不是使用 WDP,那么您使用的 Web 项目类型很重要。
It has nothing to do with the type of Web project: http://amiraryani.wordpress.com/2008/11/06/web-deployment-project-aspparse-could-not-load-type/.
A Web Site itself considers files under its root directory as part of the site.
A Web Application Project itself allows you to customize build actions, etc. on a per-file basis.
A Web Deployment Project, however, will try to include files under the root directory (a la a Web Site), even if the WDP is associated with a WAP. That's why it doesn't matter which kind of Web project it is.
EDIT: To clarify, it would matter what type of Web project you are using if you were trying to Build, Debug, or Publish that project itself instead of using a WDP.