的recomended解决方案doumented here是建立在System.Data.SQLite.Core.targets.user引用您的包\ System.Data.SQLite.Core.1.0.98.1 \ [这里你的框架版本]建立\含
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ContentSQLiteInteropFiles>true</ContentSQLiteInteropFiles>
<CopySQLiteInteropFiles>false</CopySQLiteInteropFiles>
<CleanSQLiteInteropFiles>false</CleanSQLiteInteropFiles>
<CollectSQLiteInteropFiles>false</CollectSQLiteInteropFiles>
</PropertyGroup>
</Project>
文件夹,但如果你不想在你的包文件夹中添加任何你的源代码控制,您可以直接将以下内容添加到您的项目文件中
<PropertyGroup>
<ContentSQLiteInteropFiles>true</ContentSQLiteInteropFiles>
<CopySQLiteInteropFiles>false</CopySQLiteInteropFiles>
<CleanSQLiteInteropFiles>false</CleanSQLiteInteropFiles>
<CollectSQLiteInteropFiles>false</CollectSQLiteInteropFiles>
</PropertyGroup>
我的本地版本工作正常 - CopySQLiteInteropFiles运行并将文件复制到我机器上的OutDir。但是,在我对TeamCity进行测试期间,相同的构建失败 - 没有找到缺少Interop文件的例外。 在我的proj文件中创建CopySQLiteInteropFiles属性是让TeamCity复制互操作文件的原因。 +1 –
第二种解决方案对我很好。刚刚从nuget获得新版本时不建议中断吗? – quarkonium