You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is https://github.com/AvaloniaUI/avalonia-dotnet-templates/blob/master/templates/csharp/xplat/AvaloniaTest/AvaloniaTest.csproj intentionally targetting .NET standard 2.0 while all platform specific projects target .NET 6.0?
#92
Closed
martin-honnen opened this issue
May 7, 2022
· 2 comments
· Fixed by #107
As the development, after creating a new project based on the template with e.g. dotnet new avalonia.xplat, happens on the main project where I, for instance, then tried to add a NuGet package written for .NET 5, I got a message that the package is not compatible with .NET standard 2.0. I had to edit the main project's TargetFramework before being able to add and use the NuGet package.
I am wondering what the reason is for having the main project use <TargetFramework>netstandard2.0</TargetFramework> although the dedicated projects derived from it all use .NET 6. Is there any advantage to use <TargetFramework>netstandard2.0</TargetFramework>? I think that is not in any way compatible with .NET 6.
The text was updated successfully, but these errors were encountered:
I think that is not in any way compatible with .NET 6.
Of course it is.
There is no problem with using "netstandard2.0" project/package from the "net6.0" project.
And before it was the only one possible way to multitarget, when not everything could use "net6.0" (like, legacy xamarin).
I have tried to use the xplat template and was kind of surprised that the main project https://github.com/AvaloniaUI/avalonia-dotnet-templates/blob/master/templates/csharp/xplat/AvaloniaTest/AvaloniaTest.csproj has
<TargetFramework>netstandard2.0</TargetFramework>
while all the platform specific projects like https://github.com/AvaloniaUI/avalonia-dotnet-templates/blob/master/templates/csharp/xplat/AvaloniaTest.Android/AvaloniaTest.Android.csproj use .NET 6 e.g.<TargetFramework>net6.0-android</TargetFramework>
or https://github.com/AvaloniaUI/avalonia-dotnet-templates/blob/master/templates/csharp/xplat/AvaloniaTest.Desktop/AvaloniaTest.Desktop.csproj has e.g.<TargetFramework>net6.0</TargetFramework>
.As the development, after creating a new project based on the template with e.g.
dotnet new avalonia.xplat
, happens on the main project where I, for instance, then tried to add a NuGet package written for .NET 5, I got a message that the package is not compatible with .NET standard 2.0. I had to edit the main project'sTargetFramework
before being able to add and use the NuGet package.I am wondering what the reason is for having the main project use
<TargetFramework>netstandard2.0</TargetFramework>
although the dedicated projects derived from it all use .NET 6. Is there any advantage to use<TargetFramework>netstandard2.0</TargetFramework>
? I think that is not in any way compatible with .NET 6.The text was updated successfully, but these errors were encountered: