SQLitePCL.raw
SQLitePCL.raw copied to clipboard
Improve .targets files for .NET Framework
- Simplify the .targets files by adding a new
SQLiteNativeLibrariesitem. This also makes it easier if, for some reason, someone wants a reference to the native SQLite libraries in their MSBuild targets (fixes #301) - Add a condition on .NET Framework $(TargetFramework.StartsWith('net4')) because native library loading is handled automatically in .NET Core so we don't want to do extra work and risk to interfere with the .NET Core dll loading system
- Use
Noneinstead ofContent(thus removing Pack=false) and setVisibletofalse(fixes #156)
Note that you should use '$(TargetFrameworkIdentifier)' == '.NETFramework' to test if you're building for the .NET Framework, and this will also work with the old project format.
Also, I didn't really review anything carefully here, but won't that line include all native libraries from all versions of the package that happen to be in the NuGet cache?
<SQLiteNativeLibraries Include="$(MSBuildThisFileDirectory)..\..\**\runtimes\win-*\native\libe_sqlcipher.dylib" />
I always use paths that start with $(MSBuildThisFileDirectory)\..\runtimes in my build scripts.
Closing as outdated.