[英]Running nuget.exe on a machine where Visual Studio is not installed
我需要從服務器創建一個自定義的Nuget程序包,該程序包將用我的章魚來執行一些部署。
我已將NuGet.exe可執行文件復制到服務器,然后嘗試在該服務器上執行以下命令:
nuget.exe pack translations.nuspec -NonInteractive
這僅應在本地計算機上獲取一些文件,然后將它們打包到一個nupkg文件中。 這在我的機器上按預期工作。
在服務器上,我收到以下消息:
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'.
我嘗試將'EnableNuGetPackageRestore'
設置為'true'
,但無濟於事。
當然,我無法在Visual Studio的“程序包管理器”節點中檢查任何內容,因為服務器上未安裝VS。
無論如何,是否可以在未安裝Visual Studio的服務器上使NuGet包正常工作?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.