microsoft / microsoft/WindowsAppSDK
Missing symbols package when building in dotnet msbuild workflow (mspdbcmf.exe not found)
@Scottj1s is already working on this.
Since Feb 6, 2025.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.