为静态资产创建nuget包

时间:2021-10-11 19:50:07

I'm exploring creating a Nuget package since I just started dabbling in .Net MVC and I have a custom theme that will be applied to any/all future applications will be built.

我正在探索创建一个Nuget包,因为我刚刚开始涉足.Net MVC,我有一个将应用于任何/所有未来应用程序的自定义主题。

Does it make sense to create a Nuget package with all the static assets that will be needed? I'd prefer to use a package over manually copying files to each individual project since it'd be easier to keep track of what versions are installed.

使用所需的所有静态资产创建Nuget包是否有意义?我更喜欢使用包而不是手动将文件复制到每个单独的项目,因为它更容易跟踪安装的版本。

What do best practices dictate?

最佳实践有哪些要求?

1 个解决方案

#1


1  

I am using the same thing for my project to use my static CSS and JS files and apply them directly to other projects. There are two ways you can do that , one by using the Command line and here's a link for an article from the famous Scott Hanselman Command line version the article is kind of outdated but it will give you an idea about the whole process from the prospective of a master in the field.

我在项目中使用相同的东西来使用我的静态CSS和JS文件,并将它们直接应用到其他项目中。有两种方法可以做到这一点,一种是使用命令行,这里是来自着名的Scott Hanselman Command系列文章的文章的链接,这篇文章有点过时,但它会让你对整个过程有所了解。在该领域的主人。

One other approach (the one i used myself ) is the GUI and here's a link for the instructions i followed: Nuget package GUI

另一种方法(我自己使用的方法)是GUI,这里是我所遵循的指令的链接:Nuget包GUI

#1


1  

I am using the same thing for my project to use my static CSS and JS files and apply them directly to other projects. There are two ways you can do that , one by using the Command line and here's a link for an article from the famous Scott Hanselman Command line version the article is kind of outdated but it will give you an idea about the whole process from the prospective of a master in the field.

我在项目中使用相同的东西来使用我的静态CSS和JS文件,并将它们直接应用到其他项目中。有两种方法可以做到这一点,一种是使用命令行,这里是来自着名的Scott Hanselman Command系列文章的文章的链接,这篇文章有点过时,但它会让你对整个过程有所了解。在该领域的主人。

One other approach (the one i used myself ) is the GUI and here's a link for the instructions i followed: Nuget package GUI

另一种方法(我自己使用的方法)是GUI,这里是我所遵循的指令的链接:Nuget包GUI