microsoft / microsoft/microsoft-ui-xaml
Building from commandline setting outputpath without trailing backslash creates invalid output
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
If you build from commandline but set the outputpath directly, it causes several XBF files to be output to the wrong location.
### Why is this important?
I spent all day trying to figure out why my build was suddenly broken, only to discover I wasn't adding a `\` to my output path. This problem occurred when moving from 1.6 to 1.7+
### Steps to reproduce the bug
1. Create a new WinUI project
2. Open a VS Command Line and CD to the project foler
3. Run the command `msbuild /t:build OutputPathBug.csproj -p:Platform=x64 -p:RuntimeIdentifier=win-x64 -p:OutputPath=output`
4. Notice you'll get `outputApp.xbf and `outputMainWindow.xbf` in the current folder, and the generated app will fail to launch.
5. Repeat but add a trailing `\` to the outputpath, and things will be ok.
### Actual behavior
Invalid deployment generated
### Expected behavior
It's not required to add a trailing backslash to the output path.
### Screenshots
_No response_
### NuGet package version
1.7.250310001+
### Windows version
_No response_
### Additional context
Regressed in 1.7.250310001. Worked in 1.6.240923002
Contributor guide
Research direction
Start by reproducing the issue with the provided msbuild command in a new WinUI project, then compare the generated output with and without the trailing backslash and against version 1.6. The fix is complete when OutputPath=output places the XBF files correctly and produces a valid deployment without requiring a trailing backslash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100