Search code examples
vb.netmsbuild

msbuild error with /win32icon parameter in vbc.exe


I try to compile a project with msbuild.exe

I have this error:

vbc : error BC30136: Error creating Win32 resources: Error reading icon '"Recycle Bin Empty.ico"' -- The filename, directory name, or volume label syntax is incorrect.

This icon is the Application icon which is in the same directory of the project.

vbc is started with /win32icon:"Recycle Bin Empty.ico" parameter. Don't know why MSBuild can't reach the file.


Solution

  • Couple of things to try

    • Remove the spaces in the file name. Will eliminate any quoting issues
    • Pass the fully qualified path to the file name. Will eliminate any relative path issues