tlt
tlt

Reputation: 15221

.net framework 4.6 class library in asp.net core project running on .net core

I've started learning .net core and one thing is pretty confusing to me. I understand asp.net core can be ran on top of either .net core or .net full framework.

But, what i can't find clear answer about is if i can have asp.net core project running on .net core framework but then within that asp.net core project include/reference/use class library that is .net 4.6?

Upvotes: 1

Views: 505

Answers (1)

RonC
RonC

Reputation: 33791

By definition, if you have a reference to a .net 4.6 library then you are not running asp.net core purely on .net core. Your are running it on the .Net full framework.

If you are using Visual Studio and you told it that you want to target the .Net Core Framework rather than the full framework, I don't think it will let you compile with a reference to a library that uses .net 4.6. Because when you tell VS that you are targeting .net core rather than full framework you are telling it you want to produce code that can run cross platform and if it allows you to have a reference to a .net 4.6 library then your solution will not be cross platform.

Upvotes: 3

Related Questions