简体   繁体   English

在未安装Visual Studio的计算机上运行nuget.exe

[英]Running nuget.exe on a machine where Visual Studio is not installed

I have a need to create a custom Nuget package from my server that will be used my Octopus to perform some deployment. 我需要从服务器创建一个自定义的Nuget程序包,该程序包将用我的章鱼来执行一些部署。

I have copied the NuGet.exe executable to the server, and I attempt to do the following command there: 我已将NuGet.exe可执行文件复制到服务器,然后尝试在该服务器上执行以下命令:

nuget.exe pack translations.nuspec -NonInteractive

This is only supposed to take some files on the local machine, and pack them into a nupkg file. 这仅应在本地计算机上获取一些文件,然后将它们打包到一个nupkg文件中。 This works as expected on my machine. 这在我的机器上按预期工作。

On the server I get the following message: 在服务器上,我收到以下消息:

Package restore is disabled by default. To give consent, open the Visual Studio
Options dialog, click on Package Manager node and check 'Allow NuGet to download 
missing packages during build.' You can also give consent by setting the 
environment variable 'EnableNuGetPackageRestore' to 'true'.

I have tried setting 'EnableNuGetPackageRestore' to 'true' , but to no avail. 我尝试将'EnableNuGetPackageRestore'设置为'true' ,但无济于事。

Of course I can't check anything in Package Manager node in Visual Studio, since VS is not installed on my server. 当然,我无法在Visual Studio的“程序包管理器”节点中检查任何内容,因为服务器上未安装VS。

Are there anyway to get the NuGet pack to work on my server without Visual Studio installed on it? 无论如何,是否可以在未安装Visual Studio的服务器上使NuGet包正常工作?

Try direct download the nuget installer to the server 尝试将nuget安装程序直接下载到服务器

http://docs.nuget.org/docs/start-here/installing-nuget http://docs.nuget.org/docs/start-here/installing-nuget

instead of copying the NuGet.exe executable file. 而不是复制NuGet.exe可执行文件。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 nuget.exe在哪里? - Where is nuget.exe? Visual Studio生成错误“此版本的NuGet.exe与您正在运行的Windows版本不兼容。” - Visual Studio build error “This version of NuGet.exe is not compatible with the version of Windows you're running.” 有没有办法下载nuget.exe,然后将其离线升级到Visual Studio? - Is there a way to download nuget.exe and then do an offline upgradation into the Visual Studio? 如何下载没有 nuget.exe 或 Visual Studio 扩展的 Nuget 包? - How to download a Nuget package without nuget.exe or Visual Studio extension? 如何使用nuget.exe命令行获取特定Visual Studio解决方案的软件包列表 - How to get list of packages of a particular Visual Studio solution with nuget.exe command line 为什么Visual Studio和nuget.exe不共享相同的库? - Why doesn't Visual Studio and nuget.exe share the same libraries? 如何使我的Visual Studio解决方案在teamcity中使用最新版本的nuget.exe - How to make my visual studio solution use the latest version of nuget.exe in teamcity 如何在Visual Studio中运行作为NuGet软件包安装的wkhtmltopdf(.exe) - How run wkhtmltopdf(.exe) installed as NuGet package in Visual Studio 使用MSBuid.exe编译项目,但未使用nuget软件包安装Visual Studio - Compile project with MSBuid.exe but without visual studio installed using nuget packages 是否有将 nuget.exe 指向特定 NuGet.Config 文件的命令? - Is there a command to point nuget.exe to a specific NuGet.Config file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM