microsoft / microsoft/WindowsAppSDK

Missing symbols package when building in dotnet msbuild workflow (mspdbcmf.exe not found)

Open
#5,102 7 comments 4 reactions 1 assignee View on GitHub

@Scottj1s is already working on this.

Since Feb 6, 2025.

area-DeveloperTools feature proposal
Dominant language
C++
Stars
4.7k
Forks
471
Avg merge
3d 13h
Merged PRs (30d)
28

Description

### Describe the bug

When using `dotnet msbuild` to MSIX package a blank WinAppSDK/WinUI application, the symbol package creation fails with a warning.

> [...]\microsoft.windowsappsdk\1.6.250108002\buildTransitive\Microsoft.Build.Msix.Packaging.targets(363,5): warning : Path to `mspdbcmf.exe` could not be found. A symbols package will not be generated. Review https://aka.ms/windowsappsdkdocs and ensure that all prerequisites for Windows App SDK development have been installed.

The documentation link in the warning has no pertinent information for the warning it's attached to.

Incorrectly closed and related issue: https://github.com/microsoft/WindowsAppSDK/issues/2963

### Steps to reproduce the bug

1. `git clone https://github.com/riverar/repro-211f09d9fccb`
2. `cd repro-211f09d9fccb`
3. `dotnet msbuild /p:Configuration=Release /p:AppxPackageDir="MSIXOutputX64\" /p:GenerateAppxPackageOnBuild=true /p:Platform=x64 -bl`
4. Observe warning/failure
5. (Optional) Open `msbuild.binlog` and observe VC specific variables are not resolving (in the `_EnsurePdbCmfExeFullPath` target)

### Expected behavior

Symbols package creation to succeed without warnings

### Screenshots

_No response_

### NuGet package version

Windows App SDK 1.6.3: 1.6.250108002

### Packaging type

Packaged (MSIX)

### Windows version

Insider Build (xxxxx)

### IDE

Visual Studio 2022-preview, Other, Visual Studio 2022

### Additional context

It was previously stated that `dotnet build` workflows are supported (https://github.com/microsoft/microsoft-ui-xaml/issues/5327).

`Microsoft.Build.Msix.Packaging.targets` does not appear to take into account that VC variables don't exist when built via this context.

```xml





$(VsInstallRoot)\VC\Tools\MSVC\$(LatestMSVCVersion)\


<_VCInstallPathHostArchitecture Condition="'$(PROCESSOR_ARCHITECTURE)' == 'x86'">X86
<_VCInstallPathHostArchitecture Condition="'$(PROCESSOR_ARCHITECTURE)' != 'x86'">X64
$(VCToolsInstallDir)bin\Host$(_VCInstallPathHostArchitecture)\x86\mspdbcmf.exe
$(VCToolsInstallDir)bin\Host$(_VCInstallPathHostArchitecture)\x64\mspdbcmf.exe



$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\AppxPackage\
$(AppxMSBuildToolsPath)\x86\mspdbcmf.exe
$(AppxMSBuildToolsPath)\x64\mspdbcmf.exe


$(PdbCmfx64ExeFullPath)
$(PdbCmfx86ExeFullPath)



```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.