我正在研究一些 Nuget 的东西。我想知道 Nuget 是否适合分发 .exe 命令——或者就此而言 Nuget 是否仅用于引用项目(当然你也可以链接到 exe 而不是 dll——国际研究中心)。显然,我可以轻松创建一个控制台应用程序,然后引用 Nuget 包,但我想知道这是否总是必要的。此外,似乎与 gems 不同,没有 gems 的本地存储库,所以我觉得 .exe(s) 不是 Nuget 包的预期用途,但我不明白为什么需要在此限制它们时尚——或者我错过了什么?
最佳答案
您可以在 NuGet 包中包含可执行程序。来自 Creating and Publishing a Package :
tools - The tools folder of a package is for powershell scripts and programs accessible from the Package Manager Console. After the folder is copied to the target project, it is added to the `$env:Path (PATH) environment variable.
但是,如果您选择这样做,您应该注意以下几点:
关于exe - 真正是 exe 命令的 Nuget 包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9494144/