I created a "Console App (.NET Core)" project in Visual Studio. Now I need to add a dependency that only works on .NET Framework 4.6+, not .NET Core.
Is there a way to convert my project to a full .NET Framework project?
Here's what I've tried:
I went to the project properties and attempted to change the project framework, but I don't see the option I need in the dropdown:
If I click "Install other frameworks..." I'm taken to a page that says .NET Framework versions are included in Visual Studio 2017 -- which is exactly what I'm using to edit this project. This is where I got stuck.
In order to run ASP.NET Core Apps on the . NET Framework it needs to only reference . Core NuGet packages which contains only the . NET Standard 2.0 builds.
NET Framework is a platform for . NET applications on Windows whereas, NET Core is the latest version of the . NET Framework which is a cross-platform and open-source framework optimized for modern app needs and developer workflows.
If you're happy with it still using the new tooling, the easiest approach is probably just to edit the project file (csproj). Right-click on the project in Solution Explorer and you should have a context menu option of "Edit <yourproject>.csproj". Click on that, and just change
<TargetFramework>netcoreapp1.1</TargetFramework>
to
<TargetFramework>net46</TargetFramework>
... and I suspect you'll be good to go. (It may confuse VS for a little while as it restores appropriate packages etc.)
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