I am working with Codedom, to compile individual Exes with custom icons.
This is the code that I am using to specify the icon file:
string temp;
temp = string.Format("/target:winexe /win32icon:{0}", testico);
cp.CompilerOptions = temp;
testico in this case is a string, specifying where the icon is located.
Now the problem is, the code above only works if there are no spaces in the file path.
Therefore, to allow filepaths with spaces, I modified the code to this:
string temp;
temp = string.Format("/target:winexe /win32icon:\"{0}\"", testico);
cp.CompilerOptions = temp;
Unfortunatly, this does not work.
Any ideas? thanks
Try:
\"/win32icon:{0}\"
The quotes surround the entire argument
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