Compiler Error CS1564

 

Updated: July 20, 2015

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

Conflicting options specified: Win32 resource file; Win32 manifest.

If you use the /Win32res compiler option, you must include the custom Win32 manifest (if it is required) in the resource file. You cannot provide a custom Win32 manifest separately from a Win32 resource file. Use the /win32manifest option only if you are not specifying a win32 resource file.

To correct this error

  1. Add the win32 manifest to the win32 resource file and remove the /win32manifest compiler option.

The following example produces CS1564 if it is compiled with the /Win32res option and no manifest is included in the resource file.

// cs1564.cs  
// Compile with: /Win32res  
public class Test  
{  
    static int Main(string[] args)  
    {  
        return 1;  
    }  
}  

The C# 3.0 compiler adds a default win32Manifest to all binaries.

/win32manifest (C# Compiler Options)
/win32res (C# Compiler Options)

Show: