Red Gate forums :: View topic - SmartAssembly encountered an invalid symbol in mscorlib
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 6
SmartAssembly 6 forum

SmartAssembly encountered an invalid symbol in mscorlib

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
dybalabj



Joined: 06 Oct 2008
Posts: 16

PostPosted: Thu Nov 07, 2013 3:57 pm    Post subject: SmartAssembly encountered an invalid symbol in mscorlib Reply with quote

WARNING: Long post ahead, lots of details Smile

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
Back to top
View user's profile Send private message
jessica.ramos



Joined: 23 Apr 2012
Posts: 231

PostPosted: Fri Nov 08, 2013 9:02 pm    Post subject: Reply with quote

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! Very Happy
_________________
Jessica Ramos
Technical Support
Red Gate Software Ltd.
Back to top
View user's profile Send private message
dybalabj



Joined: 06 Oct 2008
Posts: 16

PostPosted: Fri Nov 08, 2013 9:33 pm    Post subject: Reply with quote

Jessica,

I'll send the DLL and associated project along.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group