I am working on a class library that uses System.Data.SQLite. This class library is intended for both compact and regular .NET 2.0 applications. It is a smart device project because the code should run on the dektop and on mobile devices (http://msdn2.microsoft.com/en-us/magazine/cc163387.aspx). Thus, this project references the CF version of System.Data.SQLite.
The problem is using the shared class library for desktop applications. Of course, the desktop application references the desktop version of System.Data.SQLite. It compiles and deploys fine. But the shared class library still seems to depend on System.Data.SQLite CF: Used in the desktop application, it throws a System.IO.FileLoadException. It says that the assembly System.Data.SQLite (Version=1.0.48.0, Culture=neutral, PublicKeyToken=1fdb50b1b62b4c84) cannot be found. I have learned that the public key token of the desktop version would be db937bc2d44ff139.
So far I did not figure out if its possible to reference the System.Data.SQLite without the dependency to a specific public key token. E.g. I removed this information in the project file but it had no effect:
<Reference Include="System.Data.SQLite">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib-mobile\System.Data.SQLite.DLL</HintPath>
<Private>False</Private>
</Reference>
So, is it possible to just reference System.Data.SQLite with no platform information?
If not, I guess the approach would be to have a desktop and a CF project for each dll/exe that has dependency to System.Data.SQLite.
Best Regards,
Markus