microsoft / microsoft/WindowsAppSDK
error MSB6003: The specified task executable "MakePri.exe" could not be run. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Utilities.Internal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 471
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 28
Description
### Describe the bug
Almost the same as #4777 , happens occasionally when I update the wasdk nuget to a newer version.
Build log:
```
1>ListViewSelectedIndex-WinUI.vcxproj -> D:\WinUI-Bug\19-ListViewSelectedIndex\x64\Debug\ListViewSelectedIndex-WinUI\ListViewSelectedIndex_WinUI.exe
1>D:\WinUI-Bug\19-ListViewSelectedIndex\packages\Microsoft.WindowsAppSDK.1.6.240923002\build\Microsoft.Build.Msix.Pri.targets(304,5): error MSB6003: The specified task executable "MakePri.exe" could not be run. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Utilities.Internal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
1>D:\WinUI-Bug\19-ListViewSelectedIndex\packages\Microsoft.WindowsAppSDK.1.6.240923002\build\Microsoft.Build.Msix.Pri.targets(304,5): error MSB6003: File name: 'Microsoft.VisualStudio.Utilities.Internal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
1>D:\WinUI-Bug\19-ListViewSelectedIndex\packages\Microsoft.WindowsAppSDK.1.6.240923002\build\Microsoft.Build.Msix.Pri.targets(304,5): error MSB6003: at Microsoft.VisualStudio.Telemetry.TelemetrySessionInitializer.BuildInitializer(TelemetrySessionSettings telemetrySessionSettings)
1>D:\WinUI-Bug\19-ListViewSelectedIndex\packages\Microsoft.WindowsAppSDK.1.6.240923002\build\Microsoft.Build.Msix.Pri.targets(304,5): error MSB6003: at Microsoft.VisualStudio.Telemetry.TelemetryService.get_DefaultSession()
1>D:\WinUI-Bug\19-ListViewSelectedIndex\packages\Microsoft.WindowsAppSDK.1.6.240923002\build\Microsoft.Build.Msix.Pri.targets(304,5): error MSB6003: at Microsoft.Build.Msix.Telemetry.CreateTelemetrySession(String vsTelemetrySession)
1>D:\WinUI-Bug\19-ListViewSelectedIndex\packages\Microsoft.WindowsAppSDK.1.6.240923002\build\Microsoft.Build.Msix.Pri.targets(304,5): error MSB6003: at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
1>D:\WinUI-Bug\19-ListViewSelectedIndex\packages\Microsoft.WindowsAppSDK.1.6.240923002\build\Microsoft.Build.Msix.Pri.targets(304,5): error MSB6003: at Microsoft.Build.Msix.TelemetryOperation..ctor(String vsTelemetrySession, String eventNameSuffix)
1>D:\WinUI-Bug\19-ListViewSelectedIndex\packages\Microsoft.WindowsAppSDK.1.6.240923002\build\Microsoft.Build.Msix.Pri.targets(304,5): error MSB6003: at Microsoft.Build.Msix.Pri.WinAppSdkGenerateProjectPriFile.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands)
1>D:\WinUI-Bug\19-ListViewSelectedIndex\packages\Microsoft.WindowsAppSDK.1.6.240923002\build\Microsoft.Build.Msix.Pri.targets(304,5): error MSB6003: at Microsoft.Build.Utilities.ToolTask.Execute()
1>D:\WinUI-Bug\19-ListViewSelectedIndex\packages\Microsoft.WindowsAppSDK.1.6.240923002\build\Microsoft.Build.Msix.Pri.targets(304,5): error MSB6003:
1>D:\WinUI-Bug\19-ListViewSelectedIndex\packages\Microsoft.WindowsAppSDK.1.6.240923002\build\Microsoft.Build.Msix.Pri.targets(304,5): error MSB6003: WRN: Assembly binding logging is turned OFF.
1>D:\WinUI-Bug\19-ListViewSelectedIndex\packages\Microsoft.WindowsAppSDK.1.6.240923002\build\Microsoft.Build.Msix.Pri.targets(304,5): error MSB6003: To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
1>D:\WinUI-Bug\19-ListViewSelectedIndex\packages\Microsoft.WindowsAppSDK.1.6.240923002\build\Microsoft.Build.Msix.Pri.targets(304,5): error MSB6003: Note: There is some performance penalty associated with assembly bind failure logging.
1>D:\WinUI-Bug\19-ListViewSelectedIndex\packages\Microsoft.WindowsAppSDK.1.6.240923002\build\Microsoft.Build.Msix.Pri.targets(304,5): error MSB6003: To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
1>D:\WinUI-Bug\19-ListViewSelectedIndex\packages\Microsoft.WindowsAppSDK.1.6.240923002\build\Microsoft.Build.Msix.Pri.targets(304,5): error MSB6003:
1>Done building project "ListViewSelectedIndex-WinUI.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 2:23 and took 01.327 seconds ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
========== Deploy completed at 2:23 and took 01.327 seconds ==========
```
### Steps to reproduce the bug
1. Create a packaged winui3 app (C++)
2. Build once.
3. Upgrade the wasdk package to a newer version.
4. Build again.
### Expected behavior
_No response_
### Screenshots

### NuGet package version
Windows App SDK 1.6.1: 1.6.240923002
### Packaging type
Packaged (MSIX)
### Windows version
_No response_
### IDE
Visual Studio 2022
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the packaged C++ WinUI 3 build after upgrading the Windows App SDK package, then inspect Microsoft.Build.Msix.Pri.targets at line 304 and the MakePri.exe assembly-loading failure. Compare the first and subsequent builds; done means the upgraded package builds successfully without the MSB6003 or missing Microsoft.VisualStudio.Utilities.Internal error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100