.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

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,179 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jiachen Li-MSFT 32,951 Reputation points Microsoft Vendor
    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.


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.