我对SQLite.Interop.dll库有问题。我需要使用x64和x86发行版。我还需要将它们都复制到
的输出目录中x64 / SQLite.Interop.dll
和
x86 / SQLite.Interop.dll
分别是文件夹。
我使用以下nuspec文件创建了一个Nuget包:
<?xml version="1.0"?>
<package >
<metadata minClientVersion="2.5">
<id>SQLite.Interop</id>
<version>1.1.18</version>
<authors>SQLite</authors>
<owners>That's me</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>That's for me.</description>
<copyright>Copyright 2018</copyright>
<tags>SQLite Interop ofcMe</tags>
<dependencies>
</dependencies>
</metadata>
<files>
<file src="content\x86\SQLite.Interop.dll" target="content\x86\SQLite.Interop.dll" />
<file src="content\x64\SQLite.Interop.dll" target="content\x64\SQLite.Interop.dll" />
<file src="bin\Debug\x64\SQLite.Interop.dll" target="Build\x64\" />
<file src="bin\Debug\x86\SQLite.Interop.dll" target="Build\x86\" />
<file src="SQLite.Interop.targets" target="Build\" />
</files>
</package>
然后是SQLite.Interop.targets文件:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<None Include="@(MSBuildThisFileDirectory)x64\SQLite.Interop.dll">
<Link>SQLite.Interop.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="@(MSBuildThisFileDirectory)x86\SQLite.Interop.dll">
<Link>SQLite.Interop.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
应用程序构建后如何归档?
答案 0 :(得分:0)
我向在输出目录中需要SQLite.Interop的项目添加了SQLite.Core引用,因为它的nuget包中包含必要的脚本。
我知道这是一种解决方法,但它解决了我的问题,但付出了一些小巧的库引用。