Fix XamlCompiler test projects missing MSBuild Build target (MSB4057) - #11752
Open
Suraj Kumar Gupta (suragupta-msft) wants to merge 1 commit into
Open
Fix XamlCompiler test projects missing MSBuild Build target (MSB4057)#11752Suraj Kumar Gupta (suragupta-msft) wants to merge 1 commit into
Suraj Kumar Gupta (suragupta-msft) wants to merge 1 commit into
Conversation
XamlCompiler.sln / XamlCompilerTests.sln failed with "MSB4057: The target Build does not exist in the project" because four test helper projects had no usable final .targets import. - LibManagedDll, LibManagedWinmd and LibManagedDllSatellite (UAP libs) now resolve the WindowsXaml C# targets by probing for an installed toolset version (v17.0 -> v16.0 -> v15.0, falling back to $(VisualStudioVersion)), so a stale hardcoded path can no longer point the import at a directory that does not exist. - The import is gated on Exists() and guarded by ExcludeRestorePackageImports so NuGet restore is unaffected. - An EnsureWindowsXamlTargetsPresent target, wired via InitialTargets, emits an actionable error when the UWP toolset is absent instead of a cryptic MSB4019/MSB4057. - XamlCompilerProxies (.NET Framework v4.7.2, non-UAP) imports the standard Microsoft.CSharp.targets, matching its parent harness XamlCompilerUnitTests.
Suraj Kumar Gupta (suragupta-msft)
requested a review
from a team
as a code owner
September 1, 2026 20:41
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Author
|
/azp run |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
Author
|
/azp run |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
SatwikKrSharma
requested changes
Sep 2, 2026
SatwikKrSharma
left a comment
Contributor
There was a problem hiding this comment.
I am not seeing the result of the test run in description, can you please add the test result also, on how many tests are there, how many are running and passing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
XamlCompiler.sln / XamlCompilerTests.sln failed with "MSB4057: The target Build does not exist in the project" because four test helper projects had no usable final .targets import.
Fix