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
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.
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 :
It happens when a path containing question mark is set as a base path for the web server deployment, i.e. under
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.
If you are facing this problem after pulling from git , then you can follow it:
Step 1:
go to obj\Debug
folder then find yourProject.csproj.FileListAbsolute.txt
file
open it then delete what you found in building the project.
In my case i found ====>Head
problem in building the project.
it followed the above step , and my problem solved.
Step 2:
delete obj folder then rebuild the project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With