microsoft / microsoft/microsoft-ui-xaml

WinUI 3 (1.8.250906003): Build Warning: MSB8027, Linker Warning: LNK4042

Open
#10,772 2 comments 1 reaction 0 assignees View on GitHub
bug needs-triage
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

After upgrading to WinUI 3 (1.8.250906003) via the Microsoft® Visual Studio NuGet interface, I get the following build/linker warnings when building the solution:

warning MSB8027: Two or more files with the name of DeploymentManagerAutoInitializer.cpp will produce outputs to the same location. This can lead to an incorrect build result.
warning MSB8027: Two or more files with the name of WindowsAppRuntimeAutoInitializer.cpp will produce outputs to the same location. This can lead to an incorrect build result.
DeploymentManagerAutoInitializer.cpp
DeploymentManagerAutoInitializer.cpp
WindowsAppRuntimeAutoInitializer.cpp
WindowsAppRuntimeAutoInitializer.cpp
warning LNK4042: object specified more than once; extras ignored
warning LNK4042: object specified more than once; extras ignored
XamlMetaDataProvider.cpp
XamlTypeInfo.g.cpp
warning LNK4042: object specified more than once; extras ignored
warning LNK4042: object specified more than once; extras ignored

[packages.config.txt](https://github.com/user-attachments/files/22254161/packages.config.txt)

### Why is this important?

Building the solution results in the above build/linker warnings or occasionally even fails to build due to file access denials related to the above-mentioned files ('DeploymentManagerAutoInitializer.cpp' and 'WindowsAppRuntimeAutoInitializer.cpp').

### Steps to reproduce the bug

1. Upgrade from the previous version to 1.8.250906003 via the Microsoft® Visual Studio NuGet interface.
2. Recompile the solution.

### Actual behavior

_No response_

### Expected behavior

_No response_

### Screenshots

_No response_

### NuGet package version

None

### Windows version

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the attached packages.config.txt and reproduce the upgrade to WinUI 3 version 1.8.250906003, then inspect the build output for duplicate DeploymentManagerAutoInitializer.cpp and WindowsAppRuntimeAutoInitializer.cpp objects. Compare the generated project inputs before and after the upgrade; done means the solution builds without MSB8027 or LNK4042 warnings and without related file-access failures.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.