Issue 140 in migratordotnet: SQLite.NET startup problem

5 views
Skip to first unread message

codesite...@google.com

unread,
Mar 11, 2010, 9:26:06 AM3/11/10
to migratordo...@googlegroups.com
Status: New
Owner: ----

New issue 140 by it.adviser.ua: SQLite.NET startup problem
http://code.google.com/p/migratordotnet/issues/detail?id=140

--- What steps will reproduce the problem?
1. Download and install ADO.NET 2.0 Provider for SQLite 1.0.65.0
(http://sourceforge.net/projects/sqlite-
dotnet2/files/SQLite%20for%20ADO.NET%202.0/) SQLite.NET 3.6.16 to system.
2. svn checkout http://migratordotnet.googlecode.com/svn/trunk/ or
download migratordotnet 0.8
3. Create any SQLite.NET db with any data
4. Create any migration script
5. Try to run

--- What is the expected output? What do you see instead?
Expected - no errors. Instead - many errors:
Migrator.Console.exe SQLite "Data Source=some_base.db"
MyProject.Migration.dll -trace
System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. --->
System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. ---> System.BadImageFormatException: Could not
load file or assembly 'System.Data.SQLite, Version=1.0.61.0,
Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its
dependencies. An attempt was made to load a program with an incorrect
format.
File name: 'System.Data.SQLite, Version=1.0.61.0, Culture=neutral,
PublicKeyToken=db937bc2d44ff139'
at Migrator.Providers.SQLite.SQLiteTransformationProvider..ctor(Dialect
dialect, String connectionString)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind
failure logging.
To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].

--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeConstructor(Object[] args,
SignatureStruct& signature, IntPtr declaringType)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr,
Binder binder, Object[] args, CultureInfo culture, Object[]
activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at Migrator.Providers.Dialect.NewProviderForDialect(String
connectionString)
in
c:\Work\MyOwn\Job\Svn\JobFinder.WCF\JobFinder.WCF.Database.Migration\lib\mi
gratordotnet-read-only\src\Migrator.Providers\Dialect.cs:line 29
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[]
arguments, SignatureStruct& sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture,
Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invoke

---What version of the product are you using? On what operating system? ---
With what .NET implementation/version?
1. migratordotnet rev 141
2. Windows 7 x64
3. .NET Framework 3.5
4. ADO.NET 2.0 Provider for SQLite 1.0.65.0
5. SQLite.NET 3.6.16


---What database and version are you seeing this issue on?
SQLite.NET 3.6.16

---Please provide any additional information below.
After recompiling migratordotnet with installed ADO.NET 2.0 Provider for
SQLite 1.0.65.0 and SQLite.NET 3.6.16 (System.Data.SQLite.DLL replaced with
newest one) all works fine.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

codesite...@google.com

unread,
Mar 11, 2010, 8:59:38 PM3/11/10
to migratordo...@googlegroups.com

Comment #1 on issue 140 by dima117a: SQLite.NET startup problem
http://code.google.com/p/migratordotnet/issues/detail?id=140

Perhaps the problem is that your version of SQLite does not match your
Windows 7 x64.
Try using a DLL as an attachment to this comment.

Attachments:
System.Data.SQLite.dll 1.0 MB

codesite...@google.com

unread,
Mar 11, 2010, 11:33:46 PM3/11/10
to migratordo...@googlegroups.com

Comment #2 on issue 140 by amolyboha: SQLite.NET startup problem
http://code.google.com/p/migratordotnet/issues/detail?id=140

You mean, that I need to replace System.Data.SQLite.dll to x64 version in
migrator lib
directory and rebuild again?
Yes, I know that this way working fine. But I'am not understand why builded
application
looking into GAC instead of using local corresponding version.

codesite...@google.com

unread,
Mar 12, 2010, 1:22:38 AM3/12/10
to migratordo...@googlegroups.com

Comment #3 on issue 140 by strombringer60k: SQLite.NET startup problem
http://code.google.com/p/migratordotnet/issues/detail?id=140

I think migrator.net is looking for version 1.0.61.0 and you have a
reference to
version 1.0.65.0. I had the same problem and had to put this configuration
block in
my machine.config to resolve it:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Data.SQLite"
publicKeyToken="db937bc2d44ff139"
culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.0.65.0" newVersion="1.0.65.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>

This block usually goes in the app.config of your starting project (if you
have a
WinForms or WPF project) but with the NAnt runner I could only get it to
work with
the machine.config

codesite...@google.com

unread,
Mar 13, 2010, 6:07:48 AM3/13/10
to migratordo...@googlegroups.com

Comment #4 on issue 140 by dima117a: SQLite.NET startup problem
http://code.google.com/p/migratordotnet/issues/detail?id=140

>> but with the NAnt runner I could only get it to work with
the machine.config

these settings can be specified in the App.config for NAnt

codesite...@google.com

unread,
Mar 13, 2010, 6:52:18 AM3/13/10
to migratordo...@googlegroups.com

Comment #5 on issue 140 by strombringer60k: SQLite.NET startup problem
http://code.google.com/p/migratordotnet/issues/detail?id=140

@dima117a: Thanks :)

Reply all
Reply to author
Forward
0 new messages