nuget - 将 nuget 包的内容文件复制到输出目录
问题描述
所以最近我更改了我的项目的 .csproj 以移动到包引用,而不是使用 app.config。
以前,在 app.config 中有对 IronPython nuget 包的引用,在 csproj 中有以下引用。
> <Content
> Include="..\packages\IronPython.StdLib.2.7.8.1\contentFiles\any\any\Lib\**\*.*">
> <Link>pythonlib\%(RecursiveDir)%(Filename)%(Extension)</Link>
> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content>
它工作正常并将文件复制到输出目录。
现在转到包参考,我添加了以下行并从 app.config 中删除了 IronPython。
<ItemGroup> <PackageReference Include="IronPython.StdLib"> <Version>2.7.8.1</Version> </PackageReference> </ItemGroup>
但是“..\packages\IronPython.StdLib.2.7.8.1”中的内容文件不再复制到输出目录。我该如何纠正这个问题?有任何想法吗。谢谢
解决方案
推荐阅读
- android - 在导航栏上方显示一行
- python - 如何修复 django 中的 CharField 属性错误?
- python - 如何使用 face_recognition 动态调用已知面孔名称
- python - 如何在 django 管理界面中更改默认字体?
- python - 如何获取 Slack API 的用户令牌
- javascript - 如何在javascript中延迟以前绑定的事件?
- mysql - 访问函数外的类
- macos - macOS - 将目录中找到的所有特定文件名复制到另一个目录
- php - 带递归的 PDO 查询
- django - 清理表单和访问 self.instance.user 时的 Django RelatedObjectDoesNotExist