jasontaylordev / CleanArchitecture

Clean Architecture Solution Template for ASP.NET Core
MIT License
17.06k stars 3.66k forks source link

Why is Infrastructure project is targetting dotnet core 3.1 ? #565

Closed utkarsh24 closed 2 years ago

utkarsh24 commented 2 years ago

Hi, I am using this template using dotnet core 3.1

I observed that Infrastructue project is targeting to .net core 3.1 while Application and Domain projects targeting to dotnetstandard 2.1

https://github.com/jasontaylordev/CleanArchitecture/blob/netcore3.1/src/Application/Application.csproj

Could you please let me know the reason for this?

nibro7778 commented 2 years ago

Right now infrastructure project is targeting .net 6.0 mostly because of EntityFramework

Application & Domain projects are simple class library as it doesn't require any host. Your UI/Presentation layer needs .net 6 as its required web host.

jernejk commented 2 years ago

You're looking at .NET Core 3.1 branch and long story short, .NET Standard 2.1 allows you to use the library in .NET Core and .NET Framework, making it more portable.

EF Core 3.1 didn't initially support .NET Standard and was recommended to be used on .NET Core 3.1 onwards.

Since .NET 5, .NET Standard is no longer useful, unless you need Xamarin or .NET Framework support.