英文:
error: Package 'Microsoft.Azure.WebJobs.Extensions' is incompatible with 'all' frameworks in project '
问题
根据此MS文档/文章,在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包。
我需要在这里更新什么吗?
英文:
Following this MS doc/article, created .NET 6 Console App in Visual Studio 2022.
No Modifications has done yet.
While linking the given NuGet Package, I'm getting this error: Package 'Microsoft.Azure.WebJobs.Extensions' is incompatible with 'all' frameworks in project
in the package manager console.
.csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
What is the cause of this issue?
Also, I cannot see any Azure NuGet Packages in the Visual Studio.
Do I want to update anything here?
答案1
得分: 2
I cannot see any Azure NuGet Packages in the Visual Studio.
在Visual Studio中我看不到任何Azure NuGet包。
There should be nuget.org
in Tools->Options->Nuget Package Manager->Package Sources.
在工具->选项->Nuget包管理器->包源中应该有nuget.org
。
If it doesn't exist, click on +
to add nuget.org
and its source should be https://api.nuget.org/v3/index.json as shown below:
如果不存在,点击+
来添加nuget.org
,其源应为https://api.nuget.org/v3/index.json,如下所示:
一旦添加了nuget.org
,您就可以在项目中看到所有的包并安装所需的包。
英文:
>I cannot see any Azure NuGet Packages in the Visual Studio.
There should be nuget.org
in Tools-> Options -> Nuget Package Manager->Package Sources.
If it doesn't exist, click on +
to add nuget.org
and its source should be https://api.nuget.org/v3/index.json as shown below:
Once you add nuget.org
, you can see all the packages and install the required ones in your project.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论