Share via

.net6 and .net framework

世云 向 21 Reputation points
2022-12-02T02:47:45.513+00:00

Whether .net6 programs can be compiled as the .NET Framework so that .NET Framework programs can access .NET 6 programs

Developer technologies | .NET | .NET Runtime
0 comments No comments

Answer accepted by question author

Jiachen Li-MSFT 34,241 Reputation points Microsoft External Staff
2022-12-02T07:05:23.167+00:00

Hi @世云 向 ,

so that .NET Framework programs can access .NET 6 programs

What do you mean by "access"?

It is recommended that you update your .NET Framework program to .net6.

If you insist, you can try the following steps. (Remember to back up your project!)

  1. Unload Project.
  2. Edit the csproj file's PropertyGroup.
    <PropertyGroup>  
        <TargetFramework>net472</TargetFramework>  
    </PropertyGroup>  
    
  3. reload the project.
  4. Set the output type.
  5. Add the missing references.
    Best Regards.
    Jiachen Li

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.

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

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