ich sitze jetzt schon seit wahrscheinlich 4 Stunden da und versuche vergeblich die System.Data.SQLite.dll (v1.0.93.0 32bit Framework 2.0 SP2) in meine .exe einzubinden.
Was ich schon probiert habe:
AssemblyCompressor v2
ILMerge mit /zeroPekind Modus (Normaler Modus geht überhaupt nicht)
In Visual Basic 2010 die DLL einzubinden (Via Ressources)
Nichts davon hat funktioniert, kann es jemand bei sich versuchen und dann eine Schritt-zu-Schritt Anleitung für Doofies posten?
Und ja es ist wichtig das die DLL in der .exe ist.
Hier sind zwei Codes mit denen ich versucht habe die eingebundene DLL zu forcen:
Code:
Option Strict On
Imports System.Reflection
Namespace My
Partial Friend Class MyApplication
Private Sub Form1_Startup(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup
AddHandler AppDomain.CurrentDomain.AssemblyResolve, AddressOf DLLDateiAusResourcesLaden
End Sub
Private Function DLLDateiAusResourcesLaden(ByVal sender As Object, ByVal args As System.ResolveEventArgs) As System.Reflection.Assembly
If args.Name.Contains("System.Data.SQLite") Then
Return System.Reflection.Assembly.Load(My.Resources.System_Data_SQLite)
Else
Return Nothing
End If
End Function
'Private Function LoadDLLFromStream(ByVal sender As Object, ByVal args As System.ResolveEventArgs) As System.Reflection.Assembly
' Using stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("System.Data.SQLite.dll")
' Dim assemblyData(CInt(stream.Length - 1)) As Byte
' stream.Read(assemblyData, 0, assemblyData.Length)
' Return System.Reflection.Assembly.Load(assemblyData)
' End Using
'End Function
End Class
End Namespace
Und ja es ist wichtig das die DLL in der .exe ist.
Dynamic Link Library. Wie zur Hölle möchtest du das bitte statisch in einer .exe einbinden? Das geht nicht einfach so, du meinst eher eine statische Library (.lib), wobei ich da nicht genau weiß wie das bei .NET gehandhabt wird.
Allerdings wird eine DLL immer zur Laufzeit (vom Programm) geladen. Dementsprechend muss das Programm auch für gewöhnlich im selben Ordner sein, wie die benötigten Ressourcen (= DLL), da standardmäßig im Working Directory gesucht wird.
Du solltest das nochmal überdenken.
Quote:
Originally Posted by Jon Skeet
The closest you can come is ILMerge - but do you really need this? Unless you have an application which you can deploy as a single executable, it doesn't much matter whether you have one DLL or ten. I would suggest that for most cases, you should just keep them as normal class libraries.
Note that ILMerge isn't quite the same as "static linking" - it still does the job of bundling all the code into a single file, but the linking process in .NET is fundamentally somewhat different to the one for native code.
[B]Allerdings wird eine DLL immer zur Laufzeit (vom Programm) geladen. Dementsprechend muss das Programm auch für gewöhnlich im selben Ordner sein, wie die benötigten Ressourcen (= DLL), da standardmäßig im Working Directory gesucht wird.
Das kann man verhindern, indem man die DLL zu den Resourcen hinzufügt und dann diese dann in den Memory schreibt (In ApplicationsEvents.vb). Dies geht aber nur mit manchen DLLs.
Teamspeak 3 Server von SQLite auf MySQL umstellen 06/19/2014 - Tutorials - 0 Replies Ob es nun aus Performance Gründen, Qualitätssicherung oder dem Hosting wegen passieren soll - einen Teamspeak 3 Server von SQLite auf MySQL umstellen ist keine schwierige Sache, wenn man die richtige Anleitung dafür hat. Aus diesem Grund biete ich euch hier ein up2date-Tutorial zu diesem Thema. Ich hoffe ich habe alles verständlich erklärt. Wenn nicht - fragt mich über die Kommentar Funktion. Ich antworte meist innerhalb weniger Stunden.
Bevor wir anfangen, ist es natürlich wichtig, dass...
SQLite fix for PBDO 09/15/2012 - DarkOrbit - 4 Replies I'm looking for this file which was on PBDO-Bot board.
[8.7] NaxedOt [Sql & Sqlite] 03/21/2012 - General Gaming Discussion - 1 Replies NaxedOt
litle Update of NaxedOt
Bugs Fixeds
- Dragon corpse not disapear.
- Deathlist Fixed
- Magic Wall Fixed
- some bugs of the map fixeds
SQLite Expert Professional v1.7.57 02/18/2009 - RF Online - 45 Replies the title says it all.
and so i quited RF. if the mods here will say "OK" on my request i will post my SQL progy that i used when im still playing RF including a very handy tut on how to use it.
damn RF:rtfm:. ow well, back to my old stuffs i guess
PS: was caught by LUG on september 2008, was not jailed, they offer me to be one of the staff but then again i refused.
SQLite Database Communication 11/23/2008 - Dekaron - 1 Replies While thumbing through dekaron.exe in WinHex, I noticed that it used a familiar syntax known as SQL. Looking through it more, it appeared to place data inside a database, which makes me wonder...How does it know which database to use, what username to use, and what password to use. Could Dekaron.exe actually hold the information needed to access the 2moons character database?