3 writes to SdkReference
Microsoft.Build (3)
Construction\ProjectImportElement.cs (3)
39SdkReference = sdkReference; 167SdkReference = sdkReference, 200SdkReference = sdk;
57 references to SdkReference
Microsoft.Build (10)
Construction\ProjectImportElement.cs (9)
78if (UpdateSdkReference(name: value, SdkReference?.Version, SdkReference?.MinimumVersion)) 93if (UpdateSdkReference(SdkReference?.Name, version: value, SdkReference?.MinimumVersion)) 108if (UpdateSdkReference(SdkReference?.Name, SdkReference?.Version, minimumVersion: value)) 188/// Helper method to update the <see cref="SdkReference" /> property if necessary (update only when changed). 190/// <returns>True if the <see cref="SdkReference" /> property was updated, otherwise false (no update necessary).</returns> 195if (sdk.Equals(SdkReference))
Evaluation\Evaluator.cs (1)
1717SdkReference sdkReference = importElement.SdkReference;
Microsoft.Build.Engine.UnitTests (47)
Construction\ProjectImportElement_Tests.cs (42)
32importElement.SdkReference.Name.ShouldBe("My.Sdk"); 33importElement.SdkReference.Version.ShouldBe("1.2.0"); 34importElement.SdkReference.MinimumVersion.ShouldBeNull(); 42importElement.SdkReference.Name.ShouldBe("My.Sdk"); 43importElement.SdkReference.Version.ShouldBe("1.2.0"); 44importElement.SdkReference.MinimumVersion.ShouldBe("1.0.0"); 48importElement.SdkReference.Name.ShouldBe("Some.Other.Sdk"); 49importElement.SdkReference.Version.ShouldBe("1.2.0"); 50importElement.SdkReference.MinimumVersion.ShouldBe("1.0.0"); 69importElement.SdkReference.Name.ShouldBe("My.Sdk"); 70importElement.SdkReference.Version.ShouldBeNull(); 71importElement.SdkReference.MinimumVersion.ShouldBeNull(); 78importElement.SdkReference.Name.ShouldBe("My.Sdk"); 79importElement.SdkReference.Version.ShouldBe("1.2.0"); 80importElement.SdkReference.MinimumVersion.ShouldBeNull(); 85importElement.SdkReference.Name.ShouldBe("My.Sdk"); 86importElement.SdkReference.Version.ShouldBe("1.2.0"); 87importElement.SdkReference.MinimumVersion.ShouldBe("1.0.0"); 106importElement.SdkReference.Name.ShouldBe("My.Sdk"); 107importElement.SdkReference.Version.ShouldBeNull(); 108importElement.SdkReference.MinimumVersion.ShouldBeNull(); 113importElement.SdkReference.Name.ShouldBe("My.Sdk"); 114importElement.SdkReference.Version.ShouldBe("1.2.0"); 115importElement.SdkReference.MinimumVersion.ShouldBeNull(); 120importElement.SdkReference.Name.ShouldBe("My.Sdk"); 121importElement.SdkReference.Version.ShouldBe("1.2.0"); 122importElement.SdkReference.MinimumVersion.ShouldBe("1.0.0"); 130importElement.SdkReference.Name.ShouldBe("Some.Other.Sdk"); 131importElement.SdkReference.Version.ShouldBe("1.2.0"); 132importElement.SdkReference.MinimumVersion.ShouldBe("1.0.0"); 138importElement.SdkReference.Name.ShouldBe("Some.Other.Sdk"); 139importElement.SdkReference.Version.ShouldBe("4.0.0"); 140importElement.SdkReference.MinimumVersion.ShouldBe("1.0.0"); 146importElement.SdkReference.Name.ShouldBe("Some.Other.Sdk"); 147importElement.SdkReference.Version.ShouldBe("4.0.0"); 148importElement.SdkReference.MinimumVersion.ShouldBe("2.0.0"); 152importElement.SdkReference.Name.ShouldBe("Some.Other.Sdk"); 153importElement.SdkReference.Version.ShouldBeNull(); 154importElement.SdkReference.MinimumVersion.ShouldBe("2.0.0"); 158importElement.SdkReference.Name.ShouldBe("Some.Other.Sdk"); 159importElement.SdkReference.Version.ShouldBeNull(); 160importElement.SdkReference.MinimumVersion.ShouldBeNull();
Evaluation\ProjectSdkImplicitImport_Tests.cs (5)
530importingElement.SdkReference.Name.ShouldBe(SdkName); 531importingElement.SdkReference.Version.ShouldBe(expectedVersion); 532importingElement.SdkReference.MinimumVersion.ShouldBe(expectedMinimumVersion); 542import.SdkResult.SdkReference.ShouldBeSameAs(importingElement.SdkReference); 695import.ImportingElement.SdkReference.ShouldBe(expectedSdkReferenceRaw);