admin管理员组

文章数量:1318976

I built a project in Visual Studio 2019 and am trying to work on it in VS 2022. During the build I get this error:

The "Microsoft.Build.Packaging.Pri.Tasks.ExpandPriContent" task could not be loaded from
the assembly C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VisualStudio\v17.0\AppxPackage\\Microsoft.Build.Packaging.Pri.Tasks.dll.
Could not load file or assembly 'file:///C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VisualStudio\v17.0\AppxPackage\Microsoft.Build.Packaging.Pri.Tasks.dll'
or one of its dependencies.
The system cannot find the file specified.
Confirm that the <UsingTask> declaration is correct, that the assembly and
all its dependencies are available, and that the task contains a public class
that implements Microsoft.Build.Framework.ITask.

I have tried many things that do not work like adding <EnableMsixTooling>true</EnableMsixTooling> in the project file. I have tried refreshing the NuGet packages, and looking through the project file. How can I get past this error so I can build the app? Is there an SDK that will resolve this problem?

本文标签: Cannot build vbnet project in Visual Studio 2022 due to errorStack Overflow