错误:“Microsoft.Azure.WebJobs.Extensions”包与项目“

问题描述 投票:0回答:1

根据这篇 MS doc/文章,在 Visual Studio 2022 中创建了 .NET 6 控制台应用程序。 尚未进行任何修改。

链接给定的 NuGet 包时,我在包管理器控制台中得到这个

error: Package 'Microsoft.Azure.WebJobs.Extensions' is incompatible with 'all' frameworks in project

.csproj:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net6.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

</Project>

这个问题的原因是什么?

此外,我在 Visual Studio 中看不到任何 Azure NuGet 包。

我想在这里更新什么吗?

c# azure console-application nuget-package
1个回答
2
投票

我在 Visual Studio 中看不到任何 Azure NuGet 包。

Tools->Options->Nuget Package Manager->Package Sources
中应该有nuget.org

如果不存在,点击

+
添加
nuget.org
,其来源应该是https://api.nuget.org/v3/index.json如下图:

enter image description here

添加

nuget.org
后,您可以看到所有包并在项目中安装所需的包。

enter image description here

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.