I recently switched to a new Tier 1 machine and VS 2022 for my F&O development. After pulling down all items in version control I received the following error:
The imported project "C:\Program Files (x86)\MSBuild\Microsoft\Dynamics\AX\Microsoft.Dynamics.Framework.Tools.BuildTasks.targets" was not found.
The fix for this was relatively easy. Open the project file in Notepad++ (Or another text editor) and change this line:
<Import Project="$(BuildTasksDirectory)\Microsoft.Dynamics.Framework.Tools.BuildTasks.targets" />
To this:
<Import Project="$(BuildTasksDirectory)\Microsoft.Dynamics.Framework.Tools.BuildTasks.17.0.targets" />