.NET 5 upgrade

James J 586 Reputation points
2020-12-02T15:35:59.03+00:00

I would like to upgrade .NET framework 4.7.2 to .NET 5. I have good number of libraries for my project. For scenario I have 50 libraries. 35 are legacy libraries and less maintenance involved. 15 libraries are active. So, my plan is to port to .NET 5 for only active libraries. Can I only port the 15 libraries and retain remaining 35 libraries are in .NET framework.

Can you please guide me Is this approach is feasible?

Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,050 questions
{count} votes

Accepted answer
  1. Anna Xiu-MSFT 29,831 Reputation points Microsoft Vendor
    2020-12-03T08:48:50.087+00:00

    Hi @James J ,

    Thank you for reporting it in Microsoft Q&A.

    For your requirement, please try the following code in .csproj file to port to .NET 5.0:

    <?xml version="1.0" encoding="utf-8"?>  
    <Project Sdk="Microsoft.NET.Sdk">  
     <PropertyGroup>  
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>  
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>  
     <ProjectGuid>{5623B94B-4831-4479-9F46-CE995E022094}</ProjectGuid>  
     <OutputType>Exe</OutputType>  
     <RootNamespace>ConsoleApp9</RootNamespace>  
     <AssemblyName>ConsoleApp9</AssemblyName>  
     <TargetFramework>net5.0</TargetFramework>  
     <FileAlignment>512</FileAlignment>  
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>  
     <Deterministic>true</Deterministic>  
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>  
     </PropertyGroup>  
    </Project>  
    

    For more details, you can also refer to the document: Example of migrating to .NET Core 3.1.

    Sincerely,
    Anna

    • If the answer is helpful, please click "Accept Answer" and upvote it.
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.