SmartAssembly encountered an invalid symbol in mscorlib

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, melvyn.harbour, dom.smith

SmartAssembly encountered an invalid symbol in mscorlib

Postby dybalabj » Thu Nov 07, 2013 3:57 pm

WARNING: Long post ahead, lots of details :)

When I process my main application with SmartAssembly 6.8.0.121, I get the following error:

SmartAssembly has encountered an error while running your project.

Failed: SmartAssembly.InformationException: SmartAssembly has encountered an invalid symbol:

[mscorlib]System.Runtime.CompilerServices.ExtensionAttribute

The most likely cause is that SmartAssembly has used a different version of a dependency from the version used by Axciton.exe.

If the details below are wrong, please use the MandatoryPath attribute in the .saproj file to ensure that the correct version of the dependency is found.

Assembly that should contain the missing symbol: C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.0\\Profile\\Client\\mscorlib.dll
Please run SmartAssembly in User-Interface mode for more information.

I get this error when running SA as a postbuild event from VS2010 Pro SP1, or when I use the SA user interface.

I've seen a few forum posts about a similar error, and the solutions involved upgrading SA, but I'm already running the latest version.

I've narrowed it down to one specific dependency on my project. We have a library we built that is a "merged dependency" in the SA project, although this dependency is not obfuscated. When I rebuild this dependency, I get the above error when processing my application. If I exclude this dependency from being merged, I do not get the SA error.

A couple of (admittedly strange) notes about this dependency:
1. A portion of the project is written in IL, and assembled into a binary used a reference.
2. It uses ILDasm to get the IL of the resulting C# binary.
3. It uses a PowerShell script to modify the IL (to use features allowed by the IL, but not in C#)
4. It uses ILAsm to reassemble the modified IL into a new binary.

This is the only dependency that when I rebuild it, I get the above error. It is also the only dependency that uses ILAsm and ILDasm as build events.

The only thing I can think of that changed on my system is I installed the Windows 7.1 SDK. As part of this, I had to uninstall the VC++ 2010 Redist, install the SDK, install a patch for the VC++ compiler, then reinstall the VC++ redist. However, I restored my machine to an earlier backup before this had been done, verified I did NOT get the attribute error, then reinstalled the SDK, and still did not get the error. So I'm at a loss as to what the cause is.

I've also tried reproducing the issue with ONLY the problem dependency and a simple project that includes it, using the same SA project settings as my main project, but I've been unable to reproduce it. Due to confidentiality concerns, I cannot provide the main application for troubleshooting, but I can provide the problem dependency if needed.

Thanks,

Brandon
dybalabj
 
Posts: 16
Joined: Mon Oct 06, 2008 5:08 pm

Postby jessica.ramos » Fri Nov 08, 2013 9:02 pm

Hi Brandon,

I've just shot you an email about this, but if you can send us the problematic DLL to analyze that will be great! :D
Jessica Ramos
Technical Support
Red Gate Software Ltd.
jessica.ramos
 
Posts: 235
Joined: Mon Apr 23, 2012 1:13 pm

Postby dybalabj » Fri Nov 08, 2013 9:33 pm

Jessica,

I'll send the DLL and associated project along.
dybalabj
 
Posts: 16
Joined: Mon Oct 06, 2008 5:08 pm


Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 0 guests