gpt4 book ai didi

azure - 使用 Azure 应用服务编辑器安装 Nuget 包

转载 作者:行者123 更新时间:2023-12-03 02:59:40 25 4
gpt4 key购买 nike

我的应用程序托管在 Azure 上,我使用应用服务编辑器进行更改并在云本身上进行构建,而无需在本地使用 Visual Studio。

现在我想将 Nuget 包安装到项目中。因此,我尝试了应用服务编辑器中的控制台选项。但它不起作用,因为控制台窗口无法识别 Nuget 命令。

enter image description here

因此,在查看应用服务编辑器控制台上的帮助命令后,我发现了这些选项 -

    cd              Directory navigation
copy
del
dir
exit Closes the console
git Git source control commanding
help List of available commands
mkdir
move
msbuild MSBuild commanding
node Node.js commanding
npm Node package manager
nuget NuGet commanding
open Open file in editor
ps PowerShell commanding
rd
rename
rmdir
touch Touch a file if it exists or create it otherwise
unzip Unzip archives

Native windows commands (append /? for help):
copy Copy files
del Delete a file
move Move files
rename Rename files
dir Directory browsing
mkdir Create a directory
rmdir Delete a directory

所以似乎有 nuget 命令,但当我使用它时,控制台窗口就卡住了并保持这样。

enter image description here

我使用的命令正确还是似乎有问题?我知道我可以在本地下载并执行此操作,但我正在寻找一种只需使用应用服务编辑器即可执行此操作的方法。请问有什么帮助吗?

最佳答案

尝试

dotnet add package RestSharp --version 106.2.2

你可以检查:

Usage: dotnet add <PROJECT> package [options] <PACKAGE_NAME>

Arguments:
<PROJECT> The project file to operate on. If a file is not specified, the command will search the current directory for one.
<PACKAGE_NAME> The package reference to add.

Options:
-h, --help Show help information.
-v, --version <VERSION> Version for the package to be added.
-f, --framework <FRAMEWORK> Adds reference only when targeting a specific framework.
-n, --no-restore Adds reference without performing restore preview and compatibility check.
-s, --source <SOURCE> Specifies NuGet package sources to use during the restore.
--package-directory <PACKAGE_DIRECTORY> Restores the packages to the specified directory.

关于azure - 使用 Azure 应用服务编辑器安装 Nuget 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50289375/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com