"Target Framework not supported" error on opening a project of custom type - VS2022

Sajith 6 Reputation points
2023-08-01T16:08:33.7133333+00:00

We have an extension for Visual Studio that provides a custom project type implemented using MPF -

https://github.com/tunnelvisionlabs/MPFProj10

This project type that our extension provides used to work fine till VS2019.

In VS2022 also creating projects of this type and other project features work fine after installing the extension, but in some machines gives following issue -

  1. Create a project of this custom type
  2. Close solution and then reopen the project. Shows "Target framework not supported error"-

User's image

  1. Nowhere in project template or project file we have specified target as .NET Framework 4.0
  2. Also .NET Framework 4.0 is already installed in the machine.
  3. .NET Framework 4.8 is also installed
  4. If we select "Update the target to .NET Framework 4.8" in the prompt above, there is no update to the project file, no error shown but the project is shown as unloaded in solution.
  5. So there is no way to open the project.

It works the first time (on creating a new project of this type). It is only when we close and reopen the project, get this error.

Any pointers on what could be the issue and how to resolve this would be of great help.

Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
160 questions
{count} vote