Red Gate forums :: View topic - Mixed-mode error with System.Data.SQLite
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

Mixed-mode error with System.Data.SQLite

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



Joined: 31 Jan 2012
Posts: 1

PostPosted: Tue Jan 31, 2012 1:35 pm    Post subject: Mixed-mode error with System.Data.SQLite Reply with quote

I have a project built on .NET 4 (full, not client profile) comprising three class libraries and a main application. Several of the class libraries reference System.Data.SQLite (1.0.66), which is built against .NET 2.0.50727. All the class libraries and the main program have the useV2LegacyRuntimeActivationPolicy enabled in their app.config files and everything works fine before applying SA (I'm using 6.5.2.21).

I am currently not obfuscating or pruning or embedding - I just want error reporting for my internal deployment testing.

Whenever I run the postprocessed version of the assembly one of the class libraries throws the 'Mixed-mode assembly is built against 'v2.0.50727' of the runtime and cannot be loaded without additional configuration information' error. The fusion log shows that it is unable to load System.Data.SQLite.dll :

*** Assembly Binder Log Entry (31/01/2012 @ 12:31:59) ***

The operation failed.
Bind result: hr = 0x80004005. Unspecified error

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Users\nickharmer\Documents\Visual Studio 2010\Projects\ILFRA\CEASRClient\bin\Release\CEASR_SA.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = OLDNICK\nickharmer
LOG: DisplayName = System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139
(Fully-specified)
LOG: Appbase = file:///C:/Users/nickharmer/Documents/Visual Studio 2010/Projects/ILFRA/CEASRClient/bin/Release/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = CEASR_SA.exe
Calling assembly : ForensicExhibits, Version=1.1.1.38, Culture=neutral, PublicKeyToken=443f8a80a0a83fe8.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Users/nickharmer/Documents/Visual Studio 2010/Projects/ILFRA/CEASRClient/bin/Release/System.Data.SQLite.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:\Users\nickharmer\Documents\Visual Studio 2010\Projects\ILFRA\CEASRClient\bin\Release\System.Data.SQLite.dll
LOG: Entering run-from-source setup phase.
LOG: Assembly Name is: System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139
LOG: Binding succeeds. Returns assembly from C:\Users\nickharmer\Documents\Visual Studio 2010\Projects\ILFRA\CEASRClient\bin\Release\System.Data.SQLite.dll.
LOG: Assembly is loaded in default load context.
ERR: Rejecting IJW module built against v2.0.50727 because it could be loaded into another runtime in this process.

Why does SA seem to be discarding my legacy runtime activation policy and how can I fix it?

Regards

Nick Harmer
Back to top
View user's profile Send private message
james.davies



Joined: 19 Apr 2011
Posts: 46

PostPosted: Wed Feb 01, 2012 3:18 pm    Post subject: Reply with quote

Hi,

Please try upgrading to v6.6.
The release notes ( http://www.red-gate.com/supportcenter/Content/SmartAssembly/articles/version_6xx_SmartAssembly) explain there has been a bug fixed (where attributes were being removed during processing even with no features used).

If this bug was removing the useLegacyV2RuntimeActivationPolicy attribute then that would explain the problem.
_________________
Thanks,
James Davies
Technical Support Engineer
Red Gate Software
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