C# Error CS1507 – Cannot link resource files when building a module

C# Error

CS1507 – Cannot link resource files when building a module

Reason for the Error & Solution

Cannot link resource file ‘file’ when building a module

was used in the same compilation with the module option on the , which is not allowed. For example, the following options would generate CS1507:

csc /linkresource:rf.resource /target:module in.cs  

Embedding resources (), however, is allowed.