简体   繁体   中英

Is it bad practice to include .exe files in a Nuget package?

First of all, I would like to clarify that I'm coming from a Java/Maven background.

I am managing Nexus and we have a team that are developing in .NET who are asking whether they can store exe files in Nexus under a Nuget repository. As this is not possible (and exe -s are not really artifacts as in "archives"), are Nuget packages a reasonable place to store exe -s? I would personally say "no", as, in my opinion, Nuget packages are supposed to just contain libraries and other resources, but as I'm not a .NET developer myself, I'd like to find out what the best practices are.

are Nuget packages a reasonable place to store exe-s?

If it's a tool, then yes . There are several good examples where Nuget is an excellent place to store exe-files.

For example:

The nuget package dotless has a tool (standalone exe), which is a compiler for CSS-files. This enables us to use that tool in our (TFS-) build server without installing any third party software on the build server.

But other than that, I agree with you. A Nuget-package is mainly for libraries and other resources that will be references in the project. But it's after all just a platform for spreading code between developers and different teams.

Or as Nuget puts it:

No matter what your package does or what code it contains, NuGet is how you package that functionality into a component that can be shared with and used by any number of other developers.

如果您的nuget包的目的是部署可执行程序,那么确保您可以在那里存储exe - 毕竟还有其他选项!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM