| Severity | Warning |
| Reported by | PostSharp |
| Message | The module "<Module>" is not ECMA-335 compliant: <Reason>. |
Cause
The ECMA-335 standard defines the format of .NET assemblies. Each module of an assembly has a row in its Module metadata table, which gives the name of the module.
PostSharp reports PS0236 when it reads a module whose Module table gives no name. <Module> is the path of the file, and <Reason> is module name is null. PostSharp then uses the name of the file as the name of the module, and goes on.
Compilers always write the name of the module, so this message means that the assembly, the project itself or one of its references, was produced or modified by a tool that does not comply with the standard, such as an obfuscator or another post-compiler, or that the file is corrupted. No example can show it.
Resolution
- Find the assembly from the path in the message. When it is a reference, check where it comes from: restore the package again, or get a build of the assembly that was not processed by an obfuscator or a rewriting tool.
- When the assembly is the output of your own build, look for a tool that rewrites it before PostSharp runs, and run this tool after PostSharp instead, or update it.
- The warning does not stop the build. When the program works as expected, you can disable the warning with the
PostSharpDisabledMessagesMSBuild property, for example<PostSharpDisabledMessages>PS0236</PostSharpDisabledMessages>. See Well-Known MSBuild Properties.
See Also
Other Resources