[英]Project 'ClassLibrary1.csproj' targets 'netstandard2.1'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.8'
I have some class library projects in targets netstandard2.1
. 我在目标
netstandard2.1
有一些类库项目。
When I referenced that to my WPF project in target .NET Framework v4.8
, On building time I get an error: 当我在目标
.NET Framework v4.8
引用我的WPF项目时,在构建时出现错误:
Severity Code Description Project File Line Suppression State Error Project '..\\ClassLibrary1\\ClassLibrary1.csproj' targets 'netstandard2.1'.
严重性代码说明项目文件行抑制状态错误项目'.. \\ ClassLibrary1 \\ ClassLibrary1.csproj'目标为'netstandard2.1'。 It cannot be referenced by a project that targets '.NETFramework,Version=v4.8'.
面向'.NETFramework,Version = v4.8'的项目无法引用它。 WpfApp1
WpfApp1
What can I do? 我能做什么?
Update: I read this Q/A about referencing netcoreapp2.1
and in that answer telling about add netstandar2.1
. 更新:我读这个 Q / A有关引用
netcoreapp2.1
在这个问题的答案讲述添加netstandar2.1
。 But my libraries are already in targets netstandard2.1
! 但是我的库已经在目标
netstandard2.1
!
What can I do?
我能做什么?
or 要么
According to the compatibility matrix , my NetFramework 4.8 project should not be able to reference libraries up to NetStandard 2. So the @Henk Holterman
answer is true. 根据兼容性矩阵 ,我的NetFramework 4.8项目应该不能引用NetStandard 2之前的库。因此,
@Henk Holterman
回答是正确的。
The versions listed here represent the rules that NuGet uses to determine whether a given .NET Standard library is applicable. 此处列出的版本代表NuGet用于确定给定.NET标准库是否适用的规则。
.NET Framework will not support .NET Standard 2.1 or any other later version. .NET Framework将不支持.NET Standard 2.1或任何其他更高版本。 For more details, see this blog post .
有关更多详细信息,请参阅此博客文章 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.