54 instantiations of SdkReference
Microsoft.Build (6)
BackEnd\Components\SdkResolution\MainNodeSdkResolverService.cs (1)
72SdkReference sdkReference = new SdkReference(request.Name, request.Version, request.MinimumVersion);
BackEnd\Components\SdkResolution\TranslationHelpers.cs (1)
33sdkReference = new SdkReference(name, version, minimumVersion);
Construction\ProjectImportElement.cs (1)
193SdkReference sdk = new SdkReference(name, version, minimumVersion);
Construction\ProjectRootElement.cs (1)
1894var referencedSdk = new SdkReference(
Evaluation\Evaluator.cs (1)
1779sdkReference = new SdkReference(
Evaluation\ProjectParser.cs (1)
463sdk = new SdkReference(
Microsoft.Build.Engine.UnitTests (36)
BackEnd\SdkResolverService_Tests.cs (24)
53SdkReference sdk = new SdkReference("notfound", "referencedVersion", "minimumVersion"); 83var sdk = new SdkReference("foo", "1.0.0", null); 112SdkReference sdk = new SdkReference("1sdkName", "version1", "minimumVersion"); 128SdkReference sdk = new SdkReference("2sdkName", "referencedVersion", "minimumVersion"); 142SdkReference sdk = new SdkReference("2sdkName", "referencedVersion", "minimumVersion"); 170SdkReference sdk = new SdkReference("2sdkName", "referencedVersion", "minimumVersion"); 192SdkReference sdk = new SdkReference("1sdkName", "referencedVersion", "minimumVersion"); 209SdkReference sdk = new SdkReference("11sdkName", "referencedVersion", "minimumVersion"); 223SdkReference sdk = new SdkReference("1sdkName", "referencedVersion", "minimumVersion"); 241SdkReference sdk = new SdkReference(sdkName, "referencedVersion", "minimumVersion"); 257SdkReference sdk = new SdkReference("2sdkName", "version2", "minimumVersion"); 280SdkReference sdk = new SdkReference("othersdk", "1.0", "minimumVersion"); 297SdkReference sdk = new SdkReference("othersdk", "1.0", "minimumVersion"); 315SdkReference sdk = new SdkReference("notfound", "1.0", "minimumVersion"); 342SdkReference sdk = new SdkReference("Microsoft.NET.Sdk", version1, null); 350var sdk = new SdkReference("foo", "1.0.0", null); 373result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, new SdkReference("foo", "2.0.0", null), _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 427var sdk = new SdkReference("foo", null, null); 467var sdk = new SdkReference("foo", null, null); 507var sdk = new SdkReference("foo", "1.0", null); 558var sdk = new SdkReference("foo", "1.0", null); 605var sdk = new SdkReference("foo", "1.0.0", null); 657new SdkReference("foo", "1.0.0", null), 688new SdkReference("foo", "1.0.0", null),
BackEnd\SdkResultOutOfProc_Tests.cs (1)
251new SdkReference("TestSdk", null, null),
Definition\ProjectEvaluationContext_Tests.cs (2)
37{"foo", new SdkResult(new SdkReference("foo", "1.0.0", null), "path", "1.0.0", null) }, 38{"bar", new SdkResult(new SdkReference("bar", "1.0.0", null), "path", "1.0.0", null) }
Evaluation\Preprocessor_Tests.cs (1)
959new SdkReference("TestPropsAndItemsFromResolverSdk", null, null),
Evaluation\ProjectSdkImplicitImport_Tests.cs (2)
681var expectedSdkReferenceRaw = new SdkReference( 686var expectedSdkReference = new SdkReference(
Evaluation\SdkResultEvaluation_Tests.cs (6)
117new SdkReference("TestPropsAndItemsFromResolverSdk", null, null), 157new SdkReference("TestPropsAndItemsFromResolverSdk", null, null), 164new SdkReference("TestPropsAndItemsFromResolverSdk", null, null), 251new SdkReference("TestPropsAndItemsFromResolverSdk", null, null), 353new SdkReference("TestPropsAndItemsFromResolverSdk", null, null), 435new SdkReference("TestSpecialCharactersFromSdkResolver", null, null),
Microsoft.Build.Framework (3)
Sdk\SdkReference.cs (3)
101sdkReference = new SdkReference(parts[0], null, null); 108? new SdkReference(parts[0], null, parts[1].Substring(4)) 109: new SdkReference(parts[0], parts[1], null);
Microsoft.Build.Framework.UnitTests (9)
SdkReference_Tests.cs (9)
83SdkReference sdk = new SdkReference("Name", "Version", "Min"); 85sdk.ShouldBe(new SdkReference("Name", "Version", "Min")); 86sdk.ShouldNotBe(new SdkReference("Name", "Version", null)); 87sdk.ShouldNotBe(new SdkReference("Name", null, "Min")); 88sdk.ShouldNotBe(new SdkReference("Name", null, null)); 89sdk.ShouldBe(new SdkReference("Name", "version", "Min")); 90sdk.ShouldBe(new SdkReference("name", "Version", "Min")); 91sdk.ShouldBe(new SdkReference("Name", "Version", "min")); 92sdk.ShouldNotBe(new SdkReference("Name2", "Version", "Min"));
115 references to SdkReference
Microsoft.Build (41)
BackEnd\Components\SdkResolution\CachingSdkResolverService.cs (1)
38public override SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk)
BackEnd\Components\SdkResolution\DefaultSdkResolver.cs (1)
31public override SdkResultBase Resolve(SdkReference sdk, SdkResolverContextBase context, SdkResultFactoryBase factory)
BackEnd\Components\SdkResolution\HostedSdkResolverServiceBase.cs (1)
52public abstract SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk);
BackEnd\Components\SdkResolution\ISdkResolverService.cs (2)
38/// <param name="sdk">The <see cref="SdkReference"/> containing information about the referenced SDK.</param> 47SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk);
BackEnd\Components\SdkResolution\MainNodeSdkResolverService.cs (2)
72SdkReference sdkReference = new SdkReference(request.Name, request.Version, request.MinimumVersion); 99public override SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk)
BackEnd\Components\SdkResolution\OutOfProcNodeSdkResolverService.cs (2)
67public override SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk) 118private SdkResult RequestSdkPathFromMainNode(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio)
BackEnd\Components\SdkResolution\SdkResolverException.cs (2)
20public SdkReference Sdk { get; private set; } 22public SdkResolverException(string resourceName, SdkResolver resolver, SdkReference sdk, Exception innerException, params string[] args)
BackEnd\Components\SdkResolution\SdkResolverRequest.cs (2)
12/// Represents an SDK resolver request which is serialized and sent between nodes. This is mostly a wrapper around <see cref="SdkReference"/> 71public static SdkResolverRequest Create(int submissionId, SdkReference sdkReference, BuildEventContext buildEventContext, ElementLocation elementLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio)
BackEnd\Components\SdkResolution\SdkResolverService.cs (6)
82/// Determines if the <see cref="SdkReference"/> is the same as the specified version. If the <paramref name="sdk"/> object has <code>null</code> for the version, 85/// <param name="sdk">An <see cref="SdkReference"/> object.</param> 88public static bool IsReferenceSameVersion(SdkReference sdk, string version) 111public virtual SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk) 170private SdkResult ResolveSdkUsingResolversWithPatternsFirst(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk) 291SdkReference sdk,
BackEnd\Components\SdkResolution\SdkResult.cs (6)
8using SdkReference = Microsoft.Build.Framework.SdkReference; 25public SdkResult(SdkReference sdkReference, IEnumerable<string> errors, IEnumerable<string> warnings) 33public SdkResult(SdkReference sdkReference, string path, string version, IEnumerable<string> warnings, 49public SdkResult(SdkReference sdkReference, IEnumerable<string> paths, string version, IDictionary<string, string> propertiesToAdd, 113EqualityComparer<SdkReference>.Default.Equals(_sdkReference, result._sdkReference)) 161hashCode = (hashCode * -1521134295) + EqualityComparer<SdkReference>.Default.GetHashCode(_sdkReference);
BackEnd\Components\SdkResolution\SdkResultFactory.cs (3)
6using SdkReference = Microsoft.Build.Framework.SdkReference; 19private readonly SdkReference _sdkReference; 21internal SdkResultFactory(SdkReference sdkReference)
BackEnd\Components\SdkResolution\TranslationHelpers.cs (1)
14public static void Translate(this ITranslator t, ref SdkReference sdkReference)
Construction\ProjectImportElement.cs (5)
35internal ProjectImportElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject, SdkReference sdkReference = null) 135/// <see cref="Framework.SdkReference"/> if applicable to this import element. 137internal SdkReference SdkReference { get; set; } 158SdkReference sdkReference, 193SdkReference sdk = new SdkReference(name, version, minimumVersion);
Construction\ProjectRootElement.cs (5)
1883foreach (var referencedSdk in ParseSdks(sdkAttribute, SdkLocation)) 1894var referencedSdk = new SdkReference( 1907private static IEnumerable<SdkReference> ParseSdks(string sdks, IElementLocation sdkLocation) 1911if (!SdkReference.TryParse(sdk, out SdkReference sdkReference))
Evaluation\Evaluator.cs (1)
1717SdkReference sdkReference = importElement.SdkReference;
Evaluation\ProjectParser.cs (1)
460SdkReference sdk = null;
Microsoft.Build.Engine.OM.UnitTests (2)
ObjectModelRemoting\Helpers\ViewValidation.evaluation.cs (2)
256private static void Verify(SdkReference view, SdkReference real, ValidationContext context = null)
Microsoft.Build.Engine.UnitTests (45)
BackEnd\MockSdkResolverService.cs (1)
27public Build.BackEnd.SdkResolution.SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk)
BackEnd\SdkResolverLoader_Tests.cs (3)
412public override SdkResultBase Resolve(SdkReference sdkReference, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory) 428public override SdkResultBase Resolve(SdkReference sdkReference, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory) 447public override SdkResultBase Resolve(SdkReference sdkReference, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory)
BackEnd\SdkResolverService_Tests.cs (29)
53SdkReference sdk = new SdkReference("notfound", "referencedVersion", "minimumVersion"); 83var sdk = new SdkReference("foo", "1.0.0", null); 112SdkReference sdk = new SdkReference("1sdkName", "version1", "minimumVersion"); 128SdkReference sdk = new SdkReference("2sdkName", "referencedVersion", "minimumVersion"); 142SdkReference sdk = new SdkReference("2sdkName", "referencedVersion", "minimumVersion"); 170SdkReference sdk = new SdkReference("2sdkName", "referencedVersion", "minimumVersion"); 192SdkReference sdk = new SdkReference("1sdkName", "referencedVersion", "minimumVersion"); 209SdkReference sdk = new SdkReference("11sdkName", "referencedVersion", "minimumVersion"); 223SdkReference sdk = new SdkReference("1sdkName", "referencedVersion", "minimumVersion"); 241SdkReference sdk = new SdkReference(sdkName, "referencedVersion", "minimumVersion"); 257SdkReference sdk = new SdkReference("2sdkName", "version2", "minimumVersion"); 280SdkReference sdk = new SdkReference("othersdk", "1.0", "minimumVersion"); 297SdkReference sdk = new SdkReference("othersdk", "1.0", "minimumVersion"); 315SdkReference sdk = new SdkReference("notfound", "1.0", "minimumVersion"); 342SdkReference sdk = new SdkReference("Microsoft.NET.Sdk", version1, null); 350var sdk = new SdkReference("foo", "1.0.0", null); 427var sdk = new SdkReference("foo", null, null); 467var sdk = new SdkReference("foo", null, null); 507var sdk = new SdkReference("foo", "1.0", null); 558var sdk = new SdkReference("foo", "1.0", null); 605var sdk = new SdkReference("foo", "1.0.0", null); 844public override SdkResultBase Resolve(SdkReference sdkReference, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory) => null; 853public override SdkResultBase Resolve(SdkReference sdk, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory) 872public override SdkResultBase Resolve(SdkReference sdk, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory) 891public override SdkResultBase Resolve(SdkReference sdk, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory) 910public override SdkResultBase Resolve(SdkReference sdk, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory) 931public override SdkResultBase Resolve(SdkReference sdkReference, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory) 953public override SdkResultBase Resolve(SdkReference sdk, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory) 966public override SdkResultBase Resolve(SdkReference sdk, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory)
Evaluation\ProjectSdkImplicitImport_Tests.cs (8)
448var sdk = GetParsedSdk(importElement); 681var expectedSdkReferenceRaw = new SdkReference( 686var expectedSdkReference = new SdkReference( 788private const string ErrorName = ResolverName + "/Error/" + nameof(SdkReference.Name); 789private const string ErrorVersion = ResolverName + "/Error/" + nameof(SdkReference.Version); 802public override SdkResult Resolve(SdkReference sdk, SdkResolverContext resolverContext, 834private SdkReference GetParsedSdk(ProjectImportElement element) 837return (SdkReference)parsedSdkInfo.GetValue(element);
InternalEngineHelpers.cs (4)
42private readonly Func<SdkReference, SdkResolverContext, SdkResultFactory, Framework.SdkResult> _resolveFunc; 56public ConfigurableMockSdkResolver(Func<SdkReference, SdkResolverContext, SdkResultFactory, Framework.SdkResult> resolveFunc) 65public override Framework.SdkResult Resolve(SdkReference sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory) 142public override Framework.SdkResult Resolve(SdkReference sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory)
Microsoft.Build.Framework (13)
Sdk\SdkReference.cs (7)
17public sealed class SdkReference : IEquatable<SdkReference> 54public bool Equals(SdkReference other) 72/// Attempts to parse the specified string as a <see cref="SdkReference" />. The expected format is: 77/// <param name="sdkReference">A parsed <see cref="SdkReference" /> if the specified value is a valid SDK name.</param> 79public static bool TryParse(string sdk, out SdkReference sdkReference) 128return obj is SdkReference && Equals((SdkReference)obj);
Sdk\SdkResolver.cs (3)
27/// <param name="sdkReference">A <see cref="SdkReference" /> containing the referenced SDKs be resolved.</param> 33/// applicable for a particular <see cref="SdkReference"/>. 39public abstract SdkResult Resolve(SdkReference sdkReference,
Sdk\SdkResult.cs (2)
29private protected SdkReference _sdkReference; 72public virtual SdkReference SdkReference { get => _sdkReference; protected set => _sdkReference = value; }
Traits.cs (1)
376/// Overrides the default behavior of property expansion on evaluation of a <see cref="Framework.SdkReference"/>.
Microsoft.Build.Framework.UnitTests (11)
SdkReference_Tests.cs (11)
17SdkReference sdk; 18var parsed = SdkReference.TryParse(sdkString, out sdk); 30SdkReference sdk; 31var parsed = SdkReference.TryParse(sdkString, out sdk); 44SdkReference sdk; 45var parsed = SdkReference.TryParse(sdkString, out sdk); 58SdkReference sdk; 59var parsed = SdkReference.TryParse(sdkString, out sdk); 74SdkReference sdk; 75var parsed = SdkReference.TryParse(sdkString, out sdk); 83SdkReference sdk = new SdkReference("Name", "Version", "Min");
PresentationBuildTasks (3)
Microsoft\Build\Tasks\Windows\GenerateTemporaryTargetAssembly.cs (3)
823if (!SdkReference.TryParse(sdk, out SdkReference sdkReference)) 879static XmlNode CreateImportProjectSdkNode(XmlDocument xmlProjectDoc, string projectAttributeValue, SdkReference sdkReference)