团队生成错误:ASPNETCOMPILER:错误 ASPRUNTIME:'/localhost:8080'不是有效的虚拟路径。有什么建议吗?
我正在尝试构建使用 VS 2008 构建的 Web 应用程序解决方案,但遇到以下错误。
ASPNETCOMPILER:错误 ASPRUNTIME:“/localhost:8080”不是有效的虚拟路径。
我完全不知道如何以及为什么会发生?与部署项目设置或网站属性有关吗?该解决方案已签入源代码管理。
这同样适用于同一解决方案的不同分支,并且构建不会出现任何错误。
I am trying to build Web Application solution built using VS 2008 and facing the following error.
ASPNETCOMPILER : error ASPRUNTIME: '/localhost:8080' is not a valid virtual path.
I have absolutely no clue how and why is is occurring? Is it related with the deploy project settings or web site properties? The Solution is checked into the source control.
The same works for a different branch of the same solution and the build occurs without any errors.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在网站的项目属性中的 MSBuild 选项下,
更改输出文件夹路径,删除端口号。
In the project properties for the web site, under the MSBuild options,
change the Output Folder path, removing the port number.
在您的 Web 项目解决方案中,右键单击该项目(类似于 http://localhost:xxx/_1/ )在解决方案中,然后单击属性页。将打开一个新对话框,标题为“http://youwebsiteName:xxxx/_1/ 属性页”。在此对话框中单击“MSBuild 选项”。
单击此选项后,对话框的内容将发生变化,并且将显示具有复选框和单个文本字段的某些属性。第一个文本字段将显示“输出文件夹”,并且在文本字段内将写入一个类似“d:\data\allProjects\WebProject\localhost:8080”的路径。
显然,它不是有效的路径,因为您无法创建在 fodler/路径名称中包含“:”的文件夹。因此删除这个冒号和端口号并保存。这将解决有关有效虚拟路径的问题。
In your web project solution right click the project (which is like http://localhost:xxx/_1/) in the solution and click Property Pages. A new Dialog will open saying " http://youwebsiteName:xxxx/_1/ Property Pages" as Title. In this dialog click "MSBuild Options".
On clicking this option the contents of the dialog will change and certain properties having checkboxes and single text field will be displayed. The first text field will be saying "Output folder" and inside the text field there will be a path written that says something like "d:\data\allProjects\WebProject\localhost:8080".
Obviously it is not valid path as you cannot create a folder having ":" in the fodler/path name. So remove this colon and port number and save it. This will solve the problem regarding the valid virtual path.