SA forces my NET 2 project to use NET 4 assemblies

.NET obfuscator and automated error reporting

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

SA forces my NET 2 project to use NET 4 assemblies

Postby danper » Wed Aug 22, 2012 1:10 pm

I have a a DLL project that is built for .NET 2.0.
The project uses 3rd party DLLs (dependencies) that are built for .NET 4.0.
This is perfectly valid and builds with VS 2010.

But after obfuscating the assembly, somehow SA thinks I need .NET 4.0, and replaces the .NET 2.0 references with 4.0 ones.
So when I run it in my app it crashes saying that my DLL wants System.Windows.Forms v4.0 when I have never linked to this .NET assembly.
Also when I open up the DLL in Reflector, it shows references to System.Windows.Forms v4.0, clearly something that SA has added.
This is a bug/incorrect feature in SA and should be corrected in the next version.

Is there a way to force SA to keep my .NET 2.0 assembly references?
danper
 
Posts: 1
Joined: Wed Aug 22, 2012 1:05 pm
Location: India

Postby Simon C » Tue Oct 16, 2012 2:44 pm

Are you merging the .NET 4 dependencies into the main assembly?
Simon C
 
Posts: 140
Joined: Tue Feb 26, 2008 4:56 pm
Location: Red Gate Software


Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 1 guest