Nuget包自定义Visual Studio目标文件夹

时间:2022-11-02 15:38:34

This is an issue I am having with most js/css nuget packages but I'll use JQuery as an example here.

这是我与大多数js / css nuget包有关的问题,但我将在这里使用JQuery作为示例。

When I install the nuget package for JQuery, it installs the JQuery js file(s) into the "Scripts" folder in the solution.

当我为JQuery安装nuget包时,它会将JQuery js文件安装到解决方案的“Scripts”文件夹中。

I have a custom folder (~/Assets/Js) that I want them to go into for better organization.

我有一个自定义文件夹(〜/ Assets / Js),我希望他们进入更好的组织。

Obviously I can drag them into that folder and rearrange them manually but its annoying having to do that every time I update or install a new nuget package.

显然我可以将它们拖动到该文件夹​​中并手动重新排列它们,但每次更新或安装新的nuget包时都必须这样做。

Is there a way for me to specify a custom nuget destination folder for a package?

有没有办法为包指定自定义nuget目标文件夹?

Thanks in advance!

提前致谢!

1 个解决方案

#1


1  

No,

没有,

without changing the package before installing, you can't change that destination.

在安装之前不更改软件包,您无法更改该目标。

It's a choice made by the developer of the package.

这是包的开发者做出的选择。

If you want a wild idea for a solution, download the code for the Nugget manager and add custom code for

如果您想要一个解决方案的想法,请下载Nugget管理器的代码并添加自定义代码

your development environment ( but this is overkill for your annoyance...)

你的开发环境(但这对你的烦恼来说太过分了......)

JQuery is open source.

JQuery是开源的。

--> Maybe propose a change to the guys who maintain JQuery...

- >或许建议改变维护JQuery的人...

#1


1  

No,

没有,

without changing the package before installing, you can't change that destination.

在安装之前不更改软件包,您无法更改该目标。

It's a choice made by the developer of the package.

这是包的开发者做出的选择。

If you want a wild idea for a solution, download the code for the Nugget manager and add custom code for

如果您想要一个解决方案的想法,请下载Nugget管理器的代码并添加自定义代码

your development environment ( but this is overkill for your annoyance...)

你的开发环境(但这对你的烦恼来说太过分了......)

JQuery is open source.

JQuery是开源的。

--> Maybe propose a change to the guys who maintain JQuery...

- >或许建议改变维护JQuery的人...