C # command line compiler

cmdev

Newcomer
Joined
Oct 16, 2003
Messages
5
Hello All,
I am trying to compile my c# code to a directory that has spaces in it. The compiler doesn't like it when I specify a directory with spaces, I have tried everything. Any thoughts?

I have tired the following with no luck
csc.exe /out:Hello World/hello.world.dll /target:libarary *.cs
csc.exe /out:"Hello World/hello.world.dll" /target:library *.cs
csc.exe /out:'Hello World'/hello.world.dll' /target:library *.cs

I get an error similar to:
error CS1619: Cannot create temporary file 'd:\Build\test\Hello World\-- The directory name is invalid.

Thanks for any help

CMDev
 
When specifying a path that contains spaces, the entire path needs to be enclosed in double quotes.

csc.exe /out:"Hello World/hello.world.dll" /target:libarary *.cs
 
THanks all, I was just about to reply with the same solution. I just didn't try all the combination

thanks again
 
Back
Top