How to create NuGet package that add only JavaScript/CSS to web-based project?

前端 未结 2 479
借酒劲吻你
借酒劲吻你 2021-01-17 17:16

I have some NuGet package that contains both DLL file and web related files like JavaScript, Stylesheet and image files. I want to create package that only install web relat

2条回答
  •  暖寄归人
    2021-01-17 17:51

    You probably want to use the Nuget Package Explorer. It allows you to create a package without the command line and add only the required files to your package (plus some easy config).

    If I understand you correctly, you sometimes want to install just the DLL, and sometimes the DLL plus the web stuff. In this case it's best to create a separate package for the DLL, then another package with the web stuff which specifies the DLL package as a dependency of the Web package. This way it will automatically add the DLL when you add the Web content.

    Here's a tutorial on Nuget Package Explorer that will probably help you.

提交回复
热议问题