使用项目根目录中的内容创建文件夹

时间:2022-12-30 00:31:17

I developed a tool that besides DLL requires a strong named folder with 2 files in solution. Using NuGet GUI I created the folder and populated with files, but when I install package, the only DLL created but folder with 2 files are not. How can that be fixed?

我开发了一个工具,除了DLL需要一个强大的命名文件夹,其中包含2个文件。使用NuGet GUI我创建了文件夹并填充了文件,但是当我安装包时,创建了唯一的DLL但没有创建包含2个文件的文件夹。怎么能修好?

1 个解决方案

#1


2  

NuGet has a set of conventions that define certain folders inside the NuGet package that will result in different actions being taken when the package is installed or uninstalled.

NuGet有一组约定,用于定义NuGet包中的某些文件夹,这些文件夹将导致在安装或卸载软件包时采取不同的操作。

In order for folders to be created inside the project, when the NuGet package is installed, the folders need to be inside a Content directory. If you look at the jQuery package, it has a Content\Scripts folder with files inside it. This Scripts folder will be created inside your project, along with its files, when you install the jQuery NuGet package.

为了在项目内创建文件夹,在安装NuGet包时,文件夹需要位于Content目录中。如果你看一下jQuery包,它有一个Content \ Scripts文件夹,里面有文件。当您安装jQuery NuGet包时,将在项目内部创建此Scripts文件夹及其文件。

\Content
     \Scripts
         \jquery-2.1.0.js

#1


2  

NuGet has a set of conventions that define certain folders inside the NuGet package that will result in different actions being taken when the package is installed or uninstalled.

NuGet有一组约定,用于定义NuGet包中的某些文件夹,这些文件夹将导致在安装或卸载软件包时采取不同的操作。

In order for folders to be created inside the project, when the NuGet package is installed, the folders need to be inside a Content directory. If you look at the jQuery package, it has a Content\Scripts folder with files inside it. This Scripts folder will be created inside your project, along with its files, when you install the jQuery NuGet package.

为了在项目内创建文件夹,在安装NuGet包时,文件夹需要位于Content目录中。如果你看一下jQuery包,它有一个Content \ Scripts文件夹,里面有文件。当您安装jQuery NuGet包时,将在项目内部创建此Scripts文件夹及其文件。

\Content
     \Scripts
         \jquery-2.1.0.js

相关文章