.Net Framework and .Net Core in same solution

24,646

There is an article published in April 2017 on how to support both runtimes from the same solution:

https://docs.microsoft.com/en-us/dotnet/core/porting/project-structure

It boils down to 2 methods:

  • Having both frameworks configured in the same project (e.g. *.csproj):

Replace existing projects with a multi-targeted .NET Core project.

  • Having a separate project for each framework:

Keep existing projects and create a .NET Core project.


We are actively discussing which way to go in pythonnet, since the project supports .NET Framework on Windows and Mono on Linux/OSX. Now we are adding cross-platform pythonnet support:

https://github.com/pythonnet/pythonnet/pull/518

Share:
24,646
Admin
Author by

Admin

Updated on July 18, 2022

Comments

  • Admin
    Admin almost 2 years

    I have an application targeting .NET Framework, and now I need to develop a library in .NET Core. I plan to put both projects in the same solution and add the .NET Core library as a reference in the .NET Framework project.

    Can this be done? If the answer is yes, how can this be done?