【发布时间】:2020-06-28 07:44:44
【问题描述】:
问题
System.Data.SQLite的包作者将.dll.config文件打包成默认包含在输出目录中是什么意思(?)NuGet机制, 当同样在文件中添加注释时,您应该不将文件复制到输出目录??
是否可以防止 NuGet/MSBuild/VisualStudio 将所述文件复制到输出目录?
也就是说,是否可以防止将来自nupkg\lib\net46 的“相关”文件复制到输出目录?
详情
System.Data.SQLite.Core NuGet 包包含System.Data.SQLite.dll 文件(除其他外),以及附加文件System.Data.SQLite.xml和System.Data.SQLite.dll.config。
这三个文件位于nupkg 的所有\lib\<framework>\ 文件夹中。
因此,Visual Studio / MSBuild / NuGet 将这些文件复制到输出文件夹:
8> Primary reference "System.Data.SQLite, Version=1.0.111.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139". (TaskId:102)
8> Resolved file path is "c:\...\nuget\System.Data.SQLite.Core.1.0.111.0\lib\net46\System.Data.SQLite.dll". (TaskId:102)
8> Reference found at search path location "{HintPathFromItem}". (TaskId:102)
8> Found related file "c:\...\nuget\System.Data.SQLite.Core.1.0.111.0\lib\net46\System.Data.SQLite.xml". (TaskId:102)
8> Found related file "c:\...\nuget\System.Data.SQLite.Core.1.0.111.0\lib\net46\System.Data.SQLite.dll.config". (TaskId:102)
...
8> c:\kse\nuget\System.Data.SQLite.Core.1.0.111.0\lib\net46\System.Data.SQLite.dll.config
8> CopyLocal=true
8> FusionName=
8> HintPath=c:\...\nuget\System.Data.SQLite.Core.1.0.111.0\lib\net46\System.Data.SQLite.dll
8> OriginalItemSpec=c:\...\nuget\System.Data.SQLite.Core.1.0.111.0\lib\net46\System.Data.SQLite.dll
8> ResolvedFrom={HintPathFromItem}
8> Version=1.0.111.0
但是this file包含免责声明:
* System.Data.SQLite.dll.config - * * WARNING: This XML configuration file is intended for use within the NuGet * package directories only. Please do not copy this file to any of * the build output directories because it could interfere with the * native library pre-loading feature.
--它不应该被复制。那么:我如何不复制它?我应该关心吗?
注意System.Data.SQLite.dll.config seems to be better documented under a different path.
【问题讨论】:
标签: nuget app-config nuget-package-restore system.data.sqlite