54 instantiations of SdkReference
Microsoft.Build (6)
BackEnd\Components\SdkResolution\MainNodeSdkResolverService.cs (1)
72
SdkReference sdkReference = new
SdkReference
(request.Name, request.Version, request.MinimumVersion);
BackEnd\Components\SdkResolution\TranslationHelpers.cs (1)
33
sdkReference = new
SdkReference
(name, version, minimumVersion);
Construction\ProjectImportElement.cs (1)
193
SdkReference sdk = new
SdkReference
(name, version, minimumVersion);
Construction\ProjectRootElement.cs (1)
1894
var referencedSdk = new
SdkReference
(
Evaluation\Evaluator.cs (1)
1779
sdkReference = new
SdkReference
(
Evaluation\ProjectParser.cs (1)
463
sdk = new
SdkReference
(
Microsoft.Build.Engine.UnitTests (36)
BackEnd\SdkResolverService_Tests.cs (24)
53
SdkReference sdk = new
SdkReference
("notfound", "referencedVersion", "minimumVersion");
83
var sdk = new
SdkReference
("foo", "1.0.0", null);
112
SdkReference sdk = new
SdkReference
("1sdkName", "version1", "minimumVersion");
128
SdkReference sdk = new
SdkReference
("2sdkName", "referencedVersion", "minimumVersion");
142
SdkReference sdk = new
SdkReference
("2sdkName", "referencedVersion", "minimumVersion");
170
SdkReference sdk = new
SdkReference
("2sdkName", "referencedVersion", "minimumVersion");
192
SdkReference sdk = new
SdkReference
("1sdkName", "referencedVersion", "minimumVersion");
209
SdkReference sdk = new
SdkReference
("11sdkName", "referencedVersion", "minimumVersion");
223
SdkReference sdk = new
SdkReference
("1sdkName", "referencedVersion", "minimumVersion");
241
SdkReference sdk = new
SdkReference
(sdkName, "referencedVersion", "minimumVersion");
257
SdkReference sdk = new
SdkReference
("2sdkName", "version2", "minimumVersion");
280
SdkReference sdk = new
SdkReference
("othersdk", "1.0", "minimumVersion");
297
SdkReference sdk = new
SdkReference
("othersdk", "1.0", "minimumVersion");
315
SdkReference sdk = new
SdkReference
("notfound", "1.0", "minimumVersion");
342
SdkReference sdk = new
SdkReference
("Microsoft.NET.Sdk", version1, null);
350
var sdk = new
SdkReference
("foo", "1.0.0", null);
373
result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, new
SdkReference
("foo", "2.0.0", null), _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
427
var sdk = new
SdkReference
("foo", null, null);
467
var sdk = new
SdkReference
("foo", null, null);
507
var sdk = new
SdkReference
("foo", "1.0", null);
558
var sdk = new
SdkReference
("foo", "1.0", null);
605
var sdk = new
SdkReference
("foo", "1.0.0", null);
657
new
SdkReference
("foo", "1.0.0", null),
688
new
SdkReference
("foo", "1.0.0", null),
BackEnd\SdkResultOutOfProc_Tests.cs (1)
251
new
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)
959
new
SdkReference
("TestPropsAndItemsFromResolverSdk", null, null),
Evaluation\ProjectSdkImplicitImport_Tests.cs (2)
681
var expectedSdkReferenceRaw = new
SdkReference
(
686
var expectedSdkReference = new
SdkReference
(
Evaluation\SdkResultEvaluation_Tests.cs (6)
117
new
SdkReference
("TestPropsAndItemsFromResolverSdk", null, null),
157
new
SdkReference
("TestPropsAndItemsFromResolverSdk", null, null),
164
new
SdkReference
("TestPropsAndItemsFromResolverSdk", null, null),
251
new
SdkReference
("TestPropsAndItemsFromResolverSdk", null, null),
353
new
SdkReference
("TestPropsAndItemsFromResolverSdk", null, null),
435
new
SdkReference
("TestSpecialCharactersFromSdkResolver", null, null),
Microsoft.Build.Framework (3)
Sdk\SdkReference.cs (3)
101
sdkReference = 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)
83
SdkReference sdk = new
SdkReference
("Name", "Version", "Min");
85
sdk.ShouldBe(new
SdkReference
("Name", "Version", "Min"));
86
sdk.ShouldNotBe(new
SdkReference
("Name", "Version", null));
87
sdk.ShouldNotBe(new
SdkReference
("Name", null, "Min"));
88
sdk.ShouldNotBe(new
SdkReference
("Name", null, null));
89
sdk.ShouldBe(new
SdkReference
("Name", "version", "Min"));
90
sdk.ShouldBe(new
SdkReference
("name", "Version", "Min"));
91
sdk.ShouldBe(new
SdkReference
("Name", "Version", "min"));
92
sdk.ShouldNotBe(new
SdkReference
("Name2", "Version", "Min"));
115 references to SdkReference
Microsoft.Build (41)
BackEnd\Components\SdkResolution\CachingSdkResolverService.cs (1)
38
public 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)
31
public override SdkResultBase Resolve(
SdkReference
sdk, SdkResolverContextBase context, SdkResultFactoryBase factory)
BackEnd\Components\SdkResolution\HostedSdkResolverServiceBase.cs (1)
52
public 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>
47
SdkResult 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)
72
SdkReference
sdkReference = new SdkReference(request.Name, request.Version, request.MinimumVersion);
99
public 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)
67
public override SdkResult ResolveSdk(int submissionId,
SdkReference
sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk)
118
private SdkResult RequestSdkPathFromMainNode(int submissionId,
SdkReference
sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio)
BackEnd\Components\SdkResolution\SdkResolverException.cs (2)
20
public
SdkReference
Sdk { get; private set; }
22
public 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
"/>
71
public 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>
88
public static bool IsReferenceSameVersion(
SdkReference
sdk, string version)
111
public virtual SdkResult ResolveSdk(int submissionId,
SdkReference
sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk)
170
private SdkResult ResolveSdkUsingResolversWithPatternsFirst(int submissionId,
SdkReference
sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk)
291
SdkReference
sdk,
BackEnd\Components\SdkResolution\SdkResult.cs (6)
8
using SdkReference = Microsoft.Build.Framework.
SdkReference
;
25
public SdkResult(
SdkReference
sdkReference, IEnumerable<string> errors, IEnumerable<string> warnings)
33
public SdkResult(
SdkReference
sdkReference, string path, string version, IEnumerable<string> warnings,
49
public SdkResult(
SdkReference
sdkReference, IEnumerable<string> paths, string version, IDictionary<string, string> propertiesToAdd,
113
EqualityComparer<
SdkReference
>.Default.Equals(_sdkReference, result._sdkReference))
161
hashCode = (hashCode * -1521134295) + EqualityComparer<
SdkReference
>.Default.GetHashCode(_sdkReference);
BackEnd\Components\SdkResolution\SdkResultFactory.cs (3)
6
using SdkReference = Microsoft.Build.Framework.
SdkReference
;
19
private readonly
SdkReference
_sdkReference;
21
internal SdkResultFactory(
SdkReference
sdkReference)
BackEnd\Components\SdkResolution\TranslationHelpers.cs (1)
14
public static void Translate(this ITranslator t, ref
SdkReference
sdkReference)
Construction\ProjectImportElement.cs (5)
35
internal ProjectImportElement(XmlElementWithLocation xmlElement, ProjectElementContainer parent, ProjectRootElement containingProject,
SdkReference
sdkReference = null)
135
/// <see cref="Framework.
SdkReference
"/> if applicable to this import element.
137
internal
SdkReference
SdkReference { get; set; }
158
SdkReference
sdkReference,
193
SdkReference
sdk = new SdkReference(name, version, minimumVersion);
Construction\ProjectRootElement.cs (5)
1883
foreach (
var
referencedSdk in ParseSdks(sdkAttribute, SdkLocation))
1894
var
referencedSdk = new SdkReference(
1907
private static IEnumerable<
SdkReference
> ParseSdks(string sdks, IElementLocation sdkLocation)
1911
if (!
SdkReference
.TryParse(sdk, out
SdkReference
sdkReference))
Evaluation\Evaluator.cs (1)
1717
SdkReference
sdkReference = importElement.SdkReference;
Evaluation\ProjectParser.cs (1)
460
SdkReference
sdk = null;
Microsoft.Build.Engine.OM.UnitTests (2)
ObjectModelRemoting\Helpers\ViewValidation.evaluation.cs (2)
256
private static void Verify(
SdkReference
view,
SdkReference
real, ValidationContext context = null)
Microsoft.Build.Engine.UnitTests (45)
BackEnd\MockSdkResolverService.cs (1)
27
public 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)
412
public override SdkResultBase Resolve(
SdkReference
sdkReference, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory)
428
public override SdkResultBase Resolve(
SdkReference
sdkReference, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory)
447
public override SdkResultBase Resolve(
SdkReference
sdkReference, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory)
BackEnd\SdkResolverService_Tests.cs (29)
53
SdkReference
sdk = new SdkReference("notfound", "referencedVersion", "minimumVersion");
83
var
sdk = new SdkReference("foo", "1.0.0", null);
112
SdkReference
sdk = new SdkReference("1sdkName", "version1", "minimumVersion");
128
SdkReference
sdk = new SdkReference("2sdkName", "referencedVersion", "minimumVersion");
142
SdkReference
sdk = new SdkReference("2sdkName", "referencedVersion", "minimumVersion");
170
SdkReference
sdk = new SdkReference("2sdkName", "referencedVersion", "minimumVersion");
192
SdkReference
sdk = new SdkReference("1sdkName", "referencedVersion", "minimumVersion");
209
SdkReference
sdk = new SdkReference("11sdkName", "referencedVersion", "minimumVersion");
223
SdkReference
sdk = new SdkReference("1sdkName", "referencedVersion", "minimumVersion");
241
SdkReference
sdk = new SdkReference(sdkName, "referencedVersion", "minimumVersion");
257
SdkReference
sdk = new SdkReference("2sdkName", "version2", "minimumVersion");
280
SdkReference
sdk = new SdkReference("othersdk", "1.0", "minimumVersion");
297
SdkReference
sdk = new SdkReference("othersdk", "1.0", "minimumVersion");
315
SdkReference
sdk = new SdkReference("notfound", "1.0", "minimumVersion");
342
SdkReference
sdk = new SdkReference("Microsoft.NET.Sdk", version1, null);
350
var
sdk = new SdkReference("foo", "1.0.0", null);
427
var
sdk = new SdkReference("foo", null, null);
467
var
sdk = new SdkReference("foo", null, null);
507
var
sdk = new SdkReference("foo", "1.0", null);
558
var
sdk = new SdkReference("foo", "1.0", null);
605
var
sdk = new SdkReference("foo", "1.0.0", null);
844
public override SdkResultBase Resolve(
SdkReference
sdkReference, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory) => null;
853
public override SdkResultBase Resolve(
SdkReference
sdk, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory)
872
public override SdkResultBase Resolve(
SdkReference
sdk, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory)
891
public override SdkResultBase Resolve(
SdkReference
sdk, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory)
910
public override SdkResultBase Resolve(
SdkReference
sdk, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory)
931
public override SdkResultBase Resolve(
SdkReference
sdkReference, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory)
953
public override SdkResultBase Resolve(
SdkReference
sdk, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory)
966
public override SdkResultBase Resolve(
SdkReference
sdk, SdkResolverContextBase resolverContext, SdkResultFactoryBase factory)
Evaluation\ProjectSdkImplicitImport_Tests.cs (8)
448
var
sdk = GetParsedSdk(importElement);
681
var
expectedSdkReferenceRaw = new SdkReference(
686
var
expectedSdkReference = new SdkReference(
788
private const string ErrorName = ResolverName + "/Error/" + nameof(
SdkReference
.Name);
789
private const string ErrorVersion = ResolverName + "/Error/" + nameof(
SdkReference
.Version);
802
public override SdkResult Resolve(
SdkReference
sdk, SdkResolverContext resolverContext,
834
private
SdkReference
GetParsedSdk(ProjectImportElement element)
837
return (
SdkReference
)parsedSdkInfo.GetValue(element);
InternalEngineHelpers.cs (4)
42
private readonly Func<
SdkReference
, SdkResolverContext, SdkResultFactory, Framework.SdkResult> _resolveFunc;
56
public ConfigurableMockSdkResolver(Func<
SdkReference
, SdkResolverContext, SdkResultFactory, Framework.SdkResult> resolveFunc)
65
public override Framework.SdkResult Resolve(
SdkReference
sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory)
142
public override Framework.SdkResult Resolve(
SdkReference
sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory)
Microsoft.Build.Framework (13)
Sdk\SdkReference.cs (7)
17
public sealed class SdkReference : IEquatable<
SdkReference
>
54
public 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>
79
public static bool TryParse(string sdk, out
SdkReference
sdkReference)
128
return 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
"/>.
39
public abstract SdkResult Resolve(
SdkReference
sdkReference,
Sdk\SdkResult.cs (2)
29
private protected
SdkReference
_sdkReference;
72
public 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)
17
SdkReference
sdk;
18
var parsed =
SdkReference
.TryParse(sdkString, out sdk);
30
SdkReference
sdk;
31
var parsed =
SdkReference
.TryParse(sdkString, out sdk);
44
SdkReference
sdk;
45
var parsed =
SdkReference
.TryParse(sdkString, out sdk);
58
SdkReference
sdk;
59
var parsed =
SdkReference
.TryParse(sdkString, out sdk);
74
SdkReference
sdk;
75
var parsed =
SdkReference
.TryParse(sdkString, out sdk);
83
SdkReference
sdk = new SdkReference("Name", "Version", "Min");
PresentationBuildTasks (3)
Microsoft\Build\Tasks\Windows\GenerateTemporaryTargetAssembly.cs (3)
823
if (!
SdkReference
.TryParse(sdk, out
SdkReference
sdkReference))
879
static XmlNode CreateImportProjectSdkNode(XmlDocument xmlProjectDoc, string projectAttributeValue,
SdkReference
sdkReference)