1

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?

5
  • well, have you tried it? Commented Feb 28, 2017 at 16:26
  • Switch to VS2017 and test with your own hands. Commented Feb 28, 2017 at 16:29
  • 1
    Take a step back, watch this first mva.microsoft.com/en-US/training-courses/… Commented Feb 28, 2017 at 16:56
  • @ADyson, yes, i did try and i was getting errors. so my conclusion was that its not possible. but then i was reading about it on alot of different places which confused me and i wasnt sure if its impossible or am i doing something wrong. and that is the reason for the question. Commented Mar 1, 2017 at 5:32
  • @Muqueen Khan, thank you very much for videos. Will watch them. Commented Mar 1, 2017 at 5:34

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.