2
Vote

Illegal characters in path.

description

I've been trying all day to get Linq to Xsd to work. But all I receive is "Illegal characters in path." message.
 
The error seems to appear when using $(ProjectDir) and $(SolutionDir) so I tried using C:\LinqToXsd. Which allowed me to reload project successfully.
 
But when trying to build i get error:
C:\LinqToXsd\LinqToXsd.targets(29,5): error MSB6001: Invalid command line switch for "LinqToXsd.exe". Illegal characters in path.
 
I've even tried to change all references in LinqToXsd.targets to use C:\LinqToXsd without success.
 
Please help me, I would really like to use this

comments

JVennix wrote Mar 9, 2011 at 6:33 AM

You probably have some weird characters in your $ProjectDir or $SolutionDir variables. I would have another look at that.

boitiste wrote May 3, 2011 at 12:43 PM

I had the same problem and the fix is quite easy. Just remove all "return" characters in the "LinqToXsdBinDir" tag's value. That sounds obvious but Visual Studio autoindent copy/paste text !

chiragbhagat wrote Jun 28, 2012 at 4:27 PM

I had the same issue. I ran the command manually several times and found that output path should not end with "\" character (parameter -o:<path>). I removed last slash and it worked for me.