Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

363
Views
Convert .Net Core to .Net Framework

I have a .Net Core project web project, and for various reasons want to convert it to a .Net Framework project.

Is there an easy way to do this, or do I have to start again and import the code from the previous projects

over 4 years ago · Santiago Trujillo
8 answers
Answer question

0

I have loaded core project to the VS 2017 RC Community and open *.csproj in text editor.

Just delete teg

<RuntimeFrameworkVersion>

and replace

<TargetFramework>netcoreapp1.1</TargetFramework>

to

<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>

And after all in project properties set to any another framework and reset back (VS reload and repair *.csproj file).

over 4 years ago · Santiago Trujillo Report

0

None of the answers here worked for me. In .Net Core 2 the project.json file no longer exists. However, I did solve this problem using the following steps.

1) I removed all nuget packages from my existing project.

2) I created a separate .net core web app project, targeting .net 4.61. This was to get the default nuget packages.

3) I edited the temporary project's .csproj file, copied all the PackageReference nodes inside ItemGroup, and pasted them into my existing projects .csproj file.

4) Edited the TargetFramework node (inside PropertyGroup) from "netstandard2" to "net461"

I had a few package changes to track down and resolve, but otherwise I was able to run.

over 4 years ago · Santiago Trujillo Report

0

There are several steps that you need to do, in order to achieve this.

  1. Firstly right click on the .csproj file and add the following

   <TargetFrameworks>netstandard2.0;netcoreapp2.0;net35;</TargetFrameworks>
        <RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers> <EnableDefaultCompileItems>false</EnableDefaultCompileItems>

  1. Once you have made these changes reload the project and build it.
  2. This will generate the .dll files and Nuget package for this build in the Debug/Release folder of the project.
  3. Add these .dll to the nuget and access these projects from nuget.

Try the above steps. This should work.

over 4 years ago · Santiago Trujillo Report

0

In my version of Visual Studio 2017 (15.6.2) after 'Unloading the Project', right-clicking and selecting 'Edit <your project file>, I had to:

  1. Add the node:

    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>

  2. Delete the nodes:

    <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>

    <TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.16299.0</TargetPlatformVersion>

    <TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>

    <ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

over 4 years ago · Santiago Trujillo Report

0

This worked for me in VS2017:

Start with .net core web project template.

Edit *.csproj so it looks like this:

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net472</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore" Version="2.1.3" />
    <PackageReference Include="Microsoft.AspNetCore.CookiePolicy" Version="2.1.2" />
    <PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.HttpsPolicy" Version="2.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.2" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.1.2" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.RazorPages" Version="2.1.2" />
    <PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.1.1" />
  </ItemGroup>

</Project>

Save and close.

Try running project.

The PackReferences is just the NuGet files, and you can add them through the GUI if the versions are different from mine above.

over 4 years ago · Santiago Trujillo Report

0

My .net standard project is relatively simple with few Nuget packages. I just changed

<TargetFramework>netstandard2.0</TargetFramework>

TO

<TargetFramework>**net461**</TargetFramework> under PropertyGroup section of .csproj file and this did the job for me.. Thanks to Brandon Barkley for your answer in the comments.

over 4 years ago · Santiago Trujillo Report

0

add below in csproj

  <PropertyGroup>
    <TargetFrameworks>netcoreapp2.1;net471</TargetFrameworks>
  </PropertyGroup>
over 4 years ago · Santiago Trujillo Report

0

There's lots of similar answers here, but I didn't see one that was quite what I ended up doing, so I'd like to leave this here just in case someone else is in the same shoes.

Just to be clear, my project was a console program. So, if you're trying to use this answer for something else, your mileage may vary.

In your .csproj file, inside of the <PropertyGroup></PropertyGroup> tag, modify <TargetFramework> to reflect the following:

<TargetFramework>net461</TargetFramework>

Now, in this example, I was using v4.6.1. I can only assume that you'll plug in your version behind the word "net", without the periods. Good luck!

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!