Repository: godot
Issue: Nuget packages get DLL not found
Labels: topic:dotnet

### Godot version

3.4.2-stable and 3.4.4-stable

### System information

Windows 10

### Issue description

For more information about the problem see the following post.
https://godotengine.org/qa/126026/locating-relevant-versions-different-dllnotfoundexception?show=133954#c133954

```
System.TypeInitializationException: The type initializer for 'NameOfMyGame.ItemSystem' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: e_sqlite3 assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods.sqlite3_libversion_number()
  at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number () [0x00000] in <c8abe0a57b5d47729446d36fda905c02>:0 
  at SQLitePCL.raw.SetProvider (SQLitePCL.ISQLite3Provider imp) [0x00008] in <48e2fc1a816a43c782710c9d5294f283>:0 
  at SQLitePCL.Batteries_V2.Init () [0x00005] in <96e36818db56412d8f718eb231f5f2f7>:0 
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <1400ea11d6fd49d4939be686a9549fb4>:0 
   --- End of inner exception stack trace ---
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00083] in <1400ea11d6fd49d4939be686a9549fb4>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <1400ea11d6fd49d4939be686a9549fb4>:0 
  at Microsoft.Data.Sqlite.Utilities.BundleInitializer.Initialize () [0x0003b] in <5b86b115209b43b592cf8c1857a6ae31>:0 
  at Microsoft.Data.Sqlite.SqliteConnection..cctor () [0x00000] in <5b86b115209b43b592cf8c1857a6ae31>:0 
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
  at NameOfMyGame.ItemSystem.CreateDataBase () [0x0000d] in G:\FancyPath\NameOfMyGame\Code\ItemSystem.cs:44 
  at NameOfMyGame.ItemSystem..ctor () [0x00008] in G:\FancyPath\NameOfMyGame\Code\ItemSystem.cs:22 
  at NameOfMyGame.ItemSystem..cctor () [0x00000] in G:\FancyPath\NameOfMyGame\Code\ItemSystem.cs:15 
   --- End of inner exception stack trace ---
  at NameOfMyGame.Main._Ready () [0x0013e] in G:\FancyPath\NameOfMyGame\Code\Main.cs:144
```

I'm quite sure I had a similar issue with the MS JSONSerializer and I ended up just using the Newtonsoft one.
As a workaround I can place the e_sqlite3.dll in the following directory:
`Godot_v3.4.4-stable_mono_win64\GodotSharp\Mono\bin`

I tried the usual stuff to solve this like nuget restore etc. without any success. I have multiple nuget packages working without any problems, it might be a pattern that the packages that have problems are the MS ones.
A list of the packages that work just fine:
`<PackageReference Include="KdTree" Version="1.4.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="OptimizedPriorityQueue" Version="5.1.0" />
<PackageReference Include="PcgRandom" Version="1.1.0" />`


### Steps to reproduce

1. Create a new Godot Mono project.
2. Add the Microsoft.Data.Sqlite, System.Data.SQLite or a similar package.
3. The project compiles without any problems in Godot/Rider (probably Visual Studio also), but as soon as you run the game and it makes a call to create a database connection you get the dreaded dll not found.

### Minimal reproduction project

_No response_