I'm planning on migrating an old website built in WebForms to a .NET Core web application. But there are a few projects in the solution that are targeting .NET Framework 4.6.2 that are currently being used by the WebForm project. Is it possible to still uses these libraries in a .NET Core web app?
-
What are the libraries?Leonel Sanches da Silva– Leonel Sanches da Silva2019-02-22 22:11:35 +00:00Commented Feb 22, 2019 at 22:11
-
@CiganoMorrisonMendez Theyre .NET Framework Class Libraries.Darth Scitus– Darth Scitus2019-02-22 22:12:15 +00:00Commented Feb 22, 2019 at 22:12
Add a comment
|
1 Answer
You should be able to if your .Net Core project is also targeting the net462 or later Full .NET Framework.
6 Comments
Darth Scitus
How do I ensure that? I apologize a lot of this project level detail is new to me.
jmoerdyk
Read the link I embeded: learn.microsoft.com/en-us/dotnet/standard/…
Darth Scitus
So a .NET Framework Class Library can be used by a .NET Core Web app if the .NET Core project builds for both .net core and .net framework? Do I have that correct?
jmoerdyk
Not both. If you want to use full .NET Framework libraries, you can only target .NET Framework, unless you use multi-targeting and provide alternate implementations of those libraries for the .Net Core targets.
Darth Scitus
I see so I have to change the .NET Core web app to target .netframework instead of .netcore.
|