Visual Studio构建错误“路径中的非法字符"; [英] Visual Studio build error "Illegal characters in path"

查看:541
本文介绍了Visual Studio构建错误“路径中的非法字符";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在包含网站的Visual Studio(2010 SP1)中构建解决方案时,出现以下有趣的错误.

When I try to build my solution in Visual Studio (2010 SP1) containing a website, I get the following funny error.

------ Build started: Project: C:\...\Web\, Configuration: Debug Any CPU ------
Validating Web Site
: Build (web): Illegal characters in path.

Validation Complete

即使将构建详细程度设置为诊断,也没有更多信息.我试图删除所有可以找到的临时文件,以重新启动所有可能的文件.我什至从头重新提取了我的整个svn文件夹,然后重新构建了..错误仍然存​​在.然后,错误非常随机地消失了.现在,大约一天后,又回来了.

There is no more info whatsoever, even when build verbosity is set to diagnostic. I've tried to delete all the temporary files I could find, to restart everything I could. I even refetched my whole svn folder from scratch and rebuilt.. error still there. Then, quite randomly, the error disappeared. Now, about a day later, it's back.

  1. 您是否经历过类似的行为?难道这是VS的错误?
  2. 是否有一种方法可以增加网站验证步骤的详细程度,以便使我看到有关该错误的更多信息?

推荐答案

经过数小时的故障排除,我尝试使用另一个实例调试Visual Studio,并获取异常的内部信息.结果,我找到了错误的实际原因:

After hours of troubleshooting I tried to debug visual studio with another instance and get to the internals of the exception. As a result, I have found the actual reason of the error :

将包含问号的路径设置为Web服务器部署的基本路径时,即在

It happens when a path containing question mark is set as a base path for the web server deployment, i.e. under

  • 网络项目的属性页(Shift + F4)
  • 标签开始选项"
  • 服务器"部分,值为使用自定义服务器"和基本URL"

http://localhost/v8.0/xyz?user=User1是无效路径的示例.原因是构建过程在末尾添加了一个额外的斜杠. 不幸的是,VS在使用旧设置值方面一直很坚持,因此必须在重建之前重新启动它..

An example of an invalid path is http://localhost/v8.0/xyz?user=User1. The reason is that the build process adds an additional slash at the end. Unfortunately VS is quite persistent in using the old setting value, so one has to restart it before rebuilding.

这篇关于Visual Studio构建错误“路径中的非法字符";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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