-
Notifications
You must be signed in to change notification settings - Fork 418
Closed
Labels
area-DeveloperToolsIssues related to authoring (source and IDL), debugging, HotReload, LiveVisualTree, VS integrationIssues related to authoring (source and IDL), debugging, HotReload, LiveVisualTree, VS integrationbugSomething isn't workingSomething isn't working
Description
Describe the bug
Building a blank console application with .NET 6 through dotnet cli dotnet build fails with the following error.
MSBuild version 17.5.0+6f08c67f3 for .NET
Determining projects to restore...
Restored D:\Repos\WindowsAppSDKDotnet\WindowsAppSDKDotnetConsole\WindowsAppSDKDotnetConsole.csproj (in 216 m
s).
C:\Users\user\.nuget\packages\microsoft.windowsappsdk\1.2.230313.1\buildTransitive\MrtCore.PriGen.targets(911,5): e
rror MSB4062: The "Microsoft.Build.Packaging.Pri.Tasks.ExpandPriContent" task could not be loaded from the assembly C:\
Program Files\dotnet\sdk\7.0.202\\Microsoft\VisualStudio\v17.0\AppxPackage\\Microsoft.Build.Packaging.Pri.Tasks.dll. Co
uld not load file or assembly 'C:\Program Files\dotnet\sdk\7.0.202\Microsoft\VisualStudio\v17.0\AppxPackage\Microsoft.B
uild.Packaging.Pri.Tasks.dll'. The system cannot find the path specified. Confirm that the <UsingTask> declaration is c
orrect, that the assembly and all its dependencies are available, and that the task contains a public class that implem
ents Microsoft.Build.Framework.ITask. [D:\Repos\WindowsAppSDKDotnet\WindowsAppSDKDotnetConsole\WindowsAppSDKDo
tnetConsole.csproj]
Build FAILED.
C:\Users\user\.nuget\packages\microsoft.windowsappsdk\1.2.230313.1\buildTransitive\MrtCore.PriGen.targets(911,5): e
rror MSB4062: The "Microsoft.Build.Packaging.Pri.Tasks.ExpandPriContent" task could not be loaded from the assembly C:\
Program Files\dotnet\sdk\7.0.202\\Microsoft\VisualStudio\v17.0\AppxPackage\\Microsoft.Build.Packaging.Pri.Tasks.dll. Co
uld not load file or assembly 'C:\Program Files\dotnet\sdk\7.0.202\Microsoft\VisualStudio\v17.0\AppxPackage\Microsoft.B
uild.Packaging.Pri.Tasks.dll'. The system cannot find the path specified. Confirm that the <UsingTask> declaration is c
orrect, that the assembly and all its dependencies are available, and that the task contains a public class that implem
ents Microsoft.Build.Framework.ITask. [D:\Repos\WindowsAppSDKDotnet\WindowsAppSDKDotnetConsole\WindowsAppSDKDo
tnetConsole.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.38
Note: I tried with both latest and the preview version.
1.2.230313.1
1.3.230228005-preview1
Steps to reproduce the bug
- Create new console application project through visual studio.
- Add WindowsAppSDK nuget package as a dependency.
- Open the location for the project through powershell.
- Build the project through 'dotnet build'.
- The build fails.
Expected behavior
The build succeeds.
Screenshots
No response
NuGet package version
Windows App SDK 1.2.5: 1.2.230313.1
Packaging type
Unpackaged
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-DeveloperToolsIssues related to authoring (source and IDL), debugging, HotReload, LiveVisualTree, VS integrationIssues related to authoring (source and IDL), debugging, HotReload, LiveVisualTree, VS integrationbugSomething isn't workingSomething isn't working