180 references to GetPropertyValue
dotnet (36)
Commands\Run\RunCommand.cs (5)
432
if (string.IsNullOrWhiteSpace(project.
GetPropertyValue
("TargetFramework")))
502
string targetFrameworks = project.
GetPropertyValue
("TargetFrameworks");
505
string targetFramework = project.
GetPropertyValue
("TargetFramework");
515
project.
GetPropertyValue
("MSBuildProjectFullPath"),
517
project.
GetPropertyValue
("OutputType")));
Commands\Run\RunProperties.cs (6)
25
Command: project.
GetPropertyValue
("RunCommand"),
26
Arguments: project.
GetPropertyValue
("RunArguments"),
27
WorkingDirectory: project.
GetPropertyValue
("RunWorkingDirectory"),
28
RuntimeIdentifier: project.
GetPropertyValue
("RuntimeIdentifier"),
29
DefaultAppHostRuntimeIdentifier: project.
GetPropertyValue
("DefaultAppHostRuntimeIdentifier"),
30
TargetFrameworkVersion: project.
GetPropertyValue
("TargetFrameworkVersion"));
Commands\Run\VirtualProjectBuildingCommand.cs (3)
449
if (!MSBuildUtilities.ConvertStringToBool(projectInstance.
GetPropertyValue
(FileBasedProgramCanSkipMSBuild), defaultValue: true))
512
var result = projectInstance.
GetPropertyValue
(singlePropertyName);
537
writer.WriteString(propertyName, projectInstance.
GetPropertyValue
(propertyName));
Commands\Test\MTP\SolutionAndProjectUtility.cs (16)
224
var targetFramework = projectInstance.
GetPropertyValue
(ProjectProperties.TargetFramework);
225
var targetFrameworks = projectInstance.
GetPropertyValue
(ProjectProperties.TargetFrameworks);
227
Logger.LogTrace($"Loaded project '{Path.GetFileName(projectFilePath)}' with TargetFramework '{targetFramework}', TargetFrameworks '{targetFrameworks}', IsTestProject '{projectInstance.
GetPropertyValue
(ProjectProperties.IsTestProject)}', and '{ProjectProperties.IsTestingPlatformApplication}' is '{projectInstance.
GetPropertyValue
(ProjectProperties.IsTestingPlatformApplication)}'.");
238
if (!bool.TryParse(projectInstance.
GetPropertyValue
(ProjectProperties.TestTfmsInParallel), out bool testTfmsInParallel) &&
239
!bool.TryParse(projectInstance.
GetPropertyValue
(ProjectProperties.BuildInParallel), out testTfmsInParallel))
257
Logger.LogTrace($"Loaded inner project '{Path.GetFileName(projectFilePath)}' has '{ProjectProperties.IsTestingPlatformApplication}' = '{projectInstance.
GetPropertyValue
(ProjectProperties.IsTestingPlatformApplication)}' (TFM: '{framework}').");
271
Logger.LogTrace($"Loaded inner project '{Path.GetFileName(projectFilePath)}' has '{ProjectProperties.IsTestingPlatformApplication}' = '{projectInstance.
GetPropertyValue
(ProjectProperties.IsTestingPlatformApplication)}' (TFM: '{framework}').");
292
_ = bool.TryParse(project.
GetPropertyValue
(ProjectProperties.IsTestProject), out bool isTestProject);
293
_ = bool.TryParse(project.
GetPropertyValue
(ProjectProperties.IsTestingPlatformApplication), out bool isTestingPlatformApplication);
300
string targetFramework = project.
GetPropertyValue
(ProjectProperties.TargetFramework);
301
string projectFullPath = project.
GetPropertyValue
(ProjectProperties.ProjectFullPath);
321
project.
GetPropertyValue
("OutputType")));
328
project.
GetPropertyValue
(ProjectProperties.TargetPath),
334
var launchSettings = TryGetLaunchProfileSettings(Path.GetDirectoryName(projectFullPath)!, Path.GetFileNameWithoutExtension(projectFullPath), project.
GetPropertyValue
(ProjectProperties.AppDesignerFolder), buildOptions, profileName: null);
346
return new TestModule(runProperties, PathUtility.FixFilePath(projectFullPath), targetFramework, isTestingPlatformApplication, launchSettings, project.
GetPropertyValue
(ProjectProperties.TargetPath), rootVariableName);
Extensions\ProjectInstanceExtensions.cs (4)
12
var projectGuidProperty = projectInstance.
GetPropertyValue
("ProjectGuid");
21
string projectTypeGuid = projectInstance.
GetPropertyValue
("DefaultProjectTypeGuid");
31
return (projectInstance.
GetPropertyValue
("Platforms") ?? "")
39
string foundConfig = projectInstance.
GetPropertyValue
("Configurations") ?? "Debug;Release";
ReleasePropertyProjectLocator.cs (2)
83
string propertyToCheckValue = project.
GetPropertyValue
(_propertyToCheck);
190
string pReleasePropertyValue = projectData.
GetPropertyValue
(_propertyToCheck);
dotnet-watch (10)
Build\EvaluationResult.cs (1)
97
if (projectInstance.
GetPropertyValue
(PropertyNames.TargetFramework) == "")
Build\ProjectGraphUtilities.cs (8)
80
=> projectNode.ProjectInstance.
GetPropertyValue
(PropertyNames.TargetFramework);
86
=> EnvironmentVariableNames.TryParseTargetFrameworkVersion(projectNode.ProjectInstance.
GetPropertyValue
(PropertyNames.TargetFrameworkVersion));
98
=> IsNetCoreApp(projectNode.ProjectInstance.
GetPropertyValue
(PropertyNames.TargetFrameworkIdentifier));
107
=> projectNode.ProjectInstance.
GetPropertyValue
(PropertyNames.TargetPath) is { Length: >0 } path ? Path.GetDirectoryName(Path.Combine(projectNode.ProjectInstance.Directory, path)) : null;
110
=> projectNode.ProjectInstance.
GetPropertyValue
(PropertyNames.TargetName);
113
=> projectNode.ProjectInstance.
GetPropertyValue
(PropertyNames.IntermediateOutputPath) is { Length: >0 } path ? Path.Combine(projectNode.ProjectInstance.Directory, path) : null;
131
=> project.
GetPropertyValue
(propertyName).Split(';', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries);
137
=> project.
GetPropertyValue
(propertyName) is { Length: >0 } value ? bool.TryParse(value, out var result) && result : defaultValue;
Build\ProjectNodeMap.cs (1)
53
if (node.ProjectInstance.
GetPropertyValue
("TargetFramework") == targetFramework)
Microsoft.Build (8)
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
686
_loggingService.LogComment(buildEventContext, MessageImportance.High, "ProjectCacheHitWithOutputs", buildRequest.ProjectInstance!.
GetPropertyValue
(ReservedPropertyNames.projectName));
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
1518
FileClassifier.Shared.RegisterKnownImmutableLocations(project.
GetPropertyValue
);
Construction\Solution\SolutionProjectGenerator.cs (2)
1103
string directProjectToolsVersion = traversalProject.
GetPropertyValue
("ProjectToolsVersion");
2081
properties[property.Item1] = EscapingUtilities.Escape(traversalProject.
GetPropertyValue
(property.Item1));
Graph\ProjectInterpretation.cs (4)
213
return project.
GetPropertyValue
(GetInnerBuildPropertyName(project));
218
return project.
GetPropertyValue
(PropertyNames.InnerBuildProperty);
223
return project.
GetPropertyValue
(project.
GetPropertyValue
(PropertyNames.InnerBuildPropertyValues));
Microsoft.Build.Engine.OM.UnitTests (10)
Definition\DefinitionEditing_Tests.cs (3)
1485
Assert.Equal("v1", project.CreateProjectInstance().
GetPropertyValue
("p1"));
1510
Assert.Equal("v^1", project.CreateProjectInstance().
GetPropertyValue
("p1"));
1830
Assert.Equal(String.Empty, instance.
GetPropertyValue
("p1"));
Instance\ProjectInstance_Tests.cs (7)
42
Assert.True(i.
GetPropertyValue
("username") != null);
53
Assert.Equal("v1", p.
GetPropertyValue
("p1"));
54
Assert.Equal("v2X", p.
GetPropertyValue
("p2"));
208
Assert.Equal("p2", instance.
GetPropertyValue
("p"));
213
Assert.Equal("", instance.
GetPropertyValue
("p"));
241
Assert.Equal("v1b", first.
GetPropertyValue
("p1"));
242
Assert.Equal("v1", second.
GetPropertyValue
("p1"));
Microsoft.Build.Engine.UnitTests (79)
BackEnd\BuildManager_Tests.cs (5)
523
result.ProjectStateAfterBuild.
GetPropertyValue
("NewProperty").ShouldBe("FunValue");
526
result.ProjectStateAfterBuild.
GetPropertyValue
("RequestedProperty").ShouldBe("IsRequested");
1927
Assert.Equal("bar", instance.
GetPropertyValue
("Foo"));
1953
Assert.Equal("bar", instance.
GetPropertyValue
("Foo"));
1985
Assert.Equal("bar", instance.
GetPropertyValue
("Foo"));
BackEnd\ResultsCache_Tests.cs (4)
330
Assert.Equal("Value1", cachedResponseWithSubsetFlag1.Results.ProjectStateAfterBuild.
GetPropertyValue
("property1"));
331
Assert.Equal("Value2", cachedResponseWithSubsetFlag1.Results.ProjectStateAfterBuild.
GetPropertyValue
("property2"));
335
Assert.Equal("Value1", cachedResponseWithSubsetFlag2.Results.ProjectStateAfterBuild.
GetPropertyValue
("property1"));
336
Assert.Equal("", cachedResponseWithSubsetFlag2.Results.ProjectStateAfterBuild.
GetPropertyValue
("property2"));
BackEnd\TaskHostFactory_Tests.cs (35)
75
string processId = projectInstance.
GetPropertyValue
("PID");
144
string transientPid = projectInstance.
GetPropertyValue
("PID");
145
string sidecarPid = projectInstance.
GetPropertyValue
("PID2");
296
projectInstance.
GetPropertyValue
("BoolOutput").ShouldBe(boolParam);
297
projectInstance.
GetPropertyValue
("BoolArrayOutput").ShouldBe(boolArrayParam);
298
projectInstance.
GetPropertyValue
("ByteOutput").ShouldBe(byteParam);
299
projectInstance.
GetPropertyValue
("ByteArrayOutput").ShouldBe(byteArrayParam);
300
projectInstance.
GetPropertyValue
("SByteOutput").ShouldBe(sbyteParam);
301
projectInstance.
GetPropertyValue
("SByteArrayOutput").ShouldBe(sbyteArrayParam);
302
projectInstance.
GetPropertyValue
("DoubleOutput").ShouldBe(doubleParam);
303
projectInstance.
GetPropertyValue
("DoubleArrayOutput").ShouldBe(doubleArrayParam);
304
projectInstance.
GetPropertyValue
("FloatOutput").ShouldBe(floatParam);
305
projectInstance.
GetPropertyValue
("FloatArrayOutput").ShouldBe(floatArrayParam);
306
projectInstance.
GetPropertyValue
("ShortOutput").ShouldBe(shortParam);
307
projectInstance.
GetPropertyValue
("ShortArrayOutput").ShouldBe(shortArrayParam);
308
projectInstance.
GetPropertyValue
("UShortOutput").ShouldBe(ushortParam);
309
projectInstance.
GetPropertyValue
("UShortArrayOutput").ShouldBe(ushortArrayParam);
310
projectInstance.
GetPropertyValue
("IntOutput").ShouldBe(intParam);
311
projectInstance.
GetPropertyValue
("IntArrayOutput").ShouldBe(intArrayParam);
312
projectInstance.
GetPropertyValue
("UIntOutput").ShouldBe(uintParam);
313
projectInstance.
GetPropertyValue
("UIntArrayOutput").ShouldBe(uintArrayParam);
314
projectInstance.
GetPropertyValue
("LongOutput").ShouldBe(longParam);
315
projectInstance.
GetPropertyValue
("LongArrayOutput").ShouldBe(longArrayParam);
316
projectInstance.
GetPropertyValue
("ULongOutput").ShouldBe(ulongParam);
317
projectInstance.
GetPropertyValue
("ULongArrayOutput").ShouldBe(ulongArrayParam);
318
projectInstance.
GetPropertyValue
("DecimalOutput").ShouldBe(decimalParam);
319
projectInstance.
GetPropertyValue
("DecimalArrayOutput").ShouldBe(decimalArrayParam);
320
projectInstance.
GetPropertyValue
("CharOutput").ShouldBe(charParam);
321
projectInstance.
GetPropertyValue
("CharArrayOutput").ShouldBe(charArrayParam);
322
projectInstance.
GetPropertyValue
("StringOutput").ShouldBe(stringParam);
323
projectInstance.
GetPropertyValue
("StringArrayOutput").ShouldBe(stringArrayParam);
324
projectInstance.
GetPropertyValue
("DateTimeOutput").ShouldBe(dateTimeParam);
325
projectInstance.
GetPropertyValue
("DateTimeArrayOutput").ShouldBe(dateTimeArrayParam);
326
projectInstance.
GetPropertyValue
("CustomStructOutput").ShouldBe(TaskBuilderTestTask.s_customStruct.ToString(CultureInfo.InvariantCulture));
327
projectInstance.
GetPropertyValue
("EnumOutput").ShouldBe(TargetBuiltReason.BeforeTargets.ToString());
Construction\SolutionProjectGenerator_Tests.cs (17)
485
Assert.Equal(t.DefaultSubToolsetVersion, instances[0].
GetPropertyValue
("VisualStudioVersion"));
489
Assert.Equal(String.Empty, instances[0].
GetPropertyValue
("VisualStudioVersion"));
530
Assert.Equal("11.0", instances[0].
GetPropertyValue
("VisualStudioVersion"));
567
Assert.Equal("ABC", instances[0].
GetPropertyValue
("VisualStudioVersion"));
766
Assert.Equal("11.0", instances[0].
GetPropertyValue
("VisualStudioVersion"));
1417
Assert.Equal(toolsVersionParameter, instances[0].
GetPropertyValue
("ProjectToolsVersion"));
1673
Assert.Equal("Debug", instances[0].
GetPropertyValue
("Configuration"));
1676
Assert.Equal("Mixed Platforms", instances[0].
GetPropertyValue
("Platform"));
1705
Assert.Equal("Release", instances[0].
GetPropertyValue
("Configuration"));
1708
Assert.Equal("Any CPU", instances[0].
GetPropertyValue
("Platform"));
1732
Assert.Equal("Debug", msbuildProject.
GetPropertyValue
("AspNetConfiguration"));
1736
Assert.Equal("Release", msbuildProject.
GetPropertyValue
("AspNetConfiguration"));
1761
Assert.Equal("v4.0", msbuildProject.
GetPropertyValue
("TargetFrameworkVersion"));
1771
Assert.Equal("v3.5", msbuildProject.
GetPropertyValue
("TargetFrameworkVersion"));
1775
Assert.Equal("v2.0", msbuildProject.
GetPropertyValue
("TargetFrameworkVersion"));
1781
Assert.Equal("userdefined", msbuildProject.
GetPropertyValue
("TargetFrameworkVersion"));
2815
Assert.Equal(enable ? expectedPropertyValue : string.Empty, projectInstance.
GetPropertyValue
("PropertyA"));
Evaluation\Expander_Tests.cs (2)
5019
projectInstance.
GetPropertyValue
("_value").ShouldBe("-1");
5020
projectInstance.
GetPropertyValue
("_otherValue").ShouldBe("test-value");
Graph\GetCompatiblePlatformGraph_Tests.cs (4)
340
GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.
GetPropertyValue
("Platform").ShouldBe(GetFirstNodeWithProjectNumber(graph, 1).ProjectInstance.
GetPropertyValue
("Platform"));
436
GetFirstNodeWithProjectNumber(graphFromSolution, 2).ProjectInstance.
GetPropertyValue
("Platform").ShouldBe("AnyCPU", "Project2 should have followed the sln config to AnyCPU");
437
GetFirstNodeWithProjectNumber(graphFromSolution, 3).ProjectInstance.
GetPropertyValue
("Platform").ShouldBe("x64", "Project3 isn't in the solution so it should have negotiated to x64 to match Project1");
Graph\GraphTestingUtilities.cs (1)
118
var innerBuildPropertyValue = innerBuild.ProjectInstance.
GetPropertyValue
(InnerBuildPropertyName);
Graph\ProjectGraph_Tests.cs (1)
2143
var referencedInnerBuild = GetNodesWithProjectNumber(graph, 1).First(n => n.ProjectInstance.
GetPropertyValue
(InnerBuildPropertyName) == "a");
Instance\ProjectInstance_Internal_Tests.cs (7)
329
p.
GetPropertyValue
("VisualStudioVersion").ShouldBe(MSBuildConstants.CurrentVisualStudioVersion);
333
p.
GetPropertyValue
("VisualStudioVersion").ShouldBe(p.Toolset.DefaultSubToolsetVersion);
360
p.
GetPropertyValue
("VisualStudioVersion").ShouldBe("ABCD");
388
p.
GetPropertyValue
("VisualStudioVersion").ShouldBe("ABCDE");
429
p.
GetPropertyValue
("VisualStudioVersion").ShouldBe("ABCDEF");
906
projectInstance.
GetPropertyValue
(ReservedPropertyNames.interactive).ShouldBe(interactive ? bool.TrueString : string.Empty, StringCompareShould.IgnoreCase);
934
projectInstance.
GetPropertyValue
(ReservedPropertyNames.interactive).ShouldBe(interactive ? bool.TrueString : string.Empty, StringCompareShould.IgnoreCase);
InstanceFromRemote\ProjectInstance_FromImmutableProjectLink_Tests.cs (1)
50
string value = instance.
GetPropertyValue
(kvp.Key);
ProjectCache\ProjectCacheTests.cs (2)
658
var buildProjectInSolutionValue = node.ProjectInstance.
GetPropertyValue
("BuildProjectInSolution");
663
var projectDependencyValue = node.ProjectInstance.
GetPropertyValue
("ProjectDependency");
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (35)
TargetTests.cs (35)
37
var shouldRun = instance.
GetPropertyValue
("_GeneratedEditorConfigShouldRun");
38
var hasItems = instance.
GetPropertyValue
("_GeneratedEditorConfigHasItems");
61
var shouldRun = instance.
GetPropertyValue
("_GeneratedEditorConfigShouldRun");
62
var hasItems = instance.
GetPropertyValue
("_GeneratedEditorConfigHasItems");
85
var shouldRun = instance.
GetPropertyValue
("_GeneratedEditorConfigShouldRun");
86
var hasItems = instance.
GetPropertyValue
("_GeneratedEditorConfigHasItems");
110
var shouldRun = instance.
GetPropertyValue
("_GeneratedEditorConfigShouldRun");
111
var hasItems = instance.
GetPropertyValue
("_GeneratedEditorConfigHasItems");
137
var shouldRun = instance.
GetPropertyValue
("_GeneratedEditorConfigShouldRun");
138
var hasItems = instance.
GetPropertyValue
("_GeneratedEditorConfigHasItems");
432
var langVersion = instance.
GetPropertyValue
("LangVersion");
433
var maxLangVersion = instance.
GetPropertyValue
("_MaxSupportedLangVersion");
461
var langVersion = instance.
GetPropertyValue
("LangVersion");
462
var maxLangVersion = instance.
GetPropertyValue
("_MaxSupportedLangVersion");
485
var langVersion = instance.
GetPropertyValue
("LangVersion");
486
var maxLangVersion = instance.
GetPropertyValue
("_MaxSupportedLangVersion");
487
var publicMaxLangVersion = instance.
GetPropertyValue
("MaxSupportedLangVersion");
512
var langVersion = instance.
GetPropertyValue
("LangVersion");
513
var maxLangVersion = instance.
GetPropertyValue
("_MaxSupportedLangVersion");
514
var publicMaxLangVersion = instance.
GetPropertyValue
("MaxSupportedLangVersion");
585
var emit = instance.
GetPropertyValue
("EmitCompilerGeneratedFiles");
586
var dir = instance.
GetPropertyValue
("CompilerGeneratedFilesOutputPath");
610
var emit = instance.
GetPropertyValue
("EmitCompilerGeneratedFiles");
611
var dir = instance.
GetPropertyValue
("CompilerGeneratedFilesOutputPath");
631
var emit = instance.
GetPropertyValue
("EmitCompilerGeneratedFiles");
632
var dir = instance.
GetPropertyValue
("CompilerGeneratedFilesOutputPath");
661
var emit = instance.
GetPropertyValue
("EmitCompilerGeneratedFiles");
662
var dir = instance.
GetPropertyValue
("CompilerGeneratedFilesOutputPath");
705
var actualSkipAnalyzersValue = instance.
GetPropertyValue
("_SkipAnalyzers");
764
var actualImplicitlySkippedAnalyzersValue = instance.
GetPropertyValue
("_ImplicitlySkipAnalyzers");
768
var actualSkipAnalyzersValue = instance.
GetPropertyValue
("_SkipAnalyzers");
772
var actualFeaturesValue = instance.
GetPropertyValue
("Features");
815
var msbuildProjectFileName = instance.
GetPropertyValue
("MSBuildProjectFile");
825
var actualLastBuildWithSkipAnalyzers = instance.
GetPropertyValue
("_LastBuildWithSkipAnalyzers");
912
var compilerApiVersionString = instance.
GetPropertyValue
("CompilerApiVersion");
MSBuild (2)
XMake.cs (2)
1125
outputStream.WriteLine(builtProject.
GetPropertyValue
(getProperty[0]));
1130
jsonOutputFormatter.AddPropertiesInJsonFormat(getProperty, property => builtProject.
GetPropertyValue
(property));