遵循此 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 包。
我想在这里更新任何内容吗?
最佳答案
I cannot see any Azure NuGet Packages in the Visual Studio.
工具->选项->Nuget包管理器->包源中应该有nuget.org
。
如果不存在,请单击+
添加nuget.org
,其来源应为https://api.nuget.org/v3/index.json如下图:
添加 nuget.org
后,您可以查看所有软件包并在项目中安装所需的软件包。
关于c# - 错误: Package 'Microsoft.Azure.WebJobs.Extensions' is incompatible with 'all' frameworks in project ',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76268657/