c# - 错误: Package 'Microsoft.Azure.WebJobs.Extensions' is incompatible with 'all' frameworks in project '

标签 c# azure console-application nuget-package

遵循此 MS doc/article,在 Visual Studio 2022 中创建了 .NET 6 控制台应用程序。 尚未进行任何修改。

链接给定的 NuGet 包时,我在包管理器控制台中收到此错误:包“Microsoft.Azure.WebJobs.Extensions”与项目中的“所有”框架不兼容

.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 包。 enter image description here

我想在这里更新任何内容吗?

最佳答案

I cannot see any Azure NuGet Packages in the Visual Studio.

工具->选项->Nuget包管理器->包源中应该有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

关于c# - 错误: Package 'Microsoft.Azure.WebJobs.Extensions' is incompatible with 'all' frameworks in project ',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76268657/

相关文章:

c# - 使用正则表达式提取匹配文本

azure - IotHubClientTransientException : Transient error occured, 请重试

php - 从另一个运行控制台命令

c# - 通过 Azure Functions 对 Azure AD 中的用户进行身份验证(验证用户名和密码)

c# - 使用别名地址过滤用户 - MS Graph

azure - Aks SecretProviderClass 未找到 secret

Azure Durable Functions - 无法更改任务中心名称以支持并行版本控制

c++ - 如何在输入行上方输出?

symfony - 覆盖默认控制台帮助文本

c# - 使用 DotNetZip 通过响应将 Zip 文件发送到客户端