4

When I create a website which uses SQL Server Compact/CE 4.0 in private deployment mode then I result in having 2 additional folders inside /bin directory: amd64 and x86 -- which contain the platform specific non-AnyCPU assemblies.

Is this sub folder feature globally available within .NET, is it website specific or even only SQLCE4 specific? And how could I tell? (I already searched System.Data.SqlServerCe.dll using Reflector.)

Johannes Kommer
  • 6,401
  • 1
  • 39
  • 45
springy76
  • 3,706
  • 2
  • 24
  • 46
  • @J.Kommer: I'm not really planning to use sql-server-ce at all -- I would like to use a similar technique against SQLite. – springy76 Nov 08 '11 at 15:16
  • Ah, my bad - in that case I'll undo the tag; [this](http://stackoverflow.com/questions/108971/using-side-by-side-assemblies-to-load-the-x64-or-x32-version-of-a-dll) might be useful to you though! – Johannes Kommer Nov 08 '11 at 15:31
  • I know (and already used) this solution but I'm unable to add a designtime-reference to system.data.sqlite this way. VS2010 (which is x86) always magically finds the amd64 version (even if the project is forced to be x86) and completely ignores the hint path. This results in any WPF window to crash in devenv designer as soon as I just add a reference to System.Data.SQLite. – springy76 Nov 08 '11 at 16:01
  • It is a feature coded in System.Data.SqlServerCe.dll – ErikEJ Nov 08 '11 at 17:37
  • @ErikEJ can you give a hint where to look at inside System.Data.SqlServerCe.dll? – springy76 Nov 09 '11 at 15:07
  • In NativeMethods.cs - LoadNativeBinariesFromPrivateFolder (used by LoadNativeBinaries, which is called from all over the place). – ErikEJ Nov 09 '11 at 19:41

1 Answers1

1

I have disassembled using Reflector, and found the relevant code in In NativeMethods.cs - LoadNativeBinariesFromPrivateFolder (used by LoadNativeBinaries, which is called from all over the place).

ErikEJ
  • 40,951
  • 5
  • 75
  • 115