I cannot believe that I am the first person ever to encounter the following error:
MSB3095: Invalid argument. Illegal characters in path.
[Update] As Tom pointed out in the comments, this issue is directly related to the encoding of my *.refresh file. Thanks Tom.
I searched Google and other search engines with no success. I found "MSB3095: Invalid Argument", and I found "Illegal characters in path.", but never in the same place.
I did not actually resolve the issue; I was able to work around it. I have a website project that references some local projects as well as a couple of third party libraries. I use *.refresh files to guarantee I get the latest version of the libraries from my dependencies folder.
Recently, I put together a library of extension methods and added it to my dependencies folder. I added a new *.refresh file to my website. Everything compiles fine on my desktop. When I committed the changes, the build server responded with the MSB3095 error and failed compilation.
I remembered that I am using the extensions library in other projects with a direct reference. It turns out I didn't need the *.refresh file at all. The reference to my new library was inferred.
After removing the *.refresh file, the build server compiled the website without issue.
I still feel a little uncertain about this resolution. I am using other refresh files. What was wrong with this one? I checked the path inside it and there was no problem with it. The only thing I can imagine (though I have not tested) is that it may have something to do with my library having extra dots (.) in the name. e.g. MyCompany.Extensions.dll.refresh
If I discover something new I will update this post.