Skip to content

Commit 04ea1ad

Browse files
authored
Merge branch 'vs17.13' into locfiles/833caf0e-c184-4b83-a043-058fc55833d1
2 parents c02fdc1 + d87bc64 commit 04ea1ad

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

.opt-prof.yml

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ stages:
5757
cloudBuildResourceName: ComponentBuildUnderTest
5858
testLabPoolName: VS-Platform # The test lab pool to run your tests in
5959
testMachineCleanUpStrategy: ${{parameters.testMachineCleanUpStrategy}}
60-
testMachineImageName: Windows-11-Enterprise-23H2
6160
visualStudioSigning: Test
6261
variables:
6362
- name: branchName # The branch in the VS repo the bootstrapper was based on

src/Build.UnitTests/Evaluation/Preprocessor_Tests.cs

+1
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,7 @@ This import was added implicitly because the Project element's Sdk attribute spe
933933
}
934934

935935
[Fact]
936+
[ActiveIssue("https://github.com/dotnet/msbuild/issues/11498")]
936937
public void SdkResolverItemsAndPropertiesAreInPreprocessedOutput()
937938
{
938939
using (TestEnvironment env = TestEnvironment.Create())

src/Build/Construction/ProjectRootElement.cs

+2
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ public override string Condition
329329
/// </summary>
330330
public ICollection<ProjectImportElement> Imports => new ReadOnlyCollection<ProjectImportElement>(GetAllChildrenOfType<ProjectImportElement>());
331331

332+
internal bool IsEphemeral => _isEphemeral;
333+
332334
/// <summary>
333335
/// Get a read-only collection of the child property groups, if any.
334336
/// Does not include any that may not be at the root, i.e. inside Choose elements.

src/Build/Definition/Project.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2257,7 +2257,7 @@ public override IList<ResolvedImport> Imports
22572257

22582258
foreach (ResolvedImport import in _data.ImportClosure)
22592259
{
2260-
if (import.ImportingElement != null) // Exclude outer project itself
2260+
if (import.ImportingElement != null && !import.ImportedProject.IsEphemeral) // Exclude outer project itself and SDK-resolver synthesized imports
22612261
{
22622262
imports.Add(import);
22632263
}
@@ -2280,7 +2280,7 @@ public override IList<ResolvedImport> ImportsIncludingDuplicates
22802280

22812281
foreach (var import in _data.ImportClosureWithDuplicates)
22822282
{
2283-
if (import.ImportingElement != null) // Exclude outer project itself
2283+
if (import.ImportingElement != null && !import.ImportedProject.IsEphemeral) // Exclude outer project itself and SDK-resolver synthesized imports
22842284
{
22852285
imports.Add(import);
22862286
}

0 commit comments

Comments
 (0)