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?
You can only have one version of . Net Framework side by side with any number of . Net (Core) versions.
NET Core installations are completely independent from the version of . NET Framework. In fact, you can actually install multiple version of . NET Core side-by-side on the same machine (unlike .
Net Core does not support desktop application development and it rather focuses on the web, windows mobile, and windows store. . Net Framework is used for the development of both desktop and web applications as well as it supports windows forms and WPF applications.
NET Framework 4.5 and later versions are backward-compatible with apps that were built with earlier versions of the . NET Framework. In other words, apps and components built with previous versions will work without modification on the . NET Framework 4.5 and later versions.
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:
Replace existing projects with a multi-targeted .NET Core project.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With