Right to the point:
How can my Visual Studio Solution / Project written in .Net 5 successfully compile and run when it references a .Net Core 3.1 NuGet Package?
More Detail
I had a Visual Studio solution with multiple projects. All written in .Net Core 3.1 with the target framework of netcoreapp3.1. See below.
<TargetFramework>netcoreapp3.1</TargetFramework>
I upgraded all of the project to .Net 5, with a target framework of net5.0 See below.
<TargetFramework>net5.0</TargetFramework>
I had to upgrade all of them, even the ones that only have POCO classes. If not, the solution would not compile, which makes sense to me.
My Solution references 2 NuGet packages. Written by another developer in my company. Who is not with us anymore.
One of the packages is written in .Net Standard. I complete understand why I have no problems with that package. It uses the below target framework.
<TargetFramework>netstandard2.1</TargetFramework>
However, the other package is uses target framework netcoreapp3.1. (I have access to the source code.)
My solution complies and runs fine locally. I don't understand how this is possible.
Why did I have to upgrade all of my project within my solutions to .Net 5. But, the package did not have to be upgraded. I was all prepared to upgrade it.
Was it packaged a special way?
Any inside would be helpful.
I am just trying to understand this.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…