microsoft / microsoft/WindowsAppSDK

warning MSB8027: Two or more files with the name of WindowsAppRuntimeAutoInitializer.cpp will produce outputs to the same location.

Open
#5,395 7 comments 5 reactions 0 assignees View on GitHub

A pull request for this has already been merged.

  • #5685 by @ssparach — merged
area-DeveloperTools needs-triage
Dominant language
C++
Stars
4.7k
Forks
471
Avg merge
3d 13h
Merged PRs (30d)
28

Description

I got this warning in my project. Later it is followed by this warning:
WindowsAppRuntimeAutoInitializer.obj : warning LNK4042: object specified more than once; extras ignored

The solution consist of (among others) two c++ projects: exe and dll - both are using the same version WindowsAppSDK (1.7.250401001) nuget.

I think it is caused by WindowsAppSDK nuget that has `WindowsAppSDK-Nuget-Native.AutoInitializer.targets`
in `buildTransitive` directory. Also I think older versions of WindowsAppSDK haven't produced such warnings.

Is there a way to prevent the warnings?

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.

Research direction

Inspect buildTransitive/WindowsAppSDK-Nuget-Native.AutoInitializer.targets and compare how the exe and dll consume it. Reproduce the MSB8027 and LNK4042 warnings in a solution using both projects, then determine whether merged PR 5685 addresses them; done means the duplicate object warnings no longer appear.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.