Visual Studio build error "Illegal characters in the path"

When I try to create 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 information, even if the verbosity assembly is installed for diagnostics. I tried to delete all the temporary files that I could find in order to restart everything I could. I even checked my entire svn folder from scratch and rebuilt .. the error is still there. Then, quite by accident, the error disappeared. Now, about a day later, he was back.

  • Have you ever experienced this kind of behavior? Maybe this is a VS error?
  • Is there a way to increase the verbosity of the website verification step so that I can see more error information?
+4
source share
7 answers

After hours of troubleshooting, I tried to debug the visual studio using another instance and go into the internal exception space. As a result, I found the actual cause of the error:

This happens when the path containing the question mark is set as the base path for deploying the web server, i.e. in

  • web project property pages (Shift + F4)
  • Launch Options Tab
  • "Server" section, value "Use custom server" with "Base URL"

An example of an invalid path is http://localhost/v8.0/xyz?user=User1 . The reason is because the build process adds an extra slash at the end. Unfortunately, VS is pretty stable in using the old parameter value, so it needs to be rebooted before rebuilding .

+4
source

Possible solution (found here , Russian):

  • Create a folder with a simple and latin path - for example, c: \ Temp
  • (Assuming you are using Win7) go to Control Panel-> System-> Advanced System Settings-> Advanced-> Environment Variables
  • Change the variables "TMP" and "TEMP" in "% USERPROFILE% \ AppData \ Local \ Temp" to "C: \ Temp" and click OK in all open dialogs
  • Restart Visual Studio
+2
source

In my case, move the solution a short way and use Latin characters. Example:

 C:/Projects/MyProject/ 
+1
source

I had the same issue with Visual Studio Community 2013, with Windows 8.1 (Brazilian Portuguese). Changing the variables "TMP" and "TEMP" is great for me.

+1
source

If you encounter this problem after pulling from git, you can monitor it:

Step 1:

go to the obj\Debug folder, then find yourProject.csproj.FileListAbsolute.txt file, open it, then delete what you found when creating the project. In my case, I found ====>Head problem when building a project. he followed the above step and my problem is resolved.

Step 2:

delete the obj folder and then rebuild the project.

+1
source

I encountered the same error in VS 2013. The problem for me was in the project properties -> Web (tab) is ProjectUrl. it pointed to the wrong url

0
source

I encountered the same symptoms as in VS2015 Update 2 while working with the WIX installer. I uploaded the .wixproj file, edited it and tried to reload. VS claimed that in some way there was an illegal character. Information on the whereabouts of an illegal nature was not provided.

I discarded my changes and tried again to restart the project. Same problem. I found that I had to close the solution and reopen it before the project reloaded. Or just restart Visual Studio.

0
source

Source: https://habr.com/ru/post/1395777/


All Articles