gpt4 book ai didi

c# - 使用 Azure 门户将 .nupkg 文件上传到我的 Azure 函数

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

我的计算机上有一个 .nupkg 文件,我需要在 Azure 函数中使用该文件。

我目前正在使用 Azure 门户创建我的 Azure 函数,我想知道如何使用我电脑上的 .nupkg 文件安装我的包。

我有一个引用该文件的 function.proj,如下所示:

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="<MY PACKAGE NAME>" Version="<VERSION NUM>" />
</ItemGroup>
</Project>

但是,由于 nuget 包不在网站上,所以它显示“No package exits”

如何上传 .nupkg 文件,以便可以通过 Azure 门户在我的 Azure 函数中使用它。

最佳答案

从我这边复制后,我可以按照以下步骤实现您的要求。我通过 VS Code 的云资源管理器将所需的 dll 和 .proj 文件从本地计算机上传到 Azure 门户,而不是整个 .nuspec 文件。

enter image description here

或者,您可以通过门户网站的 KUDU 控制台拖放 dll。

enter image description here

注意:确保您还向 .proj 文件添加依赖项。

关于c# - 使用 Azure 门户将 .nupkg 文件上传到我的 Azure 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74294887/

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