将文件从子文件夹复制到nuspec的根目录 [英] Copy files from a subfolder to root in nuspec

查看:185
本文介绍了将文件从子文件夹复制到nuspec的根目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将一堆文件从特定文件夹复制到nuget包的根目录中.这是我的nuspec文件中的样子:

I'm trying to copy a bunch of files from a specific folder into the root of a nuget package. Here's how it looks in my nuspec file:

<files>
  <file src="dist/product1/**/*.*" />
</files>

我希望将dist/product1下的文件复制到nuget包的根目录,但是所有文件都转到nuget文件中的dist/product1文件夹,这意味着它保留了文件夹结构.我尝试了许多变体.有什么想法吗?

I want the files under dist/product1 be copied to root of nuget package but instead all files go to dist/product1 folder in nuget file, meaning it preserves the folder structure. I tried many variations. Any ideas?

推荐答案

使用NuGet包资源管理器,发现可以使用以下语法.

Using NuGet Package Explorer, I found out that I can use the following syntax.

<files>
  <file src="dist\product1\**\*.*" target="" />
</files>

这篇关于将文件从子文件夹复制到nuspec的根目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆