.NET assemblies that contain a mixture of managed and unmanaged code cannot be ILMerged with other assemblies.
How can I verify if a given .NET assembly contains purely managed code, or a mix of managed and unmanaged code?
.NET assemblies that contain a mixture of managed and unmanaged code cannot be ILMerged with other assemblies.
How can I verify if a given .NET assembly contains purely managed code, or a mix of managed and unmanaged code?
To get the PE flags from C#, use the System.Reflection API: http://www.example8.com/category/view/id/6027
...
...
Improving on the answer provided above Wim...
Locate your "PEVerify.exe" - you have it if you have VS installed.- COPY THE FULL PATH TO THE PEVerify.exe file, your path will be different - - Here's an example: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\PEVerify.exe
Open Visual Studio Command prompt (don't "Run as Administrator")
Type in:
cd C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools
your command prompt should now be this long text instead of just C:\ or something....it will point to the path of where PEVerify.exe is located.
Now type in:
peverify "your full path to your dll you want to check
- THen Press Enter - Here is my example : peverify "G:\TestFolder\My_Managed_OR_Unmanaged.dll"After you press Enter and you get a message as below, its 100% managed dll - All Classes and Methods in My_Managed_OR_Unmanaged.dll Verified."