20 implementations of GetMetadata
dotnet-watch.Tests (1)
MockTaskItem.cs (1)
63public string GetMetadata(string metadataName)
Microsoft.Build (3)
Instance\ProjectItemInstance.cs (2)
481string ITaskItem.GetMetadata(string metadataName) 1385public string GetMetadata(string metadataName)
TaskParameter.cs (1)
694public string GetMetadata(string metadataName)
Microsoft.Build.Engine.UnitTests (4)
BackEnd\TaskRegistry_Tests.cs (1)
2289public string GetMetadata(string metadataName)
BackEnd\TaskThatReturnsDictionaryTaskItem.cs (1)
54public string GetMetadata(string metadataName)
MockTask.cs (1)
443public string GetMetadata(string attributeName)
TaskThatReturnsMinimalItem.cs (1)
44public string GetMetadata(string metadataName) => "value";
Microsoft.Build.Framework (1)
TaskItemData.cs (1)
76public string GetMetadata(string metadataName)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (1)
TestUtilities\SimpleTaskItem.cs (1)
32public string? GetMetadata(string metadataName) =>
Microsoft.Build.Tasks.Core (1)
TaskParameter.cs (1)
694public string GetMetadata(string metadataName)
Microsoft.Build.Tasks.UnitTests (1)
GenerateBindingRedirects_Tests.cs (1)
394string ITaskItem.GetMetadata(string metadataName)
Microsoft.Build.Utilities.Core (1)
TaskItem.cs (1)
313public string GetMetadata(string metadataName)
Microsoft.NET.Build.Extensions.Tasks.UnitTests (1)
MockTaskItem.cs (1)
63public string GetMetadata(string metadataName)
Microsoft.NET.Build.Tasks.UnitTests (1)
Mocks\MockTaskItem.cs (1)
63public string GetMetadata(string metadataName)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (1)
StaticWebAsset.cs (1)
1524string ITaskItem.GetMetadata(string metadataName) => ((ITaskItem2)this).GetMetadataValueEscaped(metadataName);
Microsoft.NET.Sdk.StaticWebAssets.Tasks (2)
Data\StaticWebAsset.cs (1)
1524string ITaskItem.GetMetadata(string metadataName) => ((ITaskItem2)this).GetMetadataValueEscaped(metadataName);
Data\StaticWebAssetEndpoint.cs (1)
516string ITaskItem.GetMetadata(string metadataName) => ((ITaskItem2)this).GetMetadataValueEscaped(metadataName);
MSBuild (1)
TaskParameter.cs (1)
694public string GetMetadata(string metadataName)
MSBuildTaskHost (1)
TaskParameter.cs (1)
694public string GetMetadata(string metadataName)
2235 references to GetMetadata
Crossgen2Tasks (31)
PrepareForReadyToRunCompilation.cs (5)
73string isVersion5 = Crossgen2Tool.GetMetadata(MetadataKeys.IsVersion5); 76string perfmapVersion = Crossgen2Tool.GetMetadata(MetadataKeys.PerfmapFormatVersion); 86string diaSymReaderPath = CrossgenTool?.GetMetadata(MetadataKeys.DiaSymReader); 134var outputR2RImageRelativePath = file.GetMetadata(MetadataKeys.RelativePath); 235var compositeR2RImageRelativePath = MainAssembly.GetMetadata(MetadataKeys.RelativePath);
ResolveReadyToRunCompilers.cs (6)
61_targetRuntimeIdentifier = _runtimePack?.GetMetadata(MetadataKeys.RuntimeIdentifier); 65string supportedRuntimeIdentifiers = targetingPack?.GetMetadata(MetadataKeys.RuntimePackRuntimeIdentifiers); 107_crossgenTool.PackagePath = _runtimePack?.GetMetadata(MetadataKeys.PackageDirectory); 136_crossgen2Tool.PackagePath = _crossgen2Pack?.GetMetadata(MetadataKeys.PackageDirectory); 138!NuGetVersion.TryParse(_crossgen2Pack.GetMetadata(MetadataKeys.NuGetPackageVersion), out NuGetVersion crossgen2PackVersion)) 201pack => pack.GetMetadata(metadataKey)
RunReadyToRunCompiler.cs (17)
43private string DotNetHostPath => Crossgen2Tool?.GetMetadata(MetadataKeys.DotNetHostPath); 49string version5 = Crossgen2Tool?.GetMetadata(MetadataKeys.IsVersion5); 73private string DiaSymReader => CrossgenTool.GetMetadata(MetadataKeys.DiaSymReader); 82string emitSymbolsMetadata = CompilationEntry.GetMetadata(MetadataKeys.EmitSymbols); 84_createPDBCommand = CompilationEntry.GetMetadata(MetadataKeys.CreatePDBCommand); 85string createCompositeImageMetadata = CompilationEntry.GetMetadata(MetadataKeys.CreateCompositeImage); 115string jitPath = Crossgen2Tool.GetMetadata(MetadataKeys.JitPath); 133if (string.IsNullOrEmpty(Crossgen2Tool.GetMetadata(MetadataKeys.TargetOS))) 138if (string.IsNullOrEmpty(Crossgen2Tool.GetMetadata(MetadataKeys.TargetArch))) 157if (!File.Exists(CrossgenTool.GetMetadata(MetadataKeys.JitPath))) 164_outputPDBImage = CompilationEntry.GetMetadata(MetadataKeys.OutputPDBImage); 190_outputR2RImage = CompilationEntry.GetMetadata(MetadataKeys.OutputR2RImage); 292result.AppendLine($"/JITPath \"{CrossgenTool.GetMetadata(MetadataKeys.JitPath)}\""); 305string jitPath = Crossgen2Tool.GetMetadata(MetadataKeys.JitPath); 312result.AppendLine($"--targetos:{Crossgen2Tool.GetMetadata(MetadataKeys.TargetOS)}"); 313result.AppendLine($"--targetarch:{Crossgen2Tool.GetMetadata(MetadataKeys.TargetArch)}"); 331string perfmapFormatVersion = Crossgen2Tool.GetMetadata(MetadataKeys.PerfmapFormatVersion);
ShimFilesSimulatingLogicInSdkRepo\SimpleItemUtilities.cs (3)
16string value = item.GetMetadata(metadataName); 28string value = item.GetMetadata(name); 35string value = item.GetMetadata(name);
dotnet (4)
Commands\Run\VirtualProjectBuildingCommand.cs (4)
479.Select(static i => i.GetMetadata(Constants.Identity)) 483cache.CurrentEntry.BuildResultFile = buildResultItem.GetMetadata(Constants.FullPath); 597writer.WriteString("Identity", item.GetMetadata("Identity")); 606writer.WriteString(metadatumName, item.GetMetadata(metadatumName));
dotnet-watch (1)
HotReload\HotReloadDotNetWatcher.cs (1)
612var targetPath = Path.Combine(outputDir, item.GetMetadata(MetadataNames.TargetPath));
DotNetWatchTasks (3)
FileSetSerializer.cs (3)
30var fullPath = item.GetMetadata("FullPath"); 31var staticWebAssetPath = item.GetMetadata("StaticWebAssetPath"); 34var projectFullPath = item.GetMetadata("ProjectFullPath");
HelixTasks (4)
CreateLocalHelixTestLayout.cs (2)
25var copyfrom = new DirectoryInfo(payload.GetMetadata("PayloadDirectory")); 26var relativeDestinationPathOnHelix = payload.GetMetadata("Destination");
TaskItemExtensions.cs (2)
13value = item.GetMetadata(key); 19value = item.GetMetadata(key);
ILLink.Tasks (10)
LinkTask.cs (10)
323string rootMode = assemblyItem.GetMetadata("RootMode"); 372string assemblyTrimMode = assembly.GetMetadata("TrimMode"); 373string isTrimmable = assembly.GetMetadata("IsTrimmable"); 397string optimizationValue = assembly.GetMetadata(optimization); 408string singleWarn = assembly.GetMetadata("TrimmerSingleWarn"); 486var value = customData.GetMetadata("Value"); 498var featureValue = featureSetting.GetMetadata("Value"); 523var stepType = customStep.GetMetadata("Type"); 529var beforeStep = customStep.GetMetadata("BeforeStep"); 530var afterStep = customStep.GetMetadata("AfterStep");
installer.tasks (9)
GenerateFileVersionProps.cs (5)
47var targetPath = file.GetMetadata("TargetPath"); 54if (file.GetMetadata("IsSymbolFile").Equals("true", StringComparison.OrdinalIgnoreCase)) 165var filePath = file.GetMetadata("FullPath"); 181Version.TryParse(file.GetMetadata("AssemblyVersion"), out assemblyVersion); 182Version.TryParse(file.GetMetadata("FileVersion"), out fileVersion);
RegenerateDownloadTable.cs (3)
117string parenthetical = platform.GetMetadata("Parenthetical"); 127string branchAbbr = branch.GetMetadata("Abbr"); 133string platformAbbr = platform.GetMetadata("Abbr");
StaticFileRegeneration\RegenerateThirdPartyNotices.cs (1)
55string branch = item.GetMetadata("Branch")
Microsoft.AspNetCore.Mvc.Testing.Tasks (2)
GenerateMvcTestManifestTask.cs (2)
38var contentRoot = project.GetMetadata("ContentRoot"); 39var assemblyName = project.GetMetadata("Identity");
Microsoft.Build (19)
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (11)
329if (TryParseSkipNonExistentProjects(project.GetMetadata("SkipNonexistentProjects"), out SkipNonExistentProjectsBehavior behavior)) 562if (!String.IsNullOrEmpty(projects[i].GetMetadata(ItemMetadataNames.PropertiesMetadataName))) 568projects[i].GetMetadata(ItemMetadataNames.PropertiesMetadataName).Split(MSBuildConstants.SemicolonChar, StringSplitOptions.RemoveEmptyEntries), 584string projectUndefineProperties = projects[i].GetMetadata(ItemMetadataNames.UndefinePropertiesMetadataName); 606if (!String.IsNullOrEmpty(projects[i].GetMetadata(ItemMetadataNames.AdditionalPropertiesMetadataName))) 612projects[i].GetMetadata(ItemMetadataNames.AdditionalPropertiesMetadataName).Split(MSBuildConstants.SemicolonChar, StringSplitOptions.RemoveEmptyEntries), 639if (!String.IsNullOrEmpty(projects[i].GetMetadata("ToolsVersion"))) 641toolsVersions[i] = projects[i].GetMetadata("ToolsVersion"); 706if (String.IsNullOrEmpty(outputItemFromTarget.GetMetadata(ItemMetadataNames.msbuildSourceProjectFile))) 708outputItemFromTarget.SetMetadata(ItemMetadataNames.msbuildSourceProjectFile, projects[i].GetMetadata(FileUtilities.ItemSpecModifiers.FullPath)); 713if (String.IsNullOrEmpty(outputItemFromTarget.GetMetadata(ItemMetadataNames.msbuildSourceTargetName)))
Instance\ProjectItemInstance.cs (2)
1500originalItemSpec = destinationItem.GetMetadata("OriginalItemSpec"); 1536string destinationValue = destinationItem.GetMetadata(metadatum.Key);
Logging\ParallelLogger\ParallelConsoleLogger.cs (1)
901WriteMessageAligned($"{new String(' ', 4 * tabWidth)}{metadatum.Key} = {item.GetMetadata(metadatum.Key as string)}", false);
Logging\TerminalLogger\TerminalLogger.cs (1)
1022.FirstOrDefault(root => !string.IsNullOrEmpty(root.GetMetadata("SourceControl")))
TaskParameter.cs (4)
598_escapedDefiningProject = EscapingUtilities.EscapeWithCaching(copyFrom.GetMetadata(FileUtilities.ItemSpecModifiers.DefiningProjectFullPath)); 751string originalItemSpec = destinationItem.GetMetadata("OriginalItemSpec"); 758.Where(metadatum => string.IsNullOrEmpty(destinationItem.GetMetadata(metadatum.Key))); 776string value = destinationItem.GetMetadata(entry.Key);
Microsoft.Build.Engine.OM.UnitTests (6)
Instance\ProjectItemInstance_Tests.cs (6)
166Assert.Equal("v1", toItem.GetMetadata("m1")); 167Assert.Equal("v2", toItem.GetMetadata("m2")); 327Assert.Equal("m1", taskItem.GetMetadata("m")); 351Assert.Equal("m;1", taskItem.GetMetadata("m;")); 363Assert.Equal("m;2", taskItem2.GetMetadata("m;")); 420Assert.Equal(String.Empty, taskItem.GetMetadata("m"));
Microsoft.Build.Engine.UnitTests (41)
BackEnd\SdkResultOutOfProc_Tests.cs (1)
188return targetresult.Items.Where(i => i.GetMetadata("Type").Equals(type, StringComparison.OrdinalIgnoreCase))
BackEnd\TranslationHelpers.cs (1)
239var value = taskItem.GetMetadata(name);
BuildEventArgsSerialization_Tests.cs (1)
1211return i.ItemSpec + string.Join(";", i.CloneCustomMetadata().Keys.OfType<string>().Select(k => i.GetMetadata(k)));
Construction\SolutionProjectGenerator_Tests.cs (7)
1326string skipNonexistentProjects = item.GetMetadata("SkipNonexistentProjects"); 1337Assert.Equal("Debug", item.GetMetadata("Configuration")); 1338Assert.Equal("Mixed Platforms", item.GetMetadata("Platform")); 1339Assert.Contains("<SolutionConfiguration>", item.GetMetadata("Content")); 1343Assert.Equal("Release", item.GetMetadata("Configuration")); 1344Assert.Equal("Any CPU", item.GetMetadata("Platform")); 1345Assert.Contains("<SolutionConfiguration>", item.GetMetadata("Content"));
Definition\ItemDefinitionGroup_Tests.cs (6)
609Assert.Equal("M-A(b)", withMetaItem.GetMetadata("MetaA")); 610Assert.Equal("M-B(b)", withMetaItem.GetMetadata("MetaB")); 648Assert.Equal("NEWMETA_A", withMetaItem.GetMetadata("MetaA")); 649Assert.Equal("M-B(b)", withMetaItem.GetMetadata("MetaB")); 692Assert.Equal("M-A(b)", withMetaItem.GetMetadata("MetaA")); 693Assert.Equal("M-B(b)", withMetaItem.GetMetadata("MetaB"));
FixPathOnUnix_Tests.cs (1)
69Log.LogMessage($"ItemMetadata: {name} = {item.GetMetadata(name)}");
ProjectCache\ProjectCacheTests.cs (2)
884itemResult.GetMetadata("File").ShouldBe(Path.GetFileName(projectPath)); 885itemResult.GetMetadata(expectedMetadata).ShouldBe("true");
TaskParameter_Tests.cs (18)
227Assert.Equal("a1", foo.GetMetadata("a")); 228Assert.Equal("b1", foo.GetMetadata("b")); 238Assert.Equal("a1", foo2.GetMetadata("a")); 239Assert.Equal("b1", foo2.GetMetadata("b")); 376Assert.Equal("a1%b1", foo.GetMetadata("a")); 377Assert.Equal("c1(d1", foo.GetMetadata("b")); 387Assert.Equal("a1%b1", foo2.GetMetadata("a")); 388Assert.Equal("c1(d1", foo2.GetMetadata("b")); 409Assert.Equal("a1%25b1", foo.GetMetadata("a")); 410Assert.Equal("c1%28d1", foo.GetMetadata("b")); 420Assert.Equal("a1%25b1", foo2.GetMetadata("a")); 421Assert.Equal("c1%28d1", foo2.GetMetadata("b")); 433Assert.Equal("a1%25b1", foo4.GetMetadata("a")); 434Assert.Equal("c1%28d1", foo4.GetMetadata("b")); 456Assert.Equal("a1(b1", foo.GetMetadata("a")); 457Assert.Equal("c1)d1", foo.GetMetadata("b")); 469Assert.Equal("a1(b1", foo2.GetMetadata("a")); 470Assert.Equal("c1)d1", foo2.GetMetadata("b"));
TestComparers\TaskItemComparer.cs (4)
56if (x.GetMetadata(metadataName) != y.GetMetadata(metadataName)) 68if (x.GetMetadata(metadataName) != y.GetMetadata(metadataName))
Microsoft.Build.Framework (1)
ITaskItemExtensions.cs (1)
50valueOrError = taskItem.GetMetadata(metadataName);
Microsoft.Build.Tasks.CodeAnalysis (14)
src\Compilers\Core\MSBuildTask\CommandLineBuilderExtension.cs (1)
254string metadataValue = parameter.GetMetadata(metadataNames[i]);
src\Compilers\Core\MSBuildTask\Csc.cs (1)
348string aliasString = reference.GetMetadata("Aliases");
src\Compilers\Core\MSBuildTask\GenerateMSBuildEditorConfig.cs (5)
78.AppendLine(prop.GetMetadata("Value")); 82var groupedItems = MetadataItems.GroupBy(i => NormalizeWithForwardSlash(i.GetMetadata("FullPath"))); 94string itemType = item.GetMetadata("ItemType"); 95string metadataName = item.GetMetadata("MetadataName"); 103.AppendLine(item.GetMetadata(metadataName));
src\Compilers\Core\MSBuildTask\MapSourceRoots.cs (6)
128if (!string.IsNullOrEmpty(root.GetMetadata(Names.SourceControl)) == sourceControlled) 131string nestedRoot = root.GetMetadata(Names.NestedRoot); 167string nestedRoot = root.GetMetadata(Names.NestedRoot); 170string containingRoot = root.GetMetadata(Names.ContainingRoot); 209var leftValue = left.GetMetadata(metadataName); 210var rightValue = right.GetMetadata(metadataName);
src\Compilers\Core\MSBuildTask\Utilities.cs (1)
38string metadataValue = item.GetMetadata(itemMetadataName);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (14)
src\Compilers\Core\MSBuildTask\CommandLineBuilderExtension.cs (1)
254string metadataValue = parameter.GetMetadata(metadataNames[i]);
src\Compilers\Core\MSBuildTask\Csc.cs (1)
348string aliasString = reference.GetMetadata("Aliases");
src\Compilers\Core\MSBuildTask\GenerateMSBuildEditorConfig.cs (5)
78.AppendLine(prop.GetMetadata("Value")); 82var groupedItems = MetadataItems.GroupBy(i => NormalizeWithForwardSlash(i.GetMetadata("FullPath"))); 94string itemType = item.GetMetadata("ItemType"); 95string metadataName = item.GetMetadata("MetadataName"); 103.AppendLine(item.GetMetadata(metadataName));
src\Compilers\Core\MSBuildTask\MapSourceRoots.cs (6)
128if (!string.IsNullOrEmpty(root.GetMetadata(Names.SourceControl)) == sourceControlled) 131string nestedRoot = root.GetMetadata(Names.NestedRoot); 167string nestedRoot = root.GetMetadata(Names.NestedRoot); 170string containingRoot = root.GetMetadata(Names.ContainingRoot); 209var leftValue = left.GetMetadata(metadataName); 210var rightValue = right.GetMetadata(metadataName);
src\Compilers\Core\MSBuildTask\Utilities.cs (1)
38string metadataValue = item.GetMetadata(itemMetadataName);
Microsoft.Build.Tasks.CodeAnalysis.Sdk.UnitTests (1)
src\Compilers\Core\MSBuildTaskTests\TestUtilities\MSBuildUtil.cs (1)
33taskItem.Setup(x => x.GetMetadata(It.IsAny<string>())).Returns<string>(s => s switch
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (26)
MapSourceRootTests.cs (25)
20$" SourceControl='{sourceRoot.GetMetadata("SourceControl")}'" + 21$" RevisionId='{sourceRoot.GetMetadata("RevisionId")}'" + 22$" NestedRoot='{sourceRoot.GetMetadata("NestedRoot")}'" + 23$" ContainingRoot='{sourceRoot.GetMetadata("ContainingRoot")}'" + 24$" MappedPath='{sourceRoot.GetMetadata("MappedPath")}'" + 25$" SourceLinkUrl='{sourceRoot.GetMetadata("SourceLinkUrl")}'"; 61Assert.Equal(@"/_1/", task.MappedSourceRoots[0].GetMetadata("MappedPath")); 64Assert.Equal(@"/_2/", task.MappedSourceRoots[1].GetMetadata("MappedPath")); 67Assert.Equal(@"/_/", task.MappedSourceRoots[2].GetMetadata("MappedPath")); 68Assert.Equal(@"Git", task.MappedSourceRoots[2].GetMetadata("SourceControl")); 71Assert.Equal(@"/_/a/b/", task.MappedSourceRoots[3].GetMetadata("MappedPath")); 72Assert.Equal(@"Git", task.MappedSourceRoots[3].GetMetadata("SourceControl")); 73Assert.Equal(@"some value", task.MappedSourceRoots[3].GetMetadata("some metadata")); 110Assert.Equal(@"/_1/", task.MappedSourceRoots[0].GetMetadata("MappedPath")); 113Assert.Equal(@"/_/", task.MappedSourceRoots[1].GetMetadata("MappedPath")); 114Assert.Equal(@"Git", task.MappedSourceRoots[1].GetMetadata("SourceControl")); 117Assert.Equal(@"/_/|||:;/", task.MappedSourceRoots[2].GetMetadata("MappedPath")); 118Assert.Equal(@"Git", task.MappedSourceRoots[2].GetMetadata("SourceControl")); 187Assert.Equal(@"/_/", task.MappedSourceRoots[0].GetMetadata("MappedPath")); 190Assert.Equal(@"/_/a/a/", task.MappedSourceRoots[1].GetMetadata("MappedPath")); 193Assert.Equal(@"/_/a/b/", task.MappedSourceRoots[2].GetMetadata("MappedPath")); 196Assert.Equal(@"/_/a/c/", task.MappedSourceRoots[3].GetMetadata("MappedPath")); 225Assert.Equal(@"/_/", task.MappedSourceRoots[0].GetMetadata("MappedPath")); 228Assert.Equal(@"/_1/", task.MappedSourceRoots[1].GetMetadata("MappedPath")); 231Assert.Equal(@"/_2/", task.MappedSourceRoots[2].GetMetadata("MappedPath"));
TestUtilities\MSBuildUtil.cs (1)
33taskItem.Setup(x => x.GetMetadata(It.IsAny<string>())).Returns<string>(s => s switch
Microsoft.Build.Tasks.Core (165)
AssemblyDependency\GenerateBindingRedirects.cs (1)
370var maxVerStr = redirect.GetMetadata("MaxVersion");
AssemblyDependency\Node\RarNodeExecuteResponse.cs (1)
72: taskItem.GetMetadata(ItemMetadataNames.copyLocal);
AssemblyDependency\Reference.cs (1)
893SDKName = sourceItem.GetMetadata("SDKName");
AssemblyDependency\ReferenceTable.cs (13)
343string sdkName = resolvedSDK.GetMetadata("SDKName"); 561string executableExtension = referenceAssemblyName.GetMetadata(ItemMetadataNames.executableExtension); 567string fusionName = referenceAssemblyName.GetMetadata(ItemMetadataNames.fusionName); 602reference.HintPath = referenceAssemblyName.GetMetadata(ItemMetadataNames.hintPath); 638reference.AssemblyFolderKey = referenceAssemblyName.GetMetadata(ItemMetadataNames.assemblyFolderKey); 846string version = item.GetMetadata(ItemMetadataNames.assemblyVersion); 852string publicKeyToken = item.GetMetadata(ItemMetadataNames.publicKeyToken); 858string name = item.GetMetadata(ItemMetadataNames.assemblyName); 862name = item.GetMetadata(FileUtilities.ItemSpecModifiers.Filename); 939var implementationFile = reference.PrimarySourceItem.GetMetadata(ItemMetadataNames.winmdImplmentationFile); 1276string frameworkReferenceName = reference.PrimarySourceItem.GetMetadata(ItemMetadataNames.frameworkReferenceName); 2802referenceItem.SetMetadata(ItemMetadataNames.projectReferenceOriginalItemSpec, reference.PrimarySourceItem.GetMetadata("OriginalItemSpec")); 3037string meta = item.GetMetadata(key);
AssemblyDependency\ResolveAssemblyReference.cs (8)
1661string metadataValue = item.GetMetadata(metadataName); 2693Log.LogErrorWithCodeFromResources("ResolveAssemblyReference.MismatchBetweenTargetedAndReferencedArch", ProcessorArchitectureToString(processorArchitecture), item.GetMetadata("OriginalItemSpec"), ProcessorArchitectureToString(assemblyArch)); 2697Log.LogWarningWithCodeFromResources("ResolveAssemblyReference.MismatchBetweenTargetedAndReferencedArch", ProcessorArchitectureToString(processorArchitecture), item.GetMetadata("OriginalItemSpec"), ProcessorArchitectureToString(assemblyArch)); 2818if (String.IsNullOrEmpty(item.GetMetadata("FrameworkDirectory"))) 3095string frameworkDirectory = installedAssemblyTable.GetMetadata(ItemMetadataNames.frameworkDirectory); 3165string subType = assembly.GetMetadata(ItemMetadataNames.subType); 3170else if (!IsAvailableForTargetFramework(assembly.GetMetadata(ItemMetadataNames.targetFramework))) 3172Log.LogWarningWithCodeFromResources("ResolveAssemblyReference.FailedToResolveReferenceBecauseHigherTargetFramework", assembly.ItemSpec, assembly.GetMetadata(ItemMetadataNames.targetFramework));
AssignCulture.cs (4)
148string dependentUpon = AssignedFiles[i].GetMetadata(ItemMetadataNames.dependentUpon); 149string existingCulture = AssignedFiles[i].GetMetadata(ItemMetadataNames.culture); 165ConversionUtilities.ValidBooleanFalse(AssignedFiles[i].GetMetadata(ItemMetadataNames.withCulture))); 200AssignedFiles[i].GetMetadata(ItemMetadataNames.culture),
AssignLinkMetadata.cs (4)
47string definingProject = item.GetMetadata(FileUtilities.ItemSpecModifiers.DefiningProjectFullPath); 48string definingProjectDirectory = item.GetMetadata(FileUtilities.ItemSpecModifiers.DefiningProjectDirectory); 49string fullPath = item.GetMetadata(FileUtilities.ItemSpecModifiers.FullPath); 52String.IsNullOrEmpty(item.GetMetadata("Link"))
AssignProjectConfiguration.cs (5)
204Log.LogMessageFromResources(MessageImportance.Low, "AssignProjectConfiguration.ProjectConfigurationResolutionSuccess", projectRef.ItemSpec, resolvedReference.GetMetadata(attrFullConfiguration)); 213string globalPropertiesToRemove = projectRef.GetMetadata("GlobalPropertiesToRemove"); 284if (String.Equals(projectRef.GetMetadata("Extension"), ".vcxproj", StringComparison.OrdinalIgnoreCase)) 347string buildReferenceMetadata = resolvedProjectWithConfiguration.GetMetadata(buildReferenceMetadataName); 348string referenceOutputAssemblyMetadata = resolvedProjectWithConfiguration.GetMetadata(referenceOutputAssemblyMetadataName);
AssignTargetPath.cs (2)
80string targetPath = Files[i].GetMetadata(ItemMetadataNames.targetPath); 85targetPath = Files[i].GetMetadata(ItemMetadataNames.link);
CombineTargetFrameworkInfoProperties.cs (1)
54root.Add(new XElement(item.ItemSpec, item.GetMetadata("Value")));
CommandLineBuilderExtension.cs (1)
251string metadataValue = parameter.GetMetadata(metadataNames[i]);
ConvertToAbsolutePath.cs (1)
64path.ItemSpec = EscapingUtilities.Escape(path.GetMetadata("FullPath"));
CreateCSharpManifestResourceName.cs (2)
44culture = item.GetMetadata("Culture"); 47treatAsCultureNeutral = ConversionUtilities.ValidBooleanFalse(item.GetMetadata("WithCulture"));
CreateItem.cs (1)
118if ((!PreserveExistingMetadata) || String.IsNullOrEmpty(newItem.GetMetadata(nameAndValue.Key)))
CreateManifestResourceName.cs (7)
160string dependentUpon = resourceFile.GetMetadata(ItemMetadataNames.dependentUpon); 162string fileType = resourceFile.GetMetadata("Type"); 181if (resourceFile.GetMetadata("WithCulture") == "true") 183string culture = resourceFile.GetMetadata("Culture"); 230resourceFile.GetMetadata(ItemMetadataNames.targetPath), 246if (string.IsNullOrEmpty(ResourceFilesWithManifestResourceNames[i].GetMetadata("LogicalName")) && 247string.Equals(ResourceFilesWithManifestResourceNames[i].GetMetadata("Type"), "Non-Resx", StringComparison.OrdinalIgnoreCase))
CreateVisualBasicManifestResourceName.cs (2)
43culture = item.GetMetadata("Culture"); 46treatAsCultureNeutral = ConversionUtilities.ValidBooleanFalse(item.GetMetadata("WithCulture"));
FileIO\GetFileHash.cs (1)
115Hash = Files[0].GetMetadata(MetadataName);
FindInvalidProjectReferences.cs (1)
93string referencePlatformMoniker = item.GetMetadata(ReferencePlatformMonikerMetadata);
GenerateApplicationManifest.cs (4)
230string name = item.GetMetadata("Name"); 255DefaultIcon = item.GetMetadata("DefaultIcon"), 256Description = item.GetMetadata("Description"), 258ProgId = item.GetMetadata("Progid")
GenerateManifestBase.cs (10)
91string hintPath = item.GetMetadata("HintPath"); 140string isPrimary = item.GetMetadata(ItemMetadataNames.isPrimary); 161file.IsDataFile = ConvertUtil.ToBoolean(item.GetMetadata("IsDataFile")); 334string targetPath = item.GetMetadata(ItemMetadataNames.targetPath); 363string value = item.GetMetadata("AssemblyType"); 384string value = item.GetMetadata("EmbedInteropTypes"); 394string value = item.GetMetadata("DependencyType"); 534string targetPath = item.GetMetadata(ItemMetadataNames.targetPath); 543file.Group = item.GetMetadata("Group"); 547file.IncludeHash = ConvertUtil.ToBoolean(item.GetMetadata("IncludeHash"), true);
GenerateResource.cs (2)
1473if (!set.Add(item.GetMetadata("FullPath"))) 2526string fusionName = assemblyFile.GetMetadata(ItemMetadataNames.fusionName);
GetCompatiblePlatform.cs (4)
59string referencedProjectPlatform = AssignedProjectsWithPlatform[i].GetMetadata("Platform"); 60string projectReferencePlatformsMetadata = AssignedProjectsWithPlatform[i].GetMetadata("Platforms"); 61string projectReferenceLookupTableMetadata = AssignedProjectsWithPlatform[i].GetMetadata("PlatformLookupTable"); 62string projectReferenceOverridePlatformNegotiationMetadata = AssignedProjectsWithPlatform[i].GetMetadata("OverridePlatformNegotiationValue");
GetSDKReferenceFiles.cs (29)
258string sdkName = resolvedSDKReference.GetMetadata("SDKName"); 259string sdkIdentity = resolvedSDKReference.GetMetadata("OriginalItemSpec"); 261string targetedConfiguration = resolvedSDKReference.GetMetadata("TargetedSDKConfiguration"); 262string targetedArchitecture = resolvedSDKReference.GetMetadata("TargetedSDKArchitecture"); 346Log.LogMessageFromResources("GetSDKReferenceFiles.ConflictRedistDifferentSDK", winner.TargetPath, winner.SDKReferenceItem.GetMetadata("OriginalItemSpec"), redist.SDKReferenceItem.GetMetadata("OriginalItemSpec"), winner.RedistFile, redist.RedistFile); 350string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("GetSDKReferenceFiles.ConflictRedistDifferentSDK", winner.TargetPath, winner.SDKReferenceItem.GetMetadata("OriginalItemSpec"), redist.SDKReferenceItem.GetMetadata("OriginalItemSpec"), winner.RedistFile, redist.RedistFile); 362if (bool.TryParse(resolvedSDKReference.GetMetadata("ExpandReferenceAssemblies"), out bool expandSDK) && expandSDK) 427Log.LogMessageFromResources("GetSDKReferenceFiles.ConflictReferenceDifferentSDK", winner.SDKReferenceItem.GetMetadata("OriginalItemSpec"), reference.SDKReferenceItem.GetMetadata("OriginalItemSpec"), winner.AssemblyLocation, reference.AssemblyLocation); 431string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("GetSDKReferenceFiles.ConflictReferenceDifferentSDK", winner.SDKReferenceItem.GetMetadata("OriginalItemSpec"), reference.SDKReferenceItem.GetMetadata("OriginalItemSpec"), winner.AssemblyLocation, reference.AssemblyLocation); 464outputItem.SetMetadata(ItemMetadataNames.msbuildReferenceFromSDK, reference.SDKReferenceItem.GetMetadata("OriginalItemSpec")); 465outputItem.SetMetadata(ItemMetadataNames.msbuildReferenceGrouping, reference.SDKReferenceItem.GetMetadata("OriginalItemSpec")); 466outputItem.SetMetadata(ItemMetadataNames.msbuildReferenceGroupingDisplayName, reference.SDKReferenceItem.GetMetadata("DisplayName")); 468string sdkIdentity = reference.SDKReferenceItem.GetMetadata("OriginalItemSpec"); 545outputItem.SetMetadata("OriginalItemSpec", file.SDKReferenceItem.GetMetadata("OriginalItemSpec")); 599Log.LogMessageFromResources("GetSDKReferenceFiles.ConflictReferenceSameSDK", winner.SDKReferenceItem.GetMetadata("OriginalItemSpec"), winner.AssemblyLocation.Replace(winner.SDKReferenceItem.ItemSpec, String.Empty), resolvedReference.AssemblyLocation.Replace(resolvedReference.SDKReferenceItem.ItemSpec, String.Empty)); 603string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("GetSDKReferenceFiles.ConflictReferenceSameSDK", winner.SDKReferenceItem.GetMetadata("OriginalItemSpec"), winner.AssemblyLocation.Replace(winner.SDKReferenceItem.ItemSpec, String.Empty), resolvedReference.AssemblyLocation.Replace(resolvedReference.SDKReferenceItem.ItemSpec, String.Empty)); 625string targetPathRoot = sdkReference.GetMetadata("CopyRedistToSubDirectory"); 639Log.LogMessageFromResources("GetSDKReferenceFiles.ConflictRedistSameSDK", redistFile.TargetPath, redistFile.SDKReferenceItem.GetMetadata("OriginalItemSpec"), winner.RedistFile.Replace(redistFile.SDKReferenceItem.ItemSpec, String.Empty), redistFile.RedistFile.Replace(redistFile.SDKReferenceItem.ItemSpec, String.Empty)); 643string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("GetSDKReferenceFiles.ConflictRedistSameSDK", redistFile.TargetPath, redistFile.SDKReferenceItem.GetMetadata("OriginalItemSpec"), winner.RedistFile.Replace(redistFile.SDKReferenceItem.ItemSpec, String.Empty), redistFile.RedistFile.Replace(redistFile.SDKReferenceItem.ItemSpec, String.Empty)); 663string sdkIdentity = sdk.GetMetadata("OriginalItemSpec"); 703sdk.GetMetadata(GetInstalledSDKLocations.SDKNameMetadataName), 706sdk.GetMetadata(GetInstalledSDKLocations.DirectoryRootsMetadataName), 707sdk.GetMetadata(GetInstalledSDKLocations.ExtensionDirectoryRootsMetadataName), 708sdk.GetMetadata(GetInstalledSDKLocations.RegistryRootMetadataName), 733bool.TryParse(sdkReferenceItem.GetMetadata("CopyLocalExpandedReferenceAssemblies"), out _copyLocal);
InstalledSDKResolver.cs (2)
57string configuration = resolvedSDK.GetMetadata("TargetedSDKConfiguration"); 58string architecture = resolvedSDK.GetMetadata("TargetedSDKArchitecture");
MetadataConversionUtilities.cs (1)
32string metadataValue = item.GetMetadata(itemMetadataName);
MSBuild.cs (11)
295if (TryParseSkipNonExistentProjects(project.GetMetadata("SkipNonexistentProjects"), out SkipNonExistentProjectsBehavior behavior)) 519if (!String.IsNullOrEmpty(projects[i].GetMetadata("Properties"))) 522log, ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("General.OverridingProperties", projectNames[i]), "Properties", projects[i].GetMetadata("Properties").Split(MSBuildConstants.SemicolonChar), 537string projectUndefineProperties = projects[i].GetMetadata("UndefineProperties"); 559if (!String.IsNullOrEmpty(projects[i].GetMetadata("AdditionalProperties"))) 562log, ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("General.AdditionalProperties", projectNames[i]), "AdditionalProperties", projects[i].GetMetadata("AdditionalProperties").Split(MSBuildConstants.SemicolonChar), 588if (!String.IsNullOrEmpty(projects[i].GetMetadata("ToolsVersion"))) 590toolsVersions[i] = projects[i].GetMetadata("ToolsVersion"); 655if (String.IsNullOrEmpty(outputItemFromTarget.GetMetadata(ItemMetadataNames.msbuildSourceProjectFile))) 657outputItemFromTarget.SetMetadata(ItemMetadataNames.msbuildSourceProjectFile, projects[i].GetMetadata(FileUtilities.ItemSpecModifiers.FullPath)); 662if (String.IsNullOrEmpty(outputItemFromTarget.GetMetadata(ItemMetadataNames.msbuildSourceTargetName)))
RequiresFramework35SP1Assembly.cs (1)
158(string.Equals(candidateFile.GetMetadata("IncludeHash"), "false", StringComparison.OrdinalIgnoreCase)
ResolveManifestFiles.cs (20)
299targetPath = item.GetMetadata(ItemMetadataNames.targetPath); 336string copyLocal = item.GetMetadata(ItemMetadataNames.copyLocal); 348string itemCulture = item.GetMetadata("Culture"); 362string targetPath = item.GetMetadata(ItemMetadataNames.targetPath); 365targetPath = item.GetMetadata(ItemMetadataNames.destinationSubPath); 371string assemblyType = item.GetMetadata("AssemblyType"); 464string dependencyType = entry.item.GetMetadata("DependencyType"); 529string itemDestPath = item.GetMetadata(ItemMetadataNames.targetPath); 532itemDestPath = item.GetMetadata(ItemMetadataNames.destinationSubPath); 535string assemblyDestPath = assembly.GetMetadata(ItemMetadataNames.targetPath); 538assemblyDestPath = assembly.GetMetadata(ItemMetadataNames.destinationSubPath); 674string targetPath = entryPoint.GetMetadata("TargetPath"); 719string fileType = item.GetMetadata("FileType"); 783string str = item.GetMetadata("IsRedistRoot"); 810this.group = item.GetMetadata("Group"); 811this.state = StringToPublishState(item.GetMetadata("PublishState")); 812this.includeHash = item.GetMetadata("IncludeHash"); 813this.targetPath = item.GetMetadata(ItemMetadataNames.targetPath); 854string fusionName = item.GetMetadata(ItemMetadataNames.fusionName); 857string destSubDir = item.GetMetadata(ItemMetadataNames.destinationSubDirectory);
ResolveProjectBase.cs (4)
59string attrValue = reference.GetMetadata(missingAttribute); 86_cachedProjectReferencesByAbsolutePath.Add(reference.GetMetadata("FullPath")); // metadata is cached and used again later 125string projectGuid = projectRef.GetMetadata(attributeProject); 134string projectFullPath = projectRef.GetMetadata("FullPath"); // reserved metadata "FullPath" is used at it will cache the value
ResolveSDKReference.cs (13)
305string sdkName = installedsdk.GetMetadata(SDKName); 320string sdkName = referenceItem.GetMetadata(SDKName); 921System.Version.TryParse(sdk.GetMetadata(SDKPlatformVersion), out Version targetPlatformVersionFromItem); 928ResolvedItem.SetMetadata(GetInstalledSDKLocations.DirectoryRootsMetadataName, sdk.GetMetadata(GetInstalledSDKLocations.DirectoryRootsMetadataName)); 929ResolvedItem.SetMetadata(GetInstalledSDKLocations.ExtensionDirectoryRootsMetadataName, sdk.GetMetadata(GetInstalledSDKLocations.ExtensionDirectoryRootsMetadataName)); 930ResolvedItem.SetMetadata(GetInstalledSDKLocations.RegistryRootMetadataName, sdk.GetMetadata(GetInstalledSDKLocations.RegistryRootMetadataName)); 1002string metadataValue = item.GetMetadata(metadataName); 1192string sdkConfiguration = ReferenceItem.GetMetadata(TargetedSDKConfiguration); 1195string sdkArchitecture = ReferenceItem.GetMetadata(TargetedSDKArchitecture).Length > 0 ? ReferenceItem.GetMetadata(TargetedSDKArchitecture) : targetArchitecture; 1443bool hasExpandReferenceAssemblies = bool.TryParse(ReferenceItem.GetMetadata(SDKManifest.Attributes.ExpandReferenceAssemblies), out result); 1444bool hasCopyRedist = bool.TryParse(ReferenceItem.GetMetadata(SDKManifest.Attributes.CopyRedist), out result); 1445bool hasCopyLocalExpandedReferenceAssemblies = bool.TryParse(ReferenceItem.GetMetadata(SDKManifest.Attributes.CopyLocalExpandedReferenceAssemblies), out result);
SetRidAgnosticValueForProjects.cs (4)
24var hasSingleTargetFrameworkString = p.GetMetadata("HasSingleTargetFramework"); 32var nearestTargetFramework = p.GetMetadata("NearestTargetFramework"); 38var targetFrameworksArray = p.GetMetadata("TargetFrameworks").Split(';'); 46var isRidAgnosticArray = p.GetMetadata("IsRidAgnostic").Split(';');
TaskParameter.cs (4)
598_escapedDefiningProject = EscapingUtilities.EscapeWithCaching(copyFrom.GetMetadata(FileUtilities.ItemSpecModifiers.DefiningProjectFullPath)); 751string originalItemSpec = destinationItem.GetMetadata("OriginalItemSpec"); 758.Where(metadatum => string.IsNullOrEmpty(destinationItem.GetMetadata(metadatum.Key))); 776string value = destinationItem.GetMetadata(entry.Key);
Microsoft.Build.Tasks.UnitTests (514)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (5)
3053Assert.Equal(loadModeResolvedFiles[i].GetMetadata("CopyLocal"), t.ResolvedFiles[i].GetMetadata("CopyLocal")); 3054Assert.Equal(loadModeResolvedFiles[i].GetMetadata("ResolvedFrom"), t.ResolvedFiles[i].GetMetadata("ResolvedFrom")); 3106string originalItemSpec = t.ResolvedFiles[i].GetMetadata("OriginalItemSpec");
AssignCulture_Tests.cs (15)
30Assert.Equal("fr", t.AssignedFiles[0].GetMetadata("Culture")); 50Assert.Equal("fr", t.AssignedFiles[0].GetMetadata("Culture")); 72Assert.Equal("fr", t.AssignedFiles[0].GetMetadata("Culture")); 93Assert.Equal("fr", t.AssignedFiles[0].GetMetadata("Culture")); 94Assert.Equal("My Random String", t.AssignedFiles[0].GetMetadata("MyAttribute")); 115Assert.Equal(String.Empty, t.AssignedFiles[0].GetMetadata("Culture")); 134Assert.Equal(String.Empty, t.AssignedFiles[0].GetMetadata("Culture")); 154Assert.Equal(String.Empty, t.AssignedFiles[0].GetMetadata("Culture")); 200Assert.Equal(culture, t.AssignedFiles[0].GetMetadata("Culture")); 222Assert.Equal(culture, t.AssignedFiles[0].GetMetadata("Culture")); 240Assert.Equal(culture, t.AssignedFiles[0].GetMetadata("Culture")); 257Assert.Equal("true", t.AssignedFiles[0].GetMetadata("WithCulture")); 258Assert.Equal(culture, t.AssignedFiles[0].GetMetadata("Culture")); 279Assert.Equal("en-GB", t.AssignedFiles[0].GetMetadata("Culture")); 300Assert.Equal("fr", t.AssignedFiles[0].GetMetadata("Culture"));
AssignLinkMetadata_Tests.cs (2)
80Assert.Equal(Path.Combine("SubFolder", "a.cs"), t.OutputItems[0].GetMetadata("Link")); 107Assert.Equal(Path.Combine("SubFolder", "a.cs"), t.OutputItems[0].GetMetadata("Link"));
AssignTargetPath_Tests.cs (5)
29t.AssignedFiles[0].GetMetadata("TargetPath").ShouldBe("abc.efg"); 43t.AssignedFiles[0].GetMetadata("TargetPath").ShouldBe("file.txt"); 64t.AssignedFiles[0].GetMetadata("TargetPath").ShouldBe("file.txt"); 81t.AssignedFiles[0].GetMetadata("TargetPath").ShouldBe(NativeMethodsShared.IsWindows ? @"f3\f4\file.txt" : "f3/f4/file.txt"); 107t.AssignedFiles[0].GetMetadata("TargetPath").ShouldBe(targetPath);
Copy_Tests.cs (9)
1615Assert.Equal("fr", t.DestinationFiles[1].GetMetadata("Locale")); 1623Assert.Equal("en-GB", t.SourceFiles[1].GetMetadata("Locale")); 1624Assert.Equal("taupe", t.SourceFiles[1].GetMetadata("Color")); 1627Assert.Equal("Pumpkin", t.DestinationFiles[1].GetMetadata("Flavor")); 1628Assert.Equal("Pumpkin", t.CopiedFiles[0].GetMetadata("Flavor")); 1631Assert.Equal("taupe", t.DestinationFiles[1].GetMetadata("Color")); 1632Assert.Equal("taupe", t.CopiedFiles[0].GetMetadata("Color")); 1635Assert.Equal("fr", t.DestinationFiles[1].GetMetadata("Locale")); 1636Assert.Equal("fr", t.CopiedFiles[0].GetMetadata("Locale"));
CreateCSharpManifestResourceName_Tests.cs (4)
809Assert.Equal(@"ResourceRoot.strings", resourceFiles[0].GetMetadata("ManifestResourceName")); 835Assert.Equal(@"ResourceRoot.pic.bmp", resourceFiles[0].GetMetadata("LogicalName")); 861Assert.Equal(@"foo", resourceFiles[0].GetMetadata("LogicalName")); 886Assert.Equal(String.Empty, resourceFiles[0].GetMetadata("LogicalName"));
CreateItem_Tests.cs (4)
214result.ResultsByTarget["Repro"].Items[0].GetMetadata("RecursiveDir").ShouldBe("Subdir" + Path.DirectorySeparatorChar); 232Assert.Equal("SomeValue", t.Include[0].GetMetadata("MyMetaData")); 255Assert.Equal("SomePreserveMeValue", t.Include[0].GetMetadata("MyMetaData")); 280Assert.Equal("SomeOverwriteValue", t.Include[0].GetMetadata("MyMetaData"));
Delete_Tests.cs (1)
35Assert.Equal("en-GB", t.DeletedFiles[0].GetMetadata("Locale"));
FindAppConfigFile_Tests.cs (5)
26Assert.Equal("targetpath", f.AppConfigFile.GetMetadata("TargetPath")); 39Assert.Equal("targetpath", f.AppConfigFile.GetMetadata("TargetPath")); 52Assert.Equal("targetpath", f.AppConfigFile.GetMetadata("TargetPath")); 95Assert.Equal(item2.GetMetadata("id"), f.AppConfigFile.GetMetadata("id"));
FindInList_Tests.cs (4)
65Assert.Equal(item1.GetMetadata("id"), f.ItemFound.GetMetadata("id")); 85Assert.Equal(item2.GetMetadata("id"), f.ItemFound.GetMetadata("id"));
GetCompatiblePlatform_Tests.cs (12)
40task.AssignedProjectsWithPlatform[0].GetMetadata("NearestPlatform").ShouldBe("x64"); 63task.AssignedProjectsWithPlatform[0].GetMetadata("NearestPlatform").ShouldBe(""); 87task.AssignedProjectsWithPlatform[0].GetMetadata("NearestPlatform").ShouldBe("x86"); 108task.AssignedProjectsWithPlatform[0].GetMetadata("NearestPlatform").ShouldBe("AnyCPU"); 130task.AssignedProjectsWithPlatform[0].GetMetadata("NearestPlatform").ShouldBe(string.Empty); 152task.AssignedProjectsWithPlatform[0].GetMetadata("NearestPlatform").ShouldBe("x86"); 173task.AssignedProjectsWithPlatform[0].GetMetadata("NearestPlatform").ShouldBe(string.Empty); 196task.AssignedProjectsWithPlatform[0].GetMetadata("NearestPlatform").ShouldBe(string.Empty); 221task.AssignedProjectsWithPlatform[0].GetMetadata("NearestPlatform").ShouldBe(string.Empty); 247task.AssignedProjectsWithPlatform[0].GetMetadata("NearestPlatform").ShouldBe("x86"); 271task.AssignedProjectsWithPlatform[0].GetMetadata("NearestPlatform").ShouldBe(string.Empty); 294task.AssignedProjectsWithPlatform[0].GetMetadata("NearestPlatform").ShouldBe(string.Empty);
GetFileHash_Tests.cs (1)
97task.Items.ShouldAllBe(i => string.Equals(testBinary.FileHash, i.GetMetadata("FileHash"), StringComparison.Ordinal));
GetInstalledSDKLocations_Tests.cs (4)
292sdksAndVersions.Add(item.GetMetadata("SDKName"), item.GetMetadata("PlatformVersion")); 338extensionSDKs.Add(item.GetMetadata("SDKName"), item.ItemSpec); 412extensionSDKs.Add(item.GetMetadata("SDKName"), item.ItemSpec);
GetSDKReference_Tests.cs (220)
437Assert.Equal("WindowsRuntime 1.0;CLR V2.0.50727", t.References[0].GetMetadata("ImageRuntime"), true); 438Assert.Equal("A, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=null", t.References[0].GetMetadata("FusionName"), true); 439Assert.Equal("true", t.References[0].GetMetadata("WinMDFile"), true); 440Assert.Equal("Managed", t.References[0].GetMetadata("WinMDFileType"), true); 441Assert.Equal("true", t.References[0].GetMetadata("CopyLocal"), true); 442Assert.Equal("SDkWithManifest, Version=2.0", t.References[0].GetMetadata("OriginalItemSpec"), true); 443Assert.Equal("GetSDKReferenceFiles", t.References[0].GetMetadata("ResolvedFrom"), true); 446Assert.Equal("CLR V2.0.50727", t.References[4].GetMetadata("ImageRuntime"), true); 447Assert.Equal("E, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=null", t.References[4].GetMetadata("FusionName"), true); 448Assert.Equal("false", t.References[4].GetMetadata("WinMDFile"), true); 449Assert.Empty(t.References[4].GetMetadata("WinMDFileType")); 450Assert.Equal("true", t.References[4].GetMetadata("CopyLocal"), true); 451Assert.Equal("SDkWithManifest, Version=2.0", t.References[4].GetMetadata("OriginalItemSpec"), true); 452Assert.Equal("GetSDKReferenceFiles", t.References[4].GetMetadata("ResolvedFrom"), true); 455Assert.Equal("WindowsRuntime 1.0;CLR V2.0.50727", t.CopyLocalFiles[0].GetMetadata("ImageRuntime"), true); 456Assert.Equal("A, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=null", t.CopyLocalFiles[0].GetMetadata("FusionName"), true); 457Assert.Equal("true", t.CopyLocalFiles[0].GetMetadata("WinMDFile"), true); 458Assert.Equal("Managed", t.CopyLocalFiles[0].GetMetadata("WinMDFileType"), true); 459Assert.Equal("true", t.CopyLocalFiles[0].GetMetadata("CopyLocal"), true); 460Assert.Equal("SDkWithManifest, Version=2.0", t.CopyLocalFiles[0].GetMetadata("OriginalItemSpec"), true); 461Assert.Equal("GetSDKReferenceFiles", t.CopyLocalFiles[0].GetMetadata("ResolvedFrom"), true); 464Assert.Equal("CLR V2.0.50727", t.CopyLocalFiles[5].GetMetadata("ImageRuntime"), true); 465Assert.Equal("E, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=null", t.CopyLocalFiles[5].GetMetadata("FusionName"), true); 466Assert.Equal("false", t.CopyLocalFiles[5].GetMetadata("WinMDFile"), true); 467Assert.Empty(t.CopyLocalFiles[5].GetMetadata("WinMDFileType")); 468Assert.Equal("true", t.CopyLocalFiles[5].GetMetadata("CopyLocal"), true); 469Assert.Equal("SDkWithManifest, Version=2.0", t.CopyLocalFiles[5].GetMetadata("OriginalItemSpec"), true); 470Assert.Equal("GetSDKReferenceFiles", t.CopyLocalFiles[5].GetMetadata("ResolvedFrom"), true); 558Assert.Equal("WindowsRuntime 1.0;CLR V2.0.50727", t.References[0].GetMetadata("ImageRuntime"), true); 559Assert.Equal("A, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=null", t.References[0].GetMetadata("FusionName"), true); 560Assert.Equal("true", t.References[0].GetMetadata("WinMDFile"), true); 561Assert.Equal("Managed", t.References[0].GetMetadata("WinMDFileType"), true); 562Assert.Equal("false", t.References[0].GetMetadata("CopyLocal"), true); 563Assert.Equal("SDkWithManifest, Version=2.0", t.References[0].GetMetadata("OriginalItemSpec"), true); 564Assert.Equal("GetSDKReferenceFiles", t.References[0].GetMetadata("ResolvedFrom"), true); 567Assert.Equal("WindowsRuntime 1.0", t.References[1].GetMetadata("ImageRuntime"), true); 568Assert.Equal("B, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=null", t.References[1].GetMetadata("FusionName"), true); 569Assert.Equal("true", t.References[1].GetMetadata("WinMDFile"), true); 570Assert.Equal("Native", t.References[1].GetMetadata("WinMDFileType"), true); 571Assert.Equal("false", t.References[1].GetMetadata("CopyLocal"), true); 572Assert.Equal("SDkWithManifest, Version=2.0", t.References[1].GetMetadata("OriginalItemSpec"), true); 573Assert.Equal("GetSDKReferenceFiles", t.References[1].GetMetadata("ResolvedFrom"), true); 576Assert.Equal("CLR V2.0.50727", t.References[4].GetMetadata("ImageRuntime"), true); 577Assert.Equal("E, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=null", t.References[4].GetMetadata("FusionName"), true); 578Assert.Equal("false", t.References[4].GetMetadata("WinMDFile"), true); 579Assert.Empty(t.References[4].GetMetadata("WinMDFileType")); 580Assert.Equal("false", t.References[4].GetMetadata("CopyLocal"), true); 581Assert.Equal("SDkWithManifest, Version=2.0", t.References[4].GetMetadata("OriginalItemSpec"), true); 582Assert.Equal("GetSDKReferenceFiles", t.References[4].GetMetadata("ResolvedFrom"), true); 609string sdkIdentity = item.GetMetadata("OriginalItemSpec"); 639string sdkIdentity2 = item.GetMetadata("OriginalItemSpec"); 675engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[0].ItemSpec.Replace(t.References[0].GetMetadata("SDKRootPath"), String.Empty)); 676engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[1].ItemSpec.Replace(t.References[1].GetMetadata("SDKRootPath"), String.Empty)); 677engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[2].ItemSpec.Replace(t.References[2].GetMetadata("SDKRootPath"), String.Empty)); 678engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[3].ItemSpec.Replace(t.References[3].GetMetadata("SDKRootPath"), String.Empty)); 679engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[4].ItemSpec.Replace(t.References[4].GetMetadata("SDKRootPath"), String.Empty)); 680engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[5].ItemSpec.Replace(t.References[5].GetMetadata("SDKRootPath"), String.Empty)); 681engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[6].ItemSpec.Replace(t.References[6].GetMetadata("SDKRootPath"), String.Empty)); 682engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[7].ItemSpec.Replace(t.References[7].GetMetadata("SDKRootPath"), String.Empty)); 685Assert.Equal("true", t.References[0].GetMetadata("WinMDFile")); 686Assert.Equal("Managed", t.References[0].GetMetadata("WinMDFileType")); 687Assert.Equal("false", t.References[0].GetMetadata("CopyLocal")); 688Assert.Equal("SDkWithManifest, Version=2.0", t.References[0].GetMetadata("OriginalItemSpec"), true); 689Assert.Equal("GetSDKReferenceFiles", t.References[0].GetMetadata("ResolvedFrom"), true); 692Assert.Equal("false", t.References[4].GetMetadata("WinMDFile")); 693Assert.Empty(t.References[4].GetMetadata("WinMDFileType")); 694Assert.Equal("false", t.References[4].GetMetadata("CopyLocal")); 695Assert.Equal("SDkWithManifest, Version=2.0", t.References[4].GetMetadata("OriginalItemSpec"), true); 696Assert.Equal("GetSDKReferenceFiles", t.References[4].GetMetadata("ResolvedFrom"), true); 724engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[0].ItemSpec.Replace(t.References[0].GetMetadata("SDKRootPath"), String.Empty)); 725engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[1].ItemSpec.Replace(t.References[1].GetMetadata("SDKRootPath"), String.Empty)); 726engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[2].ItemSpec.Replace(t.References[2].GetMetadata("SDKRootPath"), String.Empty)); 727engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[3].ItemSpec.Replace(t.References[3].GetMetadata("SDKRootPath"), String.Empty)); 728engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[4].ItemSpec.Replace(t.References[4].GetMetadata("SDKRootPath"), String.Empty)); 731Assert.Equal("false", t.References[0].GetMetadata("WinMDFile"), true); 732Assert.Empty(t.References[0].GetMetadata("WinMDFileType")); 733Assert.Equal("false", t.References[0].GetMetadata("CopyLocal"), true); 734Assert.Equal("SDkWithManifest, Version=2.0", t.References[0].GetMetadata("OriginalItemSpec"), true); 735Assert.Equal("GetSDKReferenceFiles", t.References[0].GetMetadata("ResolvedFrom"), true); 738Assert.Equal("false", t.References[4].GetMetadata("WinMDFile"), true); 739Assert.Empty(t.References[4].GetMetadata("WinMDFileType")); 740Assert.Equal("false", t.References[4].GetMetadata("CopyLocal"), true); 741Assert.Equal("SDkWithManifest, Version=2.0", t.References[4].GetMetadata("OriginalItemSpec"), true); 742Assert.Equal("GetSDKReferenceFiles", t.References[4].GetMetadata("ResolvedFrom"), true); 816engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[0].ItemSpec.Replace(t.References[0].GetMetadata("SDKRootPath"), String.Empty)); 817engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[1].ItemSpec.Replace(t.References[1].GetMetadata("SDKRootPath"), String.Empty)); 818engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[2].ItemSpec.Replace(t.References[2].GetMetadata("SDKRootPath"), String.Empty)); 819engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[3].ItemSpec.Replace(t.References[3].GetMetadata("SDKRootPath"), String.Empty)); 820engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[4].ItemSpec.Replace(t.References[4].GetMetadata("SDKRootPath"), String.Empty)); 821engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[5].ItemSpec.Replace(t.References[5].GetMetadata("SDKRootPath"), String.Empty)); 822engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[6].ItemSpec.Replace(t.References[6].GetMetadata("SDKRootPath"), String.Empty)); 823engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[7].ItemSpec.Replace(t.References[7].GetMetadata("SDKRootPath"), String.Empty)); 827Assert.Equal("SDKWithManifest, Version=2.0", t.References[0].GetMetadata("ReferenceGrouping")); 828Assert.Empty(t.References[0].GetMetadata("ReferenceGroupingDisplayName")); 829Assert.Equal("true", t.References[0].GetMetadata("WinMDFile")); 830Assert.Equal("Managed", t.References[0].GetMetadata("WinMDFileType")); 831Assert.Equal("false", t.References[0].GetMetadata("CopyLocal")); 832Assert.Equal("SDkWithManifest, Version=2.0", t.References[0].GetMetadata("OriginalItemSpec"), true); 833Assert.Equal("GetSDKReferenceFiles", t.References[0].GetMetadata("ResolvedFrom"), true); 836Assert.Equal("false", t.References[4].GetMetadata("WinMDFile")); 837Assert.Empty(t.References[4].GetMetadata("WinMDFileType")); 838Assert.Equal("false", t.References[4].GetMetadata("CopyLocal")); 839Assert.Equal("SDkWithManifest, Version=2.0", t.References[4].GetMetadata("OriginalItemSpec"), true); 840Assert.Equal("GetSDKReferenceFiles", t.References[4].GetMetadata("ResolvedFrom"), true); 868engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[0].ItemSpec.Replace(t.References[0].GetMetadata("SDKRootPath"), String.Empty)); 869engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[1].ItemSpec.Replace(t.References[1].GetMetadata("SDKRootPath"), String.Empty)); 870engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[2].ItemSpec.Replace(t.References[2].GetMetadata("SDKRootPath"), String.Empty)); 871engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[3].ItemSpec.Replace(t.References[3].GetMetadata("SDKRootPath"), String.Empty)); 872engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[4].ItemSpec.Replace(t.References[4].GetMetadata("SDKRootPath"), String.Empty)); 873engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[5].ItemSpec.Replace(t.References[5].GetMetadata("SDKRootPath"), String.Empty)); 874engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[6].ItemSpec.Replace(t.References[6].GetMetadata("SDKRootPath"), String.Empty)); 875engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[7].ItemSpec.Replace(t.References[7].GetMetadata("SDKRootPath"), String.Empty)); 879Assert.Equal("true", t.References[0].GetMetadata("WinMDFile")); 880Assert.Equal("SDKWithManifest, Version=2.0", t.References[0].GetMetadata("ReferenceGrouping")); 881Assert.Equal("Managed", t.References[0].GetMetadata("WinMDFileType")); 882Assert.Equal("SDKWithManifestDisplayName", t.References[0].GetMetadata("ReferenceGroupingDisplayName")); 883Assert.Equal("false", t.References[0].GetMetadata("CopyLocal")); 884Assert.Equal("SDkWithManifest, Version=2.0", t.References[0].GetMetadata("OriginalItemSpec"), true); 885Assert.Equal("GetSDKReferenceFiles", t.References[0].GetMetadata("ResolvedFrom"), true); 888Assert.Equal("false", t.References[4].GetMetadata("WinMDFile")); 889Assert.Empty(t.References[4].GetMetadata("WinMDFileType")); 890Assert.Equal("false", t.References[4].GetMetadata("CopyLocal")); 891Assert.Equal("SDkWithManifest, Version=2.0", t.References[4].GetMetadata("OriginalItemSpec"), true); 892Assert.Equal("GetSDKReferenceFiles", t.References[4].GetMetadata("ResolvedFrom"), true); 919engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[0].ItemSpec.Replace(t.References[0].GetMetadata("SDKRootPath"), String.Empty)); 920engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[1].ItemSpec.Replace(t.References[1].GetMetadata("SDKRootPath"), String.Empty)); 921engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[2].ItemSpec.Replace(t.References[2].GetMetadata("SDKRootPath"), String.Empty)); 922engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[3].ItemSpec.Replace(t.References[3].GetMetadata("SDKRootPath"), String.Empty)); 923engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[4].ItemSpec.Replace(t.References[4].GetMetadata("SDKRootPath"), String.Empty)); 924engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[5].ItemSpec.Replace(t.References[5].GetMetadata("SDKRootPath"), String.Empty)); 925engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[6].ItemSpec.Replace(t.References[6].GetMetadata("SDKRootPath"), String.Empty)); 926engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingReference", t.References[7].ItemSpec.Replace(t.References[7].GetMetadata("SDKRootPath"), String.Empty)); 957engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[0].ItemSpec.Replace(t.RedistFiles[0].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[0].GetMetadata("TargetPath")); 958engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[1].ItemSpec.Replace(t.RedistFiles[1].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[1].GetMetadata("TargetPath")); 959engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[2].ItemSpec.Replace(t.RedistFiles[2].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[2].GetMetadata("TargetPath")); 960engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[3].ItemSpec.Replace(t.RedistFiles[3].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[3].GetMetadata("TargetPath")); 961engine.AssertLogDoesntContainMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[4].ItemSpec.Replace(t.RedistFiles[4].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[4].GetMetadata("TargetPath")); 964Assert.Equal("Super\\A.dll", t.RedistFiles[0].GetMetadata("TargetPath"), true); 965Assert.Equal("SDkWithManifest, Version=2.0", t.RedistFiles[0].GetMetadata("OriginalItemSpec"), true); 966Assert.Equal("GetSDKReferenceFiles", t.RedistFiles[0].GetMetadata("ResolvedFrom"), true); 967Assert.Empty(t.RedistFiles[0].GetMetadata("Root")); 970Assert.Equal("Super\\ASubDirectory\\TwoDeep\\B.dll", t.RedistFiles[1].GetMetadata("TargetPath"), true); 971Assert.Equal("SDkWithManifest, Version=2.0", t.RedistFiles[1].GetMetadata("OriginalItemSpec"), true); 972Assert.Equal("GetSDKReferenceFiles", t.RedistFiles[1].GetMetadata("ResolvedFrom"), true); 973Assert.Empty(t.RedistFiles[1].GetMetadata("Root")); 976Assert.Equal("Super\\B.PRI", t.RedistFiles[2].GetMetadata("TargetPath"), true); 977Assert.Equal("SDkWithManifest, Version=2.0", t.RedistFiles[2].GetMetadata("OriginalItemSpec"), true); 978Assert.Equal("GetSDKReferenceFiles", t.RedistFiles[2].GetMetadata("ResolvedFrom"), true); 979Assert.Equal("Super", t.RedistFiles[2].GetMetadata("Root")); 982Assert.Equal("Super\\C.dll", t.RedistFiles[3].GetMetadata("TargetPath"), true); 983Assert.Equal("SDkWithManifest, Version=2.0", t.RedistFiles[3].GetMetadata("OriginalItemSpec"), true); 984Assert.Equal("GetSDKReferenceFiles", t.RedistFiles[3].GetMetadata("ResolvedFrom"), true); 985Assert.Empty(t.RedistFiles[3].GetMetadata("Root")); 988Assert.Equal("Super\\D.dll", t.RedistFiles[4].GetMetadata("TargetPath"), true); 989Assert.Equal("SDkWithManifest, Version=2.0", t.RedistFiles[4].GetMetadata("OriginalItemSpec"), true); 990Assert.Equal("GetSDKReferenceFiles", t.RedistFiles[4].GetMetadata("ResolvedFrom"), true); 991Assert.Empty(t.RedistFiles[4].GetMetadata("Root")); 1018engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[0].ItemSpec.Replace(t.RedistFiles[0].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[0].GetMetadata("TargetPath")); 1019engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[1].ItemSpec.Replace(t.RedistFiles[1].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[1].GetMetadata("TargetPath")); 1020engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[2].ItemSpec.Replace(t.RedistFiles[2].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[2].GetMetadata("TargetPath")); 1021engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[3].ItemSpec.Replace(t.RedistFiles[3].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[3].GetMetadata("TargetPath")); 1022engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[4].ItemSpec.Replace(t.RedistFiles[4].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[4].GetMetadata("TargetPath")); 1050engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[0].ItemSpec.Replace(t.RedistFiles[0].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[0].GetMetadata("TargetPath")); 1051engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[1].ItemSpec.Replace(t.RedistFiles[1].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[1].GetMetadata("TargetPath")); 1052engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[2].ItemSpec.Replace(t.RedistFiles[2].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[2].GetMetadata("TargetPath")); 1053engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[3].ItemSpec.Replace(t.RedistFiles[3].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[3].GetMetadata("TargetPath")); 1054engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[4].ItemSpec.Replace(t.RedistFiles[4].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[4].GetMetadata("TargetPath")); 1082engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[0].ItemSpec.Replace(t.RedistFiles[0].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[0].GetMetadata("TargetPath")); 1083engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[1].ItemSpec.Replace(t.RedistFiles[1].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[1].GetMetadata("TargetPath")); 1084engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[2].ItemSpec.Replace(t.RedistFiles[2].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[2].GetMetadata("TargetPath")); 1085engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[3].ItemSpec.Replace(t.RedistFiles[3].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[3].GetMetadata("TargetPath")); 1086engine.AssertLogContainsMessageFromResource(_resourceDelegate, "GetSDKReferenceFiles.AddingRedistFile", t.RedistFiles[4].ItemSpec.Replace(t.RedistFiles[4].GetMetadata("SDKRootPath"), String.Empty), t.RedistFiles[4].GetMetadata("TargetPath")); 1370Assert.Equal("SDK1\\A.dll", t.RedistFiles[0].GetMetadata("TargetPath"), true); 1371Assert.Equal("SDkWithManifest, Version=2.0", t.RedistFiles[0].GetMetadata("OriginalItemSpec"), true); 1372Assert.Equal("GetSDKReferenceFiles", t.RedistFiles[0].GetMetadata("ResolvedFrom"), true); 1373Assert.Empty(t.RedistFiles[0].GetMetadata("Root")); 1376Assert.Equal("SDK2\\B.dll", t.RedistFiles[1].GetMetadata("TargetPath"), true); 1377Assert.Equal("AnotherSDK, Version=2.0", t.RedistFiles[1].GetMetadata("OriginalItemSpec"), true); 1378Assert.Equal("GetSDKReferenceFiles", t.RedistFiles[1].GetMetadata("ResolvedFrom"), true); 1379Assert.Empty(t.RedistFiles[1].GetMetadata("Root")); 1382Assert.Equal("SDK1\\ASubDirectory\\TwoDeep\\B.dll", t.RedistFiles[2].GetMetadata("TargetPath"), true); 1383Assert.Equal("SDkWithManifest, Version=2.0", t.RedistFiles[2].GetMetadata("OriginalItemSpec"), true); 1384Assert.Equal("GetSDKReferenceFiles", t.RedistFiles[2].GetMetadata("ResolvedFrom"), true); 1385Assert.Empty(t.RedistFiles[2].GetMetadata("Root")); 1388Assert.Equal("SDK2\\B.Pri", t.RedistFiles[3].GetMetadata("TargetPath"), true); 1389Assert.Equal("AnotherSDK, Version=2.0", t.RedistFiles[3].GetMetadata("OriginalItemSpec"), true); 1390Assert.Equal("GetSDKReferenceFiles", t.RedistFiles[3].GetMetadata("ResolvedFrom"), true); 1391Assert.Equal("SDK2", t.RedistFiles[3].GetMetadata("Root"), true); 1394Assert.Equal("SDK1\\B.PRI", t.RedistFiles[4].GetMetadata("TargetPath"), true); 1395Assert.Equal("SDkWithManifest, Version=2.0", t.RedistFiles[4].GetMetadata("OriginalItemSpec"), true); 1396Assert.Equal("GetSDKReferenceFiles", t.RedistFiles[4].GetMetadata("ResolvedFrom"), true); 1397Assert.Equal("SDK1", t.RedistFiles[4].GetMetadata("Root"), true); 1400Assert.Equal("SDK1\\C.dll", t.RedistFiles[5].GetMetadata("TargetPath"), true); 1401Assert.Equal("SDkWithManifest, Version=2.0", t.RedistFiles[5].GetMetadata("OriginalItemSpec"), true); 1402Assert.Equal("GetSDKReferenceFiles", t.RedistFiles[5].GetMetadata("ResolvedFrom"), true); 1403Assert.Empty(t.RedistFiles[5].GetMetadata("Root")); 1406Assert.Equal("SDK1\\D.dll", t.RedistFiles[6].GetMetadata("TargetPath"), true); 1407Assert.Equal("SDkWithManifest, Version=2.0", t.RedistFiles[6].GetMetadata("OriginalItemSpec"), true); 1408Assert.Equal("GetSDKReferenceFiles", t.RedistFiles[6].GetMetadata("ResolvedFrom"), true); 1409Assert.Empty(t.RedistFiles[6].GetMetadata("Root"));
MakeDir_Tests.cs (1)
47Assert.Equal("en-GB", t.DirectoriesCreated[0].GetMetadata("Locale"));
Move_Tests.cs (9)
461Assert.Equal("fr", t.DestinationFiles[1].GetMetadata("Locale")); 469Assert.Equal("en-GB", t.SourceFiles[1].GetMetadata("Locale")); 470Assert.Equal("taupe", t.SourceFiles[1].GetMetadata("Color")); 473Assert.Equal("Pumpkin", t.DestinationFiles[1].GetMetadata("Flavor")); 474Assert.Equal("Pumpkin", t.MovedFiles[0].GetMetadata("Flavor")); 477Assert.Equal("taupe", t.DestinationFiles[1].GetMetadata("Color")); 478Assert.Equal("taupe", t.MovedFiles[0].GetMetadata("Color")); 481Assert.Equal("fr", t.DestinationFiles[1].GetMetadata("Locale")); 482Assert.Equal("fr", t.MovedFiles[0].GetMetadata("Locale"));
RemoveDir_Tests.cs (1)
42t.RemovedDirectories[0].GetMetadata("Locale").ShouldBe("en-GB");
ResolveNonMSBuildProjectOutput_Tests.cs (2)
232Assert.Equal("true", ((ITaskItem)resolvedOutputs[Path.Combine("obj", "managed.dll")]).GetMetadata("ManagedAssembly")); 233Assert.NotEqual("true", ((ITaskItem)resolvedOutputs[Path.Combine("obj", "unmanaged.dll")]).GetMetadata("ManagedAssembly"));
ResolveSDKReference_Tests.cs (201)
341Assert.Equal("true", reference.ResolvedItem.GetMetadata("RuntimeReferenceOnly")); 1096Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity")); 1097Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("PlatformIdentity")); 1098Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("AppXLocation")); 1099Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("CopyRedist"), true); 1100Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 1101Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 1102Assert.Equal("Retail", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration"), true); 1103Assert.Equal("Neutral", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture"), true); 1104Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 1134Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity")); 1135Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("AppXLocation")); 1136Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 1137Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 1140Assert.Equal("Retail", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration"), true); 1141Assert.Equal("Neutral", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture"), true); 1142Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 1175Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity")); 1176Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("AppXLocation")); 1177Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 1178Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 1181Assert.Equal("Retail", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration")); 1182Assert.Equal("Neutral", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture")); 1183Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 1213Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity")); 1214Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("AppXLocation")); 1215Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 1216Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 1217Assert.Equal("Retail", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration"), true); 1218Assert.Equal("Neutral", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture"), true); 1219Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 1252Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity")); 1253Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("AppXLocation")); 1254Assert.Equal("GoodTestSDK", t.ResolvedSDKReferences[0].GetMetadata("SimpleName"), true); 1255Assert.Equal("2.0", t.ResolvedSDKReferences[0].GetMetadata("Version"), true); 1256Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 1257Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 1258Assert.Equal("Retail", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration"), true); 1259Assert.Equal("Neutral", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture"), true); 1260Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 1286Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity")); 1287Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("AppXLocation")); 1288Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 1289Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 1290Assert.Equal("Retail", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration"), true); 1291Assert.Equal("Neutral", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture"), true); 1292Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 1357Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity")); 1358Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("AppXLocation")); 1359Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("SDKType")); 1360Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("DisplayName")); 1361Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 1362Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 1363Assert.Equal("Retail", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration"), true); 1364Assert.Equal("Neutral", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture"), true); 1365Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 1366Assert.Equal("GoodTestSDK, Version=2.0", t.ResolvedSDKReferences[0].GetMetadata("SDKName"), true); 1759Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity")); 1760Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("AppXLocation")); 1761Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("SDKType")); 1762Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("SupportedArchitectures")); 1763Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("ProductFamilyName")); 1764Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("DisplayName")); 1765Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("ArchitectureForRuntime")); 1766Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("MaxPlatformVersion")); 1767Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("MaxOSVersionTested")); 1768Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("MinOSVersion")); 1769Assert.Equal("Allow", t.ResolvedSDKReferences[0].GetMetadata("SupportsMultipleVersions"), true); 1770Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("CopyRedistToSubDirectory")); 1771Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 1772Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 1773Assert.Equal("Retail", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration"), true); 1774Assert.Equal("Neutral", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture"), true); 1775Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 1858Assert.Equal("MetadataIdentity", t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity")); 1859Assert.Equal("PlatformIdentity", t.ResolvedSDKReferences[0].GetMetadata("PlatformIdentity")); 1860Assert.Equal("Metadata AppxLocation", t.ResolvedSDKReferences[0].GetMetadata("AppXLocation")); 1861Assert.Equal("External", t.ResolvedSDKReferences[0].GetMetadata("SDKType")); 1862Assert.Equal("Error", t.ResolvedSDKReferences[0].GetMetadata("SupportsMultipleVersions")); 1863Assert.Equal("ManifestDisplayName", t.ResolvedSDKReferences[0].GetMetadata("DisplayName")); 1864Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("CopyRedist")); 1865Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies")); 1866Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies")); 1867Assert.Equal("Custom", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration")); 1868Assert.Equal("Neutral", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture")); 1869Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 1870Assert.Equal("MyRedistSubDirectory", t.ResolvedSDKReferences[0].GetMetadata("CopyRedistToSubDirectory")); 1871Assert.Equal("9.0", t.ResolvedSDKReferences[0].GetMetadata("MaxPlatformVersion")); 1872Assert.Equal("3.3.3", t.ResolvedSDKReferences[0].GetMetadata("MaxOSVersionTested")); 1873Assert.Equal("3.3.3", t.ResolvedSDKReferences[0].GetMetadata("MinOSVersion")); 1937Assert.Equal("GoodTestSDKIdentity", t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity")); 1938Assert.Equal("Neutral|RetailX86Location", t.ResolvedSDKReferences[0].GetMetadata("AppXLocation")); 1939Assert.Equal("External", t.ResolvedSDKReferences[0].GetMetadata("SDKType")); 1940Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("CopyRedist"), true); 1941Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 1942Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 1943Assert.Equal("Retail", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration"), true); 1944Assert.Equal("Neutral", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture"), true); 1945Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 1946Assert.Equal("GoodTestSDK\\Redist", t.ResolvedSDKReferences[0].GetMetadata("CopyRedistToSubDirectory"), true); 2008Assert.Equal("GoodTestSDKIdentity", t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity"), true); 2009Assert.Equal("Neutral|RetailNeutralLocation", t.ResolvedSDKReferences[0].GetMetadata("AppXLocation"), true); 2010Assert.Equal("External", t.ResolvedSDKReferences[0].GetMetadata("SDKType"), true); 2011Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 2012Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 2013Assert.Equal("Retail", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration"), true); 2014Assert.Equal("Neutral", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture"), true); 2015Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 2072Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity")); 2073Assert.Empty(t.ResolvedSDKReferences[0].GetMetadata("AppXLocation")); 2074Assert.Equal("PlatformID", t.ResolvedSDKReferences[0].GetMetadata("PlatformIdentity"), true); 2075Assert.Equal("External", t.ResolvedSDKReferences[0].GetMetadata("SDKType"), true); 2076Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("CopyRedist"), true); 2077Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 2078Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 2079Assert.Equal("Retail", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration"), true); 2080Assert.Equal("Neutral", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture"), true); 2081Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 2148Assert.Equal("GoodTestSDKIdentity", t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity"), true); 2149Assert.Equal("Good Platform", t.ResolvedSDKReferences[0].GetMetadata("PlatformIdentity"), true); 2150Assert.Equal("Neutral|Location", t.ResolvedSDKReferences[0].GetMetadata("AppXLocation"), true); 2151Assert.Equal("External", t.ResolvedSDKReferences[0].GetMetadata("SDKType"), true); 2152Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 2153Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 2154Assert.Equal("Retail", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration"), true); 2155Assert.Equal("X86", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture"), true); 2156Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 2216Assert.Equal("GoodTestSDKIdentity", t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity")); 2217Assert.Equal("Good Platform", t.ResolvedSDKReferences[0].GetMetadata("PlatformIdentity")); 2218Assert.Equal("arm|ARMAppx", t.ResolvedSDKReferences[0].GetMetadata("AppXLocation"), true); 2219Assert.Equal("External", t.ResolvedSDKReferences[0].GetMetadata("SDKType"), true); 2220Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 2221Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 2222Assert.Equal("Debug", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration"), true); 2223Assert.Equal("arm", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture"), true); 2224Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 2286Assert.Equal("GoodTestSDKIdentity", t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity"), true); 2287Assert.Equal("Good Platform", t.ResolvedSDKReferences[0].GetMetadata("PlatformIdentity"), true); 2288Assert.Equal("arm|ARMAppx|x64|x64Appx|x86|x86Appx", t.ResolvedSDKReferences[0].GetMetadata("AppXLocation"), true); 2289Assert.Equal("External", t.ResolvedSDKReferences[0].GetMetadata("SDKType"), true); 2290Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 2291Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 2292Assert.Equal("Debug", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration"), true); 2293Assert.Equal("arm", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture"), true); 2294Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 2500Assert.Equal("GoodTestSDKIdentity", t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity"), true); 2501Assert.Equal("x64|RetailX64Location|x86|RetailX86Location", t.ResolvedSDKReferences[0].GetMetadata("AppXLocation"), true); 2502Assert.Equal("External", t.ResolvedSDKReferences[0].GetMetadata("SDKType"), true); 2503Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("CopyRedist"), true); 2504Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 2505Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 2506Assert.Equal("Retail", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration"), true); 2507Assert.Equal("X86", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture"), true); 2508Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 2509Assert.Equal("GoodTestSDK\\Redist", t.ResolvedSDKReferences[0].GetMetadata("CopyRedistToSubDirectory"), true); 2574Assert.Equal("MyFamily", t.ResolvedSDKReferences[0].GetMetadata("ProductFamilyName")); 2641Assert.Equal("MetadataFamily", t.ResolvedSDKReferences[0].GetMetadata("ProductFamilyName")); 2705Assert.Equal("Allow", t.ResolvedSDKReferences[0].GetMetadata("SupportsMultipleVersions")); 2773Assert.Equal("Warning", t.ResolvedSDKReferences[0].GetMetadata("SupportsMultipleVersions")); 3257Assert.Equal("Allow", t.ResolvedSDKReferences[0].GetMetadata("SupportsMultipleVersions")); 3261Assert.Equal(manifestEntry, t.ResolvedSDKReferences[0].GetMetadata("SupportsMultipleVersions")); 3330Assert.Equal("GoodTestSDKIdentity", t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity"), true); 3331Assert.Equal("Arm|RetailArmLocation|Neutral|NeutralLocation|X64|RetailX64Location|X86|RetailX86Location", t.ResolvedSDKReferences[0].GetMetadata("AppXLocation"), true); 3332Assert.Equal("External", t.ResolvedSDKReferences[0].GetMetadata("SDKType"), true); 3333Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("CopyRedist"), true); 3334Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 3335Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 3336Assert.Equal("Retail", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration"), true); 3337Assert.Equal("X86", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture"), true); 3338Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 3339Assert.Equal("GoodTestSDK\\Redist", t.ResolvedSDKReferences[0].GetMetadata("CopyRedistToSubDirectory"), true); 3474Assert.Equal("GoodTestSDKIdentity", t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity")); 3475Assert.Equal("Neutral|NeutralLocation|X64|RetailX64Location|X86|RetailX86Location", t.ResolvedSDKReferences[0].GetMetadata("AppXLocation"), true); 3476Assert.Equal("External", t.ResolvedSDKReferences[0].GetMetadata("SDKType"), true); 3477Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("CopyRedist"), true); 3478Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 3479Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 3480Assert.Equal("Retail", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration"), true); 3481Assert.Equal("X86", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture"), true); 3482Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 3483Assert.Equal("GoodTestSDK\\Redist", t.ResolvedSDKReferences[0].GetMetadata("CopyRedistToSubDirectory"), true); 3610Assert.Equal("GoodTestSDKIdentity", t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity"), true); 3611Assert.Equal("Neutral|RetailNeutralLocation", t.ResolvedSDKReferences[0].GetMetadata("AppXLocation"), true); 3612Assert.Equal("External", t.ResolvedSDKReferences[0].GetMetadata("SDKType"), true); 3613Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("CopyRedist"), true); 3614Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies"), true); 3615Assert.Equal("False", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies"), true); 3616Assert.Equal("Retail", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration"), true); 3617Assert.Equal("Neutral", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture"), true); 3618Assert.Equal(item.ItemSpec, t.ResolvedSDKReferences[0].GetMetadata("OriginalItemSpec"), true); 3619Assert.Equal("GoodTestSDK\\Redist", t.ResolvedSDKReferences[0].GetMetadata("CopyRedistToSubDirectory"), true); 4171Assert.Equal("Retail", resolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration")); 4172Assert.Equal("Neutral", resolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture")); 4301Assert.Equal("http://msdn.microsoft.com/MySDK", resolvedSDKReferences1[0].GetMetadata("MoreInfo")); 4302Assert.Equal("9.0", resolvedSDKReferences1[0].GetMetadata("MaxPlatformVersion")); 4303Assert.Equal("6.2.0", resolvedSDKReferences1[0].GetMetadata("MinOSVersion")); 4304Assert.Equal("6.2.3", resolvedSDKReferences1[0].GetMetadata("MaxOSVersionTested")); 4310Assert.Equal("http://msdn.microsoft.com/MySDK", resolvedSDKReferences2[0].GetMetadata("MoreInfo")); 4311Assert.Equal(String.Empty, resolvedSDKReferences2[0].GetMetadata("MaxPlatformVersion")); 4312Assert.Equal(String.Empty, resolvedSDKReferences2[0].GetMetadata("MinOSVersion")); 4313Assert.Equal(String.Empty, resolvedSDKReferences2[0].GetMetadata("MaxOSVersionTested"));
ResourceHandling\GenerateResource_Tests.cs (9)
71Assert.Equal("InputValue", t.OutputResources[0].GetMetadata("Attribute")); 126Assert.Equal(expectedOutFile0, t.Sources[0].GetMetadata("OutputResource")); 127Assert.Equal(expectedOutFile1, t.Sources[1].GetMetadata("OutputResource")); 128Assert.Equal(expectedOutFile2, t.Sources[2].GetMetadata("OutputResource")); 129Assert.Equal(expectedOutFile3, t.Sources[3].GetMetadata("OutputResource")); 159Assert.Equal("InputValue", t.OutputResources[0].GetMetadata("Attribute")); 2199Assert.Equal("fr", t.OutputResources[0].GetMetadata("Locale")); 2205Assert.Equal("Pumpkin", t.OutputResources[0].GetMetadata("Flavor")); 2235Assert.Equal("en-GB", t.OutputResources[0].GetMetadata("Locale"));
Microsoft.Build.UnitTests.Shared (2)
ObjectModelHelpers.cs (2)
415string expectedMetadataValue = expectedItem.GetMetadata(metadataName); 416string actualMetadataValue = actualItem.GetMetadata(metadataName);
Microsoft.Build.Utilities.Core (3)
TaskItem.cs (3)
156_definingProject = EscapingUtilities.EscapeWithCaching(sourceItem.GetMetadata(FileUtilities.ItemSpecModifiers.DefiningProjectFullPath)); 330string originalItemSpec = destinationItem.GetMetadata("OriginalItemSpec"); 399value = destinationItem.GetMetadata(entry.Key);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (5)
MSBuild\ProjectFile\Extensions.cs (2)
60var aliasesText = item.GetMetadata(MetadataNames.Aliases); 69var referenceOutputAssemblyText = item.GetMetadata(MetadataNames.ReferenceOutputAssembly);
MSBuild\ProjectFile\ProjectFile.cs (3)
264var linkPath = documentItem.GetMetadata(MetadataNames.Link); 295=> !RoslynString.IsNullOrEmpty(documentItem.GetMetadata(MetadataNames.Link)); 320var link = documentItem.GetMetadata(MetadataNames.Link);
Microsoft.DotNet.ApiCompat.Task (4)
ValidateAssembliesTask.cs (1)
198string replacementString = transformationPatterns[i].GetMetadata(ReplacementStringMetadataName);
ValidatePackageTask.cs (3)
175string targetFrameworkMoniker = taskItem.GetMetadata("TargetFrameworkMoniker"); 176string targetPlatformMoniker = taskItem.GetMetadata("TargetPlatformMoniker"); 177string referencePath = taskItem.GetMetadata("ReferencePath");
Microsoft.DotNet.Arcade.Sdk (6)
src\DownloadFile.cs (1)
82var encodedToken = uriConfig.GetMetadata("token");
src\GenerateChecksums.cs (1)
27string destinationPath = item.GetMetadata("DestinationPath");
src\GenerateSourcePackageSourceLinkTargetsFile.cs (1)
63var url = sourceRoot.GetMetadata("SourceLinkUrl");
src\GetAssemblyFullName.cs (1)
29var assemblyPath = string.IsNullOrEmpty(PathMetadata) ? item.ItemSpec : item.GetMetadata(PathMetadata);
src\GroupItemsBy.cs (2)
65var left = result.GetMetadata(metadataName); 66var right = item.GetMetadata(metadataName);
Microsoft.DotNet.Arcade.Sdk.Tests (3)
GetAssemblyFullNameTests.cs (2)
37}, task.ItemsWithFullName.Select(i => i.GetMetadata("SomeFullName"))); 64}, task.ItemsWithFullName.Select(i => i.GetMetadata("SomeFullName")));
GroupItemsByTests.cs (1)
38}, task.GroupedItems.Select(i => $"{i.ItemSpec}: {string.Join(" ", inspectMetadata.Select(m => $"{m}='{i.GetMetadata(m)}'"))}"));
Microsoft.DotNet.Build.Manifest (13)
BlobArtifactModelFactory.cs (2)
35string path = item.GetMetadata("RelativeBlobPath"); 43Attributes = MSBuildListSplitter.GetNamedProperties(item.GetMetadata("ManifestArtifactData")),
BuildModelFactory.cs (8)
87Where(i => !string.Equals(i.GetMetadata("ExcludeFromManifest"), "true", StringComparison.OrdinalIgnoreCase)); 93if (string.IsNullOrEmpty(item.GetMetadata("Kind"))) 110.Where(i => i.GetMetadata(ArtifactKindMetadata).Equals(nameof(ArtifactKind.Blob), StringComparison.OrdinalIgnoreCase)) 111.Select(i => _blobArtifactModelFactory.CreateBlobArtifactModel(i, i.GetMetadata("RepoOrigin") is string origin and not "" ? origin : repoOrigin)) 115.Where(i => i.GetMetadata(ArtifactKindMetadata).Equals(nameof(ArtifactKind.Package), StringComparison.OrdinalIgnoreCase)) 116.Select(i => _packageArtifactModelFactory.CreatePackageArtifactModel(i, i.GetMetadata("RepoOrigin") is string origin and not "" ? origin : repoOrigin)) 120.Where(i => i.GetMetadata(ArtifactKindMetadata).Equals(nameof(ArtifactKind.Pdb), StringComparison.OrdinalIgnoreCase)) 121.Select(i => _pdbArtifactModelFactory.CreatePdbArtifactModel(i, i.GetMetadata("RepoOrigin") is string origin and not "" ? origin : repoOrigin))
PackageArtifactModelFactory.cs (1)
35Attributes = MSBuildListSplitter.GetNamedProperties(item.GetMetadata("ManifestArtifactData")),
PdbArtifactModelFactory.cs (2)
33string path = item.GetMetadata("RelativePdbPath"); 41Attributes = MSBuildListSplitter.GetNamedProperties(item.GetMetadata("ManifestArtifactData")),
Microsoft.DotNet.Build.Tasks.Feed (7)
src\BlobFeedAction.cs (2)
78string relativeBlobPath = item.GetMetadata("RelativeBlobPath"); 83string recursiveDir = item.GetMetadata("RecursiveDir");
src\common\UploadToAzure.cs (1)
90string relativeBlobPath = item.GetMetadata("RelativeBlobPath");
src\model\SetupTargetFeedConfigV3.cs (2)
74FeedKeys = feedKeys.ToImmutableDictionary(i => i.ItemSpec, i => i.GetMetadata("Key")); 75FeedOverrides = feedOverrides.ToImmutableDictionary(i => i.ItemSpec, i => i.GetMetadata("Replacement"));
src\model\SetupTargetFeedConfigV4.cs (2)
73FeedKeys = feedKeys.ToImmutableDictionary(i => i.ItemSpec, i => i.GetMetadata("Key")); 74FeedOverrides = feedOverrides.ToImmutableDictionary(i => i.ItemSpec, i => i.GetMetadata("Replacement"));
Microsoft.DotNet.Build.Tasks.Installers (13)
src\CreateControlFile.cs (2)
57string version = depend.GetMetadata("Version"); 74writer.WriteLine($"{property.ItemSpec}: {property.GetMetadata("Value")}");
src\CreateRpmPackage.cs (2)
96builder.AddRequiredCapability(require.ItemSpec, require.GetMetadata("Version")); 116builder.AddScript(script.GetMetadata("Kind"), File.ReadAllText(script.ItemSpec));
src\CreateWixBuildWixpack.cs (2)
391string bindName = bindPath.GetMetadata("BindName"); 1043string bindName = BindPaths[i].GetMetadata("BindName");
src\GenerateMacOSDistributionFile.cs (6)
66new XAttribute("id", component.GetMetadata("FileNameWithExtension")), 68new XAttribute("title", component.GetMetadata("Title")), 69new XAttribute("description", component.GetMetadata("Description")), 70new XElement("pkg-ref", new XAttribute("id", component.GetMetadata("FileNameWithExtension"))))); 91new XAttribute("id", component.GetMetadata("FileNameWithExtension")), 92component.GetMetadata("FileNameWithExtension")));
src\StabilizeWixFileId.cs (1)
59string replacement = file.GetMetadata("ReplacementId");
Microsoft.DotNet.Build.Tasks.Packaging (85)
ApplyBaseLine.cs (5)
69versions.Add(new Version(baseLinePackage.GetMetadata("Version"))); 80Version.TryParse(dependency.GetMetadata("Version"), out requestedVersion); 105var index = PackageIndex.Load(PackageIndexes.Select(pi => pi.GetMetadata("FullPath"))); 113Version.TryParse(dependency.GetMetadata("Version"), out packageVersion); 114Version.TryParse(dependency.GetMetadata("AssemblyVersion"), out assemblyVersion);
ApplyMetaPackages.cs (3)
69var tfmSpecificSupression = metapackage.GetMetadata("TargetFramework"); 84PackageIndex.Load(PackageIndexes.Select(pi => pi.GetMetadata("FullPath"))) : 102var tfm = originalDependency.GetMetadata("TargetFramework");
ApplyPreReleaseSuffix.cs (3)
66_index = PackageIndex.Load(PackageIndexes.Select(pi => pi.GetMetadata("FullPath"))); 85string packageVersionString = originalPackage.GetMetadata("Version"); 123Version newVersion = ParseAs3PartVersion(stablePackage.GetMetadata("Version"));
CreateTrimDependencyGroups.cs (5)
68var index = PackageIndex.Load(PackageIndexes.Select(pi => pi.GetMetadata("FullPath"))); 182public TaskItemPackageDependency(ITaskItem item) : base(item.ItemSpec, TryParseVersionRange(item.GetMetadata("Version"))) 185TargetFramework = NuGetFramework.Parse(item.GetMetadata(nameof(TargetFramework))); 199string versionString = dependency.GetMetadata("AssemblyVersion"); 202versionString = dependency.GetMetadata("Version");
Extensions.cs (8)
22var metadataValue = taskItem.GetMetadata(metadataName)?.Trim(); 29var metadataValue = taskItem.GetMetadata(metadataName); 40var metadataValue = taskItem.GetMetadata(Metadata.TargetFramework); 52var metadataValue = taskItem.GetMetadata(Metadata.TargetFrameworkMoniker); 63var packageDirectoryName = taskItem.GetMetadata(Metadata.PackageDirectory); 77var metadataValue = taskItem.GetMetadata(Metadata.Version); 88var metadataValue = taskItem.GetMetadata(metadataName); 98var metadataValue = taskItem.GetMetadata(metadataName)?.Trim();
FilterUnknownPackages.cs (1)
41var index = PackageIndex.Load(PackageIndexes.Select(pi => pi.GetMetadata("FullPath")));
GenerateNuSpec.cs (4)
257where !f.GetMetadata(Metadata.FileTarget).StartsWith("$none$", StringComparison.OrdinalIgnoreCase) 260Source = f.GetMetadata(Metadata.FileSource), 262Target = f.GetMetadata(Metadata.FileTarget).Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar), 263Exclude = f.GetMetadata(Metadata.FileExclude)
GeneratePackageReport.cs (2)
203var runtimeIds = framework.GetMetadata("RuntimeIDs")?.Split(';'); 238var index = PackageIndex.Load(PackageIndexes.Select(pi => pi.GetMetadata("FullPath")));
GenerateRuntimeDependencies.cs (7)
70sourceRuntimeFilePath = RuntimeJsonTemplate.GetMetadata("FullPath"); 72string destRuntimeFilePath = RuntimeJson.GetMetadata("FullPath"); 78string alias = dependency.GetMetadata("PackageAlias"); 89var runtimeGroups = Dependencies.GroupBy(d => d.GetMetadata("TargetRuntime")); 151string targetPackageId = dependency.GetMetadata("TargetPackage"); 152string targetPackageAlias = dependency.GetMetadata("TargetPackageAlias"); 175string dependencyVersionString = dependency.GetMetadata("version");
GetInboxFrameworks.cs (1)
57var index = PackageIndex.Load(PackageIndexes.Select(pi => pi.GetMetadata("FullPath")));
GetLastStablePackage.cs (4)
82var versionString = latestPackage.GetMetadata("Version"); 103var versionString = stablePackage.GetMetadata("Version"); 130var index = PackageIndex.Load(PackageIndexes.Select(pi => pi.GetMetadata("FullPath"))); 138var versionString = latestPackage.GetMetadata("Version");
GetLayoutFiles.cs (1)
49var rids = i.GetMetadata("RuntimeIds");
GetPackageDescription.cs (1)
53string descriptionPath = DescriptionFile.GetMetadata("FullPath");
GetPackageDestination.cs (1)
118runtime = packageTargetFramework.GetMetadata("TargetRuntime");
GetPackageFromModule.cs (2)
44var index = PackageIndex.Load(PackageIndexes.Select(pi => pi.GetMetadata("FullPath"))); 54modulesToPackages.Add(modulePackage.ItemSpec, modulePackage.GetMetadata("Package"));
GetPackageVersion.cs (2)
36var versionsToConsider = Files.Where(f => !String.IsNullOrEmpty(f.GetMetadata("AssemblyVersion"))) 37.Select(f => new Version(f.GetMetadata("AssemblyVersion")));
HarvestPackage.cs (6)
149_packageFolders.Add(runtimePackage.ItemSpec, LocatePackageFolder(runtimePackage.ItemSpec, runtimePackage.GetMetadata("Version"))); 179var runtimeIds = framework.GetMetadata("RuntimeIDs")?.Split(';'); 271.Where(f => IsIncludedExtension(f.GetMetadata("Extension"))) 324var remappedTargetPath = includeItem?.GetMetadata("TargetPath"); 332var additionalTargetPaths = includeItem?.GetMetadata("AdditionalTargetPath"); 393bool.TryParse(liveFile.OriginalItem.GetMetadata("Preserve"), out preserve);
NuGetPack.cs (1)
164string nuspecPath = nuspec.GetMetadata("FullPath");
PackageItem.cs (4)
18SourcePath = item.GetMetadata("FullPath"); 25TargetPath = item.GetMetadata(nameof(TargetPath)); 69string versionString = OriginalItem.GetMetadata("AssemblyVersion"); 103var value = OriginalItem.GetMetadata(name);
PromoteDependencies.cs (4)
37PackageIndex.Load(PackageIndexes.Select(pi => pi.GetMetadata("FullPath"))) : 105Version = item.GetMetadata("Version"); 106IsReference = item.GetMetadata("TargetPath").StartsWith("ref/", System.StringComparison.OrdinalIgnoreCase); 107TargetFramework = item.GetMetadata(TargetFrameworkMetadataName);
SplitDependenciesBySupport.cs (2)
69string fx = originalItem.GetMetadata("TargetFramework"); 79string minNSFx = originalItem.GetMetadata("MinimumNETStandard");
SplitReferences.cs (4)
54PackageIndex.Load(PackageIndexes.Select(pi => pi.GetMetadata("FullPath"))) : 68string referenceVersion = reference.GetMetadata("Version"); 105Version existingVersion = Version.Parse(existingItem.GetMetadata("Version")); 106Version newVersion = Version.Parse(existingItem.GetMetadata("Version"));
UpdatePackageIndex.cs (9)
89string indexFilePath = PackageIndexFile.GetMetadata("FullPath"); 100foreach(var package in Packages.NullAsEmpty().Select(f => f.GetMetadata("FullPath"))) 106foreach(var packageFolder in PackageFolders.NullAsEmpty().Select(f => f.GetMetadata("FullPath"))) 136var version = baselinePackage.GetMetadata("Version"); 147var version = stablePackage.GetMetadata("Version"); 157var package = moduleToPackage.GetMetadata("Package"); 164index.MergeFrameworkLists(InboxFrameworkListFolder.GetMetadata("FullPath")); 171var layoutDirectory = inboxFrameworkLayoutFolder.GetMetadata("FullPath"); 172var targetFramework = NuGetFramework.Parse(inboxFrameworkLayoutFolder.GetMetadata("TargetFramework"));
ValidatePackage.cs (3)
378var index = PackageIndex.Load(PackageIndexes.Select(pi => pi.GetMetadata("FullPath"))); 477string runtimeIdList = framework.GetMetadata("RuntimeIDs"); 524string version = supportedFramework.GetMetadata("Version");
ValidationTask.cs (2)
105AddSuppression(suppression.ItemSpec, suppression.GetMetadata("Value")); 150PackageIndex.Load(PackageIndexes.Select(pi => pi.GetMetadata("FullPath"))) :
Microsoft.DotNet.Build.Tasks.Packaging.Tests (42)
ApplyBaseLineTests.cs (4)
49item.GetMetadata("Version").Should().Be("4.0.21"); 78item.GetMetadata("Version").Should().Be("4.1.0"); 106item.GetMetadata("Version").Should().Be("4.0.21"); 135item.GetMetadata("Version").Should().Be("4.0.0");
CreateTrimDependencyGroupsTests.cs (26)
143item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("win8")).Should().HaveCount(1), 144item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("monoandroid10")).Should().HaveCount(1), 145item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("monotouch10")).Should().HaveCount(1), 146item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("net45")).Should().HaveCount(1), 147item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("wp8")).Should().HaveCount(1), 148item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("wpa81")).Should().HaveCount(1), 149item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("xamarinios10")).Should().HaveCount(1), 150item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("xamarintvos10")).Should().HaveCount(1), 151item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("xamarinwatchos10")).Should().HaveCount(1), 152item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("xamarinmac20")).Should().HaveCount(1), 153item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("portable45-net45+win8+wp8+wpa81")).Should().HaveCount(1) 230task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("net45") && 236task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("net451") && 242task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("portable45-net45+win8+wp8+wpa81") && 248task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("portable46-net451+win81+wpa81") && 356var actualTFMs = task.TrimmedDependencies.Select(d => d.GetMetadata("TargetFramework")); 393item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("win8")).Should().HaveCount(1), 394item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("monoandroid10")).Should().HaveCount(1), 395item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("monotouch10")).Should().HaveCount(1), 396item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("net45")).Should().HaveCount(1), 397item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("wpa81")).Should().HaveCount(1), 398item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("xamarinios10")).Should().HaveCount(1), 399item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("xamarintvos10")).Should().HaveCount(1), 400item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("xamarinwatchos10")).Should().HaveCount(1), 401item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("xamarinmac20")).Should().HaveCount(1), 402item => task.TrimmedDependencies.Where(f => f.GetMetadata("TargetFramework").Equals("portable45-net45+win8+wpa81")).Should().HaveCount(1)
GetLastStablePackageTests.cs (6)
48item.GetMetadata("Version").Should().Be("1.1.0"); 76item.GetMetadata("Version").Should().Be("1.0.0"); 103item.GetMetadata("Version").Should().Be("1.0.0"); 153item.GetMetadata("Version").Should().Be("1.0.0"); 181item.GetMetadata("Version").Should().Be("1.1.0"); 208item.GetMetadata("Version").Should().Be("1.1.0");
HarvestPackageTests.cs (6)
106var ns10asset = task.HarvestedFiles.FirstOrDefault(f => f.GetMetadata("TargetFramework") == "netstandard1.0"); 108ns10asset.GetMetadata("AssemblyVersion").Should().Be("1.2.3.0"); 133var net46asset = task.HarvestedFiles.FirstOrDefault(f => f.GetMetadata("TargetFramework") == "net46"); 135net46asset.GetMetadata("AssemblyVersion").Should().Be("4.0.1.0"); 166task.HarvestedFiles.Should().Contain(f => f.GetMetadata("AssemblyVersion") == "4.1.0.0"); 168task.SupportedFrameworks.Should().NotContain(f => f.GetMetadata("Version") == "unknown");
Microsoft.DotNet.Build.Tasks.TargetFramework (1)
ChooseBestP2PTargetFrameworkTask.cs (1)
83string referencedProjectFrameworkString = project.GetMetadata(TARGET_FRAMEWORKS);
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Vsix\GetPkgDefAssemblyDependencyGuid.cs (1)
45var value = string.IsNullOrEmpty(InputMetadata) ? item.ItemSpec : item.GetMetadata(InputMetadata);
Microsoft.DotNet.Build.Tasks.VisualStudio.Tests (2)
Vsix\GetPkgDefAssemblyDependencyGuidTests.cs (2)
40}, task.OutputItems.Select(i => i.GetMetadata("SomeOutput"))); 62}, task.OutputItems.Select(i => i.GetMetadata("SomeOutput")));
Microsoft.DotNet.Build.Tasks.Workloads (29)
CreateVisualStudioWorkload.wix.cs (9)
359if (_supportsMachineArch[sdkFeatureBand] || !string.Equals(msiOutputItem.GetMetadata(Metadata.Platform), DefaultValues.arm64)) 362new(msiOutputItem, BaseIntermediateOutputPath, BaseOutputPath, sdkFeatureBand, chip: null, machineArch: msiOutputItem.GetMetadata(Metadata.Platform), outOfSupport: IsOutOfSupportInVisualStudio) : 363new(msiOutputItem, BaseIntermediateOutputPath, BaseOutputPath, sdkFeatureBand, chip: msiOutputItem.GetMetadata(Metadata.Platform), outOfSupport: IsOutOfSupportInVisualStudio); 408if (_supportsMachineArch[manifestPackage.SdkFeatureBand] || !string.Equals(msiOutputItem.GetMetadata(Metadata.Platform), DefaultValues.arm64)) 411new(msiOutputItem, BaseIntermediateOutputPath, BaseOutputPath, manifestPackage.SdkFeatureBand, chip: null, machineArch: msiOutputItem.GetMetadata(Metadata.Platform), outOfSupport: IsOutOfSupportInVisualStudio) : 412new(msiOutputItem, BaseIntermediateOutputPath, BaseOutputPath, manifestPackage.SdkFeatureBand, chip: msiOutputItem.GetMetadata(Metadata.Platform), outOfSupport: IsOutOfSupportInVisualStudio); 437if (_supportsMachineArch[msi.Package.SdkFeatureBand] || !string.Equals(msiOutputItem.GetMetadata(Metadata.Platform), DefaultValues.arm64)) 442new(msiOutputItem, BaseIntermediateOutputPath, BaseOutputPath, msi.Package.SdkFeatureBand, chip: null, machineArch: msiOutputItem.GetMetadata(Metadata.Platform)) : 443new(msiOutputItem, BaseIntermediateOutputPath, BaseOutputPath, msi.Package.SdkFeatureBand, chip: msiOutputItem.GetMetadata(Metadata.Platform));
CreateVisualStudioWorkloadSet.wix.cs (1)
83MsiSwixProject swixProject = new(msiOutputItem, BaseIntermediateOutputPath, BaseOutputPath, workloadSetPackage.SdkFeatureBand, chip: null, machineArch: msiOutputItem.GetMetadata(Metadata.Platform));
Msi\MsiBase.wix.cs (1)
243NuGetPackageFiles[msi.GetMetadata(Workloads.Metadata.FullPath)] = @"\data";
Msi\MsiPayloadPackageProject.wix.cs (1)
36string platform = msi.GetMetadata(Metadata.Platform);
StringExtensions.cs (1)
46str = str.Replace(item.ItemSpec, item.GetMetadata(Metadata.Replacement));
Swix\MsiSwixProject.wix.cs (4)
67string chip = null, string machineArch = null, string productArch = null, bool outOfSupport = false) : base(msi.GetMetadata(Metadata.SwixPackageId), new Version(msi.GetMetadata(Metadata.Version)), baseIntermediateOutputPath, baseOutputPath, outOfSupport) 73Platform = msi.GetMetadata(Metadata.Platform); 92ReplacementTokens[SwixTokens.__VS_PAYLOAD_SOURCE__] = msi.GetMetadata(Metadata.FullPath);
Swix\SwixComponent.cs (9)
162Version componentVersion = resourceItem != null && !string.IsNullOrWhiteSpace(resourceItem.GetMetadata(Metadata.Version)) ? 163new Version(resourceItem.GetMetadata(Metadata.Version)) : 166bool.TryParse(resourceItem?.GetMetadata(Metadata.AdvertisePackage), out bool advertise); 171resourceItem != null && !string.IsNullOrEmpty(resourceItem.GetMetadata(Metadata.Title)) ? resourceItem.GetMetadata(Metadata.Title) : workload.Description ?? throw new Exception(Strings.ComponentTitleCannotBeNull), 172resourceItem != null && !string.IsNullOrEmpty(resourceItem.GetMetadata(Metadata.Description)) ? resourceItem.GetMetadata(Metadata.Description) : workload.Description ?? throw new Exception(Strings.ComponentDescriptionCannotBeNull), 174resourceItem != null && !string.IsNullOrEmpty(resourceItem.GetMetadata(Metadata.Category)) ? resourceItem.GetMetadata(Metadata.Category) : DefaultValues.ComponentCategory ?? throw new Exception(Strings.ComponentCategoryCannotBeNull),
WorkloadManifestPackage.wix.cs (1)
95SupportsMachineArch = bool.TryParse(package.GetMetadata(Metadata.SupportsMachineArch), out bool supportsMachineArch) ? supportsMachineArch : false;
WorkloadPackageBase.cs (2)
323if (!string.IsNullOrWhiteSpace(package.GetMetadata(Metadata.MsiVersion))) 326return new(package.GetMetadata(Metadata.MsiVersion));
Microsoft.DotNet.Build.Tasks.Workloads.Tests (19)
CreateVisualStudioWorkloadSetTests.cs (3)
49ITaskItem msi = createWorkloadSetTask.Msis.Where(i => i.GetMetadata(Metadata.Platform) == "x64").FirstOrDefault(); 69Assert.Equal(DefaultValues.PackageTypeMsiWorkloadSet, workloadSetSwixItem.GetMetadata(Metadata.PackageType)); 80s => s.GetMetadata(Metadata.PackageType).Equals(DefaultValues.PackageTypeWorkloadSetPackageGroup)).
CreateVisualStudioWorkloadTests.cs (3)
152IEnumerable<ITaskItem> swixComponentProjects = createWorkloadTask.SwixProjects.Where(s => s.GetMetadata(Metadata.PackageType).Equals(DefaultValues.PackageTypeComponent)); 153Assert.All(swixComponentProjects, c => Assert.True(c.ItemSpec.Contains(".pre.") && c.GetMetadata(Metadata.IsPreview) == "true" || 154!c.ItemSpec.Contains(".pre.") && c.GetMetadata(Metadata.IsPreview) == "false"));
MsiTests.cs (9)
36string msiPath603 = msi603.GetMetadata(Metadata.FullPath); 50string msiPath603 = msi603.GetMetadata(Metadata.FullPath); 54string msiPath604 = msi604.GetMetadata(Metadata.FullPath); 76Assert.NotNull(msi603.GetMetadata(Metadata.WixObj)); 77Assert.NotNull(msi604.GetMetadata(Metadata.WixObj)); 91string msiPath = item.GetMetadata(Metadata.FullPath); 107Assert.NotNull(item.GetMetadata(Metadata.WixObj)); 123string msiPath = item.GetMetadata(Metadata.FullPath); 142Assert.NotNull(item.GetMetadata(Metadata.WixObj));
SwixPackageGroupTests.cs (2)
42Assert.Equal(expectedFeatureBand, packageGroupItem.GetMetadata(Metadata.SdkFeatureBand)); 43Assert.Equal(DefaultValues.PackageTypeManifestPackageGroup, packageGroupItem.GetMetadata(Metadata.PackageType));
SwixPackageTests.cs (2)
55Assert.Equal($"Microsoft.iOS.Templates.{packageVersion}", msiItem.GetMetadata(Metadata.SwixPackageId)); 59chip: msiItem.GetMetadata(Metadata.Platform),
Microsoft.DotNet.Deployment.Tasks.Links (2)
Microsoft.DotNet.GenFacades (2)
GenPartialFacadeSourceGenerator.cs (1)
73string value = item.GetMetadata("Aliases");
NotSupportedAssemblyGenerator.cs (1)
55string outputPath = item.GetMetadata("OutputPath");
Microsoft.DotNet.Helix.Sdk (30)
CancelHelixJob.cs (1)
32string correlationId = job.GetMetadata("Identity");
CheckAzurePipelinesTestResults.cs (4)
145t.GetMetadata("JobName") == jobId && t.GetMetadata("WorkItemName") == workItemName); 150Log.LogError(FailureCategory.Test, $"Test {name} has failed. Check the Test tab or this console log: {workItem.GetMetadata("ConsoleOutputUri")}"); 223HashSet<string> expectedFailures = ExpectedTestFailures?.Select(i => i.GetMetadata("Identity")).ToHashSet() ?? new HashSet<string>();
CheckHelixJobStatus.cs (4)
37var failed = workItem.GetMetadata("Failed"); 40var jobName = workItem.GetMetadata("JobName"); 41var workItemName = workItem.GetMetadata("WorkItemName"); 42var consoleUri = workItem.GetMetadata("ConsoleOutputUri");
CreateFailedTestsForFailedWorkItems.cs (4)
24var jobName = workItem.GetMetadata("JobName"); 25var workItemName = workItem.GetMetadata("WorkItemName"); 26var testRunId = workItem.GetMetadata("TestRunId"); 27var failed = workItem.GetMetadata("Failed") == "true";
DownloadFromResultsContainer.cs (2)
58await writer.WriteLineAsync(metadata.GetMetadata("Identity")); 70string workItemName = workItem.GetMetadata("Identity");
GetHelixWorkItems.cs (1)
39var jobName = job.GetMetadata("Identity");
SendHelixJob.cs (9)
354string payloadDirectory = workItem.GetMetadata(MetadataNames.PayloadDirectory); 355string payloadArchive = workItem.GetMetadata(MetadataNames.PayloadArchive); 356string payloadUri = workItem.GetMetadata(MetadataNames.PayloadUri); 380string timeoutString = workItem.GetMetadata(MetadataNames.Timeout); 494string path = correlationPayload.GetMetadata(MetadataNames.FullPath); 495string uri = correlationPayload.GetMetadata(MetadataNames.Uri); 496string destination = correlationPayload.GetMetadata(MetadataNames.Destination) ?? ""; 514string includeDirectoryNameStr = correlationPayload.GetMetadata(MetadataNames.IncludeDirectoryName); 530string asArchiveStr = correlationPayload.GetMetadata(MetadataNames.AsArchive);
TaskItemExtensions.cs (2)
13value = item.GetMetadata(key); 19value = item.GetMetadata(key);
WaitForHelixJobCompletion.cs (3)
30List<(string jobName, string queueName, string jobCancellationToken)> jobNames = Jobs.Select(j => (j.GetMetadata("Identity"), j.GetMetadata("HelixTargetQueue"), j.GetMetadata("HelixJobCancellationToken"))).ToList();
Microsoft.DotNet.Helix.Sdk.Tests (48)
CreateXHarnessAndroidWorkItemsTests.cs (20)
78workItem.GetMetadata("Identity").Should().Be("System.Foo"); 79workItem.GetMetadata("Timeout").Should().Be("00:17:42"); 81var payloadArchive = workItem.GetMetadata("PayloadArchive"); 85var command = workItem.GetMetadata("Command"); 117workItem.GetMetadata("Identity").Should().Be("System.Bar"); 120workItem.GetMetadata("Identity").Should().Be("System.Foo"); 122var payloadArchive = workItem.GetMetadata("PayloadArchive"); 148workItem1.GetMetadata("Identity").Should().Be("item-2"); 150var payloadArchive = workItem1.GetMetadata("PayloadArchive"); 155workItem2.GetMetadata("Identity").Should().Be("item-1"); 157payloadArchive = workItem2.GetMetadata("PayloadArchive"); 180workItem.GetMetadata("Identity").Should().Be("System.Foo"); 181workItem.GetMetadata("Timeout").Should().Be("00:17:42"); 183var payloadArchive = workItem.GetMetadata("PayloadArchive"); 187var command = workItem.GetMetadata("Command"); 226mockBundle.Setup(x => x.GetMetadata(CreateXHarnessAndroidWorkItems.MetadataNames.AndroidPackageName)).Returns(apkName); 230mockBundle.Setup(x => x.GetMetadata(XHarnessTaskBase.MetadataName.WorkItemTimeout)).Returns(workItemTimeout); 235mockBundle.Setup(x => x.GetMetadata(XHarnessTaskBase.MetadataName.TestTimeout)).Returns(testTimeout); 240mockBundle.Setup(x => x.GetMetadata(XHarnessTaskBase.MetadataName.ExpectedExitCode)).Returns(expectedExitCode.ToString()); 245mockBundle.Setup(x => x.GetMetadata(CreateXHarnessAndroidWorkItems.MetadataNames.ApkPath)).Returns(apkPath);
CreateXHarnessAppleWorkItemsTests.cs (28)
81workItem.GetMetadata("Identity").Should().Be("System.Foo"); 82workItem.GetMetadata("Timeout").Should().Be("00:17:42"); 84var payloadArchive = workItem.GetMetadata("PayloadArchive"); 88var command = workItem.GetMetadata("Command"); 127workItem.GetMetadata("Identity").Should().Be("System.Bar"); 130workItem.GetMetadata("Identity").Should().Be("System.Foo"); 132var payloadArchive = workItem.GetMetadata("PayloadArchive"); 137var command = workItem.GetMetadata("Command"); 159workItem.GetMetadata("Identity").Should().Be("System.Foo"); 161var payloadArchive = workItem.GetMetadata("PayloadArchive"); 189workItem1.GetMetadata("Identity").Should().Be("item-1"); 191var payloadArchive = workItem1.GetMetadata("PayloadArchive"); 195var command = workItem1.GetMetadata("Command"); 200workItem2.GetMetadata("Identity").Should().Be("item-2"); 202payloadArchive = workItem2.GetMetadata("PayloadArchive"); 206command = workItem2.GetMetadata("Command"); 232workItem.GetMetadata("Identity").Should().Be("System.Foo"); 233workItem.GetMetadata("Timeout").Should().Be("00:17:42"); 235var payloadArchive = workItem.GetMetadata("PayloadArchive"); 239var command = workItem.GetMetadata("Command"); 288mockBundle.Setup(x => x.GetMetadata(CreateXHarnessAppleWorkItems.MetadataNames.Target)).Returns(target); 289mockBundle.Setup(x => x.GetMetadata(CreateXHarnessAppleWorkItems.MetadataNames.IncludesTestRunner)).Returns(includesTestRunner.ToString()); 293mockBundle.Setup(x => x.GetMetadata(XHarnessTaskBase.MetadataName.WorkItemTimeout)).Returns(workItemTimeout); 298mockBundle.Setup(x => x.GetMetadata(XHarnessTaskBase.MetadataName.TestTimeout)).Returns(testTimeout); 303mockBundle.Setup(x => x.GetMetadata(CreateXHarnessAppleWorkItems.MetadataNames.LaunchTimeout)).Returns(launchTimeout); 308mockBundle.Setup(x => x.GetMetadata(XHarnessTaskBase.MetadataName.ExpectedExitCode)).Returns(expectedExitCode.ToString()); 313mockBundle.Setup(x => x.GetMetadata(XHarnessTaskBase.MetadataName.CustomCommands)).Returns(customCommands); 318mockBundle.Setup(x => x.GetMetadata(CreateXHarnessAppleWorkItems.MetadataNames.AppBundlePath)).Returns(appBundlePath);
Microsoft.DotNet.PackageTesting (3)
VerifyClosure.cs (2)
78var path = source.GetMetadata("FullPath"); 134var versionString = ignoredReference.GetMetadata("Version");
VerifyTypes.cs (1)
80var path = source.GetMetadata("FullPath");
Microsoft.DotNet.SharedFramework.Sdk (22)
src\CreateFrameworkListFile.cs (8)
64?.Select(item => new XAttribute(item.ItemSpec, item.GetMetadata("Value"))) 85TargetPath = item.GetMetadata("TargetPath"), 88IsNative = item.GetMetadata("IsNative") == "true", 89IsSymbolFile = item.GetMetadata("IsSymbolFile") == "true", 90IsPgoData = item.GetMetadata("IsPgoData") == "true", 217string profile = classItem.GetMetadata("Profile"); 224string referencedByDefault = classItem.GetMetadata("ReferencedByDefault"); 269?.Any(prefix => item.GetMetadata("TargetPath")?.StartsWith(prefix) == true) ?? true;
src\GeneratePlatformManifestEntriesFromFileList.cs (2)
31AssemblyVersion = FileUtilities.GetAssemblyName(file.GetMetadata("OriginalFilePath"))?.Version.ToString() ?? string.Empty, 32FileVersion = FileUtilities.GetFileVersion(file.GetMetadata("OriginalFilePath"))?.ToString() ?? string.Empty
src\GeneratePlatformManifestEntriesFromTemplate.cs (3)
49var isNativeEntry = entryTemplate.GetMetadata("IsNative") == "true"; 61string localAssemblyVersionFallback = entryTemplate.GetMetadata("FallbackAssemblyVersion"); 70string localFileVersionFallback = entryTemplate.GetMetadata("FallbackFileVersion");
src\GenerateSharedFrameworkDepsFile.cs (2)
57if (!string.IsNullOrEmpty(file.GetMetadata("GeneratedBuildFile"))) 65string cultureMaybe = file.GetMetadata("Culture");
src\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (2)
78var path = source.GetMetadata("FullPath"); 134var versionString = ignoredReference.GetMetadata("Version");
src\Microsoft.DotNet.PackageTesting\VerifyTypes.cs (1)
80var path = source.GetMetadata("FullPath");
src\ValidateFileVersions.cs (4)
25if (file.GetMetadata("IsSymbolFile").Equals("true", StringComparison.OrdinalIgnoreCase)) 94var filePath = file.GetMetadata("FullPath"); 110Version.TryParse(file.GetMetadata("AssemblyVersion"), out assemblyVersion); 111Version.TryParse(file.GetMetadata("FileVersion"), out fileVersion);
Microsoft.DotNet.SignTool (16)
src\SignToolTask.cs (16)
259var itemsToSign = ItemsToSign.Select(i => new ItemToSign(i.ItemSpec, i.GetMetadata(SignToolConstants.CollisionPriorityId))).OrderBy(i => i.CollisionPriorityId).ToList(); 334var dualSigningAllowed = certificateSignInfo.GetMetadata("DualSigningAllowed"); 336var macSigningOperation = certificateSignInfo.GetMetadata("MacCertificate"); 337var macNotarizationAppName = certificateSignInfo.GetMetadata("MacNotarizationAppName"); 338var collisionPriorityId = certificateSignInfo.GetMetadata(SignToolConstants.CollisionPriorityId); 339var detachedSignatureCertificate = certificateSignInfo.GetMetadata("DetachedSignature"); 448var certificate = item.GetMetadata("CertificateName"); 449var collisionPriorityId = item.GetMetadata(SignToolConstants.CollisionPriorityId); 495var publicKeyToken = item.GetMetadata("PublicKeyToken"); 496var certificateName = item.GetMetadata("CertificateName"); 497var collisionPriorityId = item.GetMetadata(SignToolConstants.CollisionPriorityId); 551var targetFramework = item.GetMetadata("TargetFramework"); 552var publicKeyToken = item.GetMetadata("PublicKeyToken"); 553var certificateName = item.GetMetadata("CertificateName"); 554var collisionPriorityId = item.GetMetadata(SignToolConstants.CollisionPriorityId); 555var executableTypeMetadata = item.GetMetadata("ExecutableType");
Microsoft.DotNet.SourceBuild.Tasks (8)
src\UsageReport\WritePackageUsageData.cs (2)
133item.GetMetadata("PackageId"), 134NuGetVersion.Parse(item.GetMetadata("PackageVersion"))))
src\UsageReport\WriteUsageReports.cs (2)
75item.GetMetadata("PackageId"), 76item.GetMetadata("OriginBuildName"));
src\WriteBuildOutputProps.cs (4)
57using (var reader = new PackageArchiveReader(item.GetMetadata("FullPath"))) 93string propertyName = extraProp.GetMetadata("Identity"); 96if (bool.TryParse(extraProp.GetMetadata("DoNotOverwrite"), out doNotOverwrite) && doNotOverwrite) 100sw.WriteLine($" <{propertyName}{overwriteCondition}>{extraProp.GetMetadata("Version")}</{propertyName}>");
Microsoft.DotNet.XliffTasks (12)
Tasks\GatherTranslatedSource.cs (5)
28bool preserveFileName = string.Equals(xlf.GetMetadata(MetadataKey.XlfPreserveFileName), "true", StringComparison.OrdinalIgnoreCase); 60string link = xlf.GetMetadata(MetadataKey.Link); 87string manifestResourceName = xlf.GetMetadata(MetadataKey.ManifestResourceName); 97string logicalName = xlf.GetMetadata(MetadataKey.LogicalName); 108string dependentUpon = xlf.GetMetadata(MetadataKey.DependentUpon);
Tasks\GatherXlf.cs (2)
53bool preserveFileName = string.Equals(source.GetMetadata(MetadataKey.XlfPreserveFileName), "true", StringComparison.OrdinalIgnoreCase); 55string translatedFileName = source.GetMetadata(MetadataKey.XlfTranslatedFilename);
Tasks\TaskItemExtensions.cs (2)
12string value = item.GetMetadata(key); 24string value = item.GetMetadata(key);
Tasks\TransformTemplates.cs (2)
35Dictionary<string, ITaskItem> resourceMap = UnstructuredResources.ToDictionary(item => item.GetMetadata("FullPath")); 64string templatePath = template.GetMetadata("FullPath");
Tasks\TranslateSource.cs (1)
23TranslatableDocument sourceDocument = XlfTask.LoadSourceDocument(sourcePath, XlfFile.GetMetadata(MetadataKey.XlfSourceFormat));
Microsoft.Extensions.ApiDescription.Client (6)
GetOpenApiReferenceMetadata.cs (6)
58var codeGenerator = item.GetMetadata("CodeGenerator"); 62var type = string.IsNullOrEmpty(item.GetMetadata("SourceProject")) ? 82var outputPath = item.GetMetadata("OutputPath"); 86var filename = item.GetMetadata("Filename"); 110var className = item.GetMetadata("ClassName"); 119var @namespace = item.GetMetadata("Namespace");
Microsoft.Extensions.ApiDescription.Client.Tests (2)
MetadataSerializerTest.cs (2)
153Assert.Equal(value, item.GetMetadata("Value")); 168Assert.Equal("a value", item.GetMetadata("Value"));
Microsoft.Maui.Resizetizer (11)
GetMauiAssetPath.cs (2)
46 var link = item.GetMetadata("Link"); 53 var project = Normalize(item.GetMetadata("ProjectDirectory"));
ResizeImageInfo.cs (9)
81 var fileInfo = new FileInfo(image.GetMetadata("FullPath")); 87 info.Alias = image.GetMetadata("Link"); 89 info.BaseSize = Utils.ParseSizeString(image.GetMetadata("BaseSize")); 91 if (bool.TryParse(image.GetMetadata("Resize"), out var rz)) 101 var tintColor = image.GetMetadata("TintColor"); 106 var color = image.GetMetadata("Color"); 111 if (bool.TryParse(image.GetMetadata("IsAppIcon"), out var iai)) 114 if (float.TryParse(image.GetMetadata("ForegroundScale"), NumberStyles.Number, CultureInfo.InvariantCulture, out var fsc)) 117 var fgFile = image.GetMetadata("ForegroundFile");
Microsoft.NET.Build.Containers (9)
Tasks\CreateNewImageToolTask.cs (7)
162if (sanitizedLabels.Any(i => i.GetMetadata("Value") is null)) 165sanitizedLabels = sanitizedLabels.Where(i => i.GetMetadata("Value") is not null); 168string[] readyLabels = sanitizedLabels.Select(i => i.ItemSpec + "=" + i.GetMetadata("Value")).ToArray(); 185.Select(i => (i.ItemSpec, i.GetMetadata("Type"))) 195if (sanitizedEnvVariables.Any(i => i.GetMetadata("Value") is null)) 198sanitizedEnvVariables = sanitizedEnvVariables.Where(i => i.GetMetadata("Value") is not null); 200string[] readyEnvVariables = sanitizedEnvVariables.Select(i => i.ItemSpec + "=" + i.GetMetadata("Value")).ToArray();
VSHostObject.cs (2)
30username = credentialItem.GetMetadata(UserMetaDataName); 33password = credentialItem.GetMetadata(PasswordMetaDataName);
Microsoft.NET.Build.Extensions.Tasks (17)
AddFacadesToReferences.cs (4)
25string filename = facade.GetMetadata("FileName"); 43if (!reference.GetMetadata(MetadataKeys.IsImplicitlyDefined).Equals("True", StringComparison.OrdinalIgnoreCase) && 44reference.GetMetadata(MetadataKeys.NuGetSourceType) == "") 57string filename = facade.GetMetadata("FileName");
ConflictItem.cs (4)
67var assemblyVersionString = OriginalItem?.GetMetadata(nameof(AssemblyVersion)) ?? string.Empty; 131var fileVersionString = OriginalItem?.GetMetadata(nameof(FileVersion)) ?? string.Empty; 170_packageId = OriginalItem?.GetMetadata(MetadataNames.NuGetPackageId) ?? string.Empty; 188var packageVersionString = OriginalItem?.GetMetadata(nameof(MetadataNames.NuGetPackageVersion)) ?? string.Empty;
ItemUtilities.cs (8)
16string value = item.GetMetadata(metadataName); 28string value = item.GetMetadata(name); 35string value = item.GetMetadata(name); 47var aliases = item?.GetMetadata(MetadataNames.Aliases); 89var isPrivate = MSBuildUtilities.ConvertStringToBool(item?.GetMetadata(MetadataNames.Private), defaultValue: true); 109var sourcePath = item?.GetMetadata(MetadataNames.HintPath)?.Trim(); 130var value = item?.GetMetadata(metadata)?.Trim(); 144var destinationSubDirectory = item?.GetMetadata("DestinationSubDirectory");
PackageOverride.cs (1)
42string overriddenPackagesString = packageOverrideItem.GetMetadata(MetadataKeys.OverriddenPackages);
Microsoft.NET.Build.Tasks (208)
AllowEmptyTelemetry.cs (2)
44var value = hasValue ? item.GetMetadata("Value") : null; 46var hash = hasHash ? bool.Parse(item.GetMetadata("Hash")) : false;
ApplyImplicitVersions.cs (4)
42string versionOnPackageReference = packageReference.GetMetadata(MetadataKeys.Version); 93public string TargetFrameworkVersion => _item.GetMetadata("TargetFrameworkVersion"); 95public string DefaultVersion => _item.GetMetadata("DefaultVersion"); 97public string LatestVersion => _item.GetMetadata("LatestVersion");
CheckForDuplicateFrameworkReferences.cs (1)
44if (item.GetMetadata(MetadataKeys.IsImplicitlyDefined).Equals("true", StringComparison.OrdinalIgnoreCase))
CheckForDuplicateItemMetadata.cs (1)
29var groupings = Items.GroupBy(item => item.GetMetadata(MetadataName))
CheckForImplicitPackageReferenceOverrides.cs (1)
36if (item.GetMetadata(MetadataKeys.IsImplicitlyDefined).Equals("true", StringComparison.OrdinalIgnoreCase))
CollatePackageDownloads.cs (1)
31g.Select(p => "[" + p.GetMetadata("Version") + "]")));
CollectSDKReferencesDesignTime.cs (2)
72var isImplicitlyDefinedString = packageReference.GetMetadata(MetadataKeys.IsImplicitlyDefined); 88newTaskItem.SetMetadata(MetadataKeys.Version, packageReference.GetMetadata(MetadataKeys.Version));
CompilationOptionsConverter.cs (6)
21compilerOptionsItem.GetMetadata("DefineConstants")?.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries), 22compilerOptionsItem.GetMetadata("LangVersion"), 23compilerOptionsItem.GetMetadata("PlatformTarget"), 27compilerOptionsItem.GetMetadata("AssemblyOriginatorKeyFile"), 30compilerOptionsItem.GetMetadata("DebugType"), 31"exe".Equals(compilerOptionsItem.GetMetadata("OutputType"), StringComparison.OrdinalIgnoreCase),
ConflictItem.cs (4)
67var assemblyVersionString = OriginalItem?.GetMetadata(nameof(AssemblyVersion)) ?? string.Empty; 131var fileVersionString = OriginalItem?.GetMetadata(nameof(FileVersion)) ?? string.Empty; 170_packageId = OriginalItem?.GetMetadata(MetadataNames.NuGetPackageId) ?? string.Empty; 188var packageVersionString = OriginalItem?.GetMetadata(nameof(MetadataNames.NuGetPackageVersion)) ?? string.Empty;
CreateWindowsSdkKnownFrameworkReferences.cs (2)
75var windowsSdkPackageVersion = supportedWindowsVersion.GetMetadata("WindowsSdkPackageVersion"); 79var minimumNETVersion = supportedWindowsVersion.GetMetadata("MinimumNETVersion");
GenerateBundle.cs (1)
93bundleRelativePath: item.GetMetadata(MetadataKeys.RelativePath)));
GenerateDepsFile.cs (2)
129package.GetMetadata(MetadataKeys.RuntimeStoreManifestNames)); 189if (!IsSingleFile || !item.GetMetadata(MetadataKeys.DropFromSingleFile).Equals("true"))
GenerateGlobalUsings.cs (1)
67taskItem.GetMetadata("Alias"));
GenerateRuntimeConfigurationFiles.cs (1)
317string valueString = hostConfigurationOption.GetMetadata("Value");
GenerateShims.cs (1)
155return apphostsForShimRuntimeIdentifiers.Single(i => i.GetMetadata(MetadataKeys.RuntimeIdentifier) == runtimeIdentifier).ItemSpec;
GenerateSupportedTargetFrameworkAlias.cs (2)
51var displayName = string.IsNullOrWhiteSpace(tfm.GetMetadata("DisplayName")) ? targetFrameworkAlias : tfm.GetMetadata("DisplayName");
GetDefaultPlatformTargetForNetFramework.cs (1)
56string pathInPackage = nativeItem.GetMetadata(MetadataKeys.PathInPackage);
GetPackageDirectory.cs (3)
47string packageName = item.GetMetadata(MetadataKeys.NuGetPackageId); 48string packageVersion = item.GetMetadata(MetadataKeys.NuGetPackageVersion); 51|| !string.IsNullOrEmpty(item.GetMetadata(MetadataKeys.PackageDirectory)))
GetPackagesToPrune.cs (2)
84i => i.GetMetadata("IsTransitiveFrameworkReference") is string transitiveVal && !transitiveVal.Equals("true", StringComparison.OrdinalIgnoreCase)).ToList(); 97runtimeFrameworks.Add(targetingPack.GetMetadata("RuntimeFrameworkName"));
GetPublishItemsOutputGroupOutputs.cs (3)
26var newItem = new TaskItem(r.GetMetadata("FullPath")); 28newItem.SetMetadata(metadataName: MetadataKeys.TargetPath, metadataValue: r.GetMetadata(MetadataKeys.RelativePath)); 29newItem.SetMetadata(metadataName: "OutputPath", (PublishDir ?? "") + r.GetMetadata(MetadataKeys.RelativePath));
ItemUtilities.cs (8)
16string value = item.GetMetadata(metadataName); 28string value = item.GetMetadata(name); 35string value = item.GetMetadata(name); 47var aliases = item?.GetMetadata(MetadataNames.Aliases); 89var isPrivate = MSBuildUtilities.ConvertStringToBool(item?.GetMetadata(MetadataNames.Private), defaultValue: true); 109var sourcePath = item?.GetMetadata(MetadataNames.HintPath)?.Trim(); 130var value = item?.GetMetadata(metadata)?.Trim(); 144var destinationSubDirectory = item?.GetMetadata("DestinationSubDirectory");
ItemUtilities.NuGet.cs (2)
16string packageName = item.GetMetadata(MetadataKeys.NuGetPackageId); 17string packageVersion = item.GetMetadata(MetadataKeys.NuGetPackageVersion);
JoinItems.cs (3)
110ret.SetMetadata(name, right.GetMetadata(name)); 118ret.SetMetadata(name, left.GetMetadata(name)); 142return item.GetMetadata(key);
PackageOverride.cs (1)
42string overriddenPackagesString = packageOverrideItem.GetMetadata(MetadataKeys.OverriddenPackages);
PrepareForReadyToRunCompilation.cs (9)
79if (ReadyToRunUseCrossgen2 && !string.IsNullOrEmpty(Crossgen2Tool.GetMetadata(MetadataKeys.TargetOS))) 80return Crossgen2Tool.GetMetadata(MetadataKeys.TargetOS) == "windows"; 91if (ReadyToRunUseCrossgen2 && !string.IsNullOrEmpty(Crossgen2Tool.GetMetadata(MetadataKeys.TargetOS))) 92return Crossgen2Tool.GetMetadata(MetadataKeys.TargetOS) == "linux"; 102string isVersion5 = Crossgen2Tool.GetMetadata(MetadataKeys.IsVersion5); 105string perfmapVersion = Crossgen2Tool.GetMetadata(MetadataKeys.PerfmapFormatVersion); 115string diaSymReaderPath = CrossgenTool?.GetMetadata(MetadataKeys.DiaSymReader); 165var outputR2RImageRelativePath = file.GetMetadata(MetadataKeys.RelativePath); 279var compositeR2RImageRelativePath = MainAssembly.GetMetadata(MetadataKeys.RelativePath);
ProcessFrameworkReferences.cs (29)
256targetingPackVersion = frameworkReference.GetMetadata("TargetingPackVersion"); 317isTrimmable = frameworkReference.GetMetadata(MetadataKeys.IsTrimmable); 619var requiredLabelsMetadata = frameworkReference?.GetMetadata(MetadataKeys.RuntimePackLabels) ?? ""; 794var packTargetFramework = NuGetFramework.Parse(pack.GetMetadata("TargetFramework")); 805var packVersion = knownPack.GetMetadata(packName + "PackVersion"); 818var packNamePattern = knownPack.GetMetadata(packName + "PackNamePattern"); 819var packSupportedRuntimeIdentifiers = knownPack.GetMetadata(packName + "RuntimeIdentifiers").Split(';'); 828Log.LogMessage(MessageImportance.Low, $"Determining best RID for '{knownPack.ItemSpec}@{packVersion}' for '{hostRuntimeIdentifier}' from among '{knownPack.GetMetadata(packName + "RuntimeIdentifiers")}'"); 879if (knownPack.GetMetadata("ILCompilerRuntimePackNamePattern") is string runtimePackNamePattern && runtimePackNamePattern != string.Empty) 1139x.GetMetadata(MetadataKeys.Version).Equals( 1140y.GetMetadata(MetadataKeys.Version), StringComparison.OrdinalIgnoreCase); 1147hashCode = hashCode * -1521134295 + obj.GetMetadata(MetadataKeys.Version).GetHashCode(); 1154string? value = frameworkReference?.GetMetadata("TargetLatestRuntimePatch"); 1174string? requestedVersion = frameworkReference?.GetMetadata("RuntimeFrameworkVersion"); 1207TargetFramework = NuGetFramework.Parse(item.GetMetadata("TargetFramework")); 1214public string RuntimeFrameworkName => _item.GetMetadata(MetadataKeys.RuntimeFrameworkName); 1215public string DefaultRuntimeFrameworkVersion => _item.GetMetadata("DefaultRuntimeFrameworkVersion"); 1218public string TargetingPackName => _item.GetMetadata("TargetingPackName"); 1219public string TargetingPackVersion => _item.GetMetadata("TargetingPackVersion"); 1220public string TargetingPackFormat => _item.GetMetadata("TargetingPackFormat"); 1222public string RuntimePackRuntimeIdentifiers => _item.GetMetadata(MetadataKeys.RuntimePackRuntimeIdentifiers); 1229public string Profile => _item.GetMetadata("Profile"); 1246TargetFramework = NuGetFramework.Parse(item.GetMetadata("TargetFramework")); 1247string runtimePackLabels = item.GetMetadata(MetadataKeys.RuntimePackLabels); 1262public string LatestRuntimeFrameworkVersion => _item.GetMetadata("LatestRuntimeFrameworkVersion"); 1264public string RuntimePackNamePatterns => _item.GetMetadata("RuntimePackNamePatterns"); 1266public string RuntimePackRuntimeIdentifiers => _item.GetMetadata(MetadataKeys.RuntimePackRuntimeIdentifiers); 1268public string RuntimePackExcludedRuntimeIdentifiers => _item.GetMetadata(MetadataKeys.RuntimePackExcludedRuntimeIdentifiers); 1270public string IsTrimmable => _item.GetMetadata(MetadataKeys.IsTrimmable);
ProduceContentAssets.cs (10)
136preprocessorValues[preprocessorValueItem.ItemSpec] = preprocessorValueItem.GetMetadata("Value"); 150.GroupBy(t => t.GetMetadata(MetadataKeys.NuGetPackageId)); 163if (grouping.Any(t => t.GetMetadata(MetadataKeys.CodeLanguage) == projectLanguage)) 183if (contentFile.GetMetadata(MetadataKeys.CodeLanguage) == codeLanguageToSelect) 192!string.IsNullOrEmpty(contentFile.GetMetadata(MetadataKeys.PPOutputPath)); 198string ppOutputPath = contentFile.GetMetadata(MetadataKeys.PPOutputPath); 199string packageName = contentFile.GetMetadata(MetadataKeys.NuGetPackageId); 200string packageVersion = contentFile.GetMetadata(MetadataKeys.NuGetPackageVersion); 219string outputPath = contentFile.GetMetadata(MetadataKeys.OutputPath); 238string buildAction = contentFile.GetMetadata(MetadataKeys.BuildAction);
ProjectContext.cs (1)
25Version = item.GetMetadata(MetadataKeys.Version);
ReferenceInfo.cs (7)
77string projectFilePath = referencePath.GetMetadata(MetadataKeys.MSBuildSourceProjectFile); 138string originalItemSpec = referenceSatellitePath.GetMetadata("OriginalItemSpec"); 160var packageName = referencePath.GetMetadata(MetadataKeys.NuGetPackageId); 162var packageVersion = referencePath.GetMetadata(MetadataKeys.NuGetPackageVersion); 164var pathInPackage = referencePath.GetMetadata(MetadataKeys.PathInPackage); 172string version = referencePath.GetMetadata("Version"); 176string fusionName = referencePath.GetMetadata("FusionName");
RemoveDuplicatePackageReferences.cs (1)
40var pkgVersion = NuGetVersion.Parse(pkg.GetMetadata("Version"));
ResolveAppHosts.cs (6)
88var packTargetFramework = NuGetFramework.Parse(appHostPack.GetMetadata("TargetFramework")); 237string appHostRuntimeIdentifiers = selectedAppHostPack.GetMetadata("AppHostRuntimeIdentifiers"); 238string appHostPackPattern = selectedAppHostPack.GetMetadata("AppHostPackNamePattern"); 239string appHostPackVersion = selectedAppHostPack.GetMetadata("AppHostPackVersion"); 240string runtimeIdentifiersToExclude = selectedAppHostPack.GetMetadata(MetadataKeys.ExcludedRuntimeIdentifiers); 310selectedAppHostPack.GetMetadata("TargetFramework") ?? "",
ResolvedFile.cs (7)
61DestinationSubDirectory = item.GetMetadata(MetadataKeys.DestinationSubDirectory); 62string assetType = item.GetMetadata(MetadataKeys.AssetType); 85PackageName = item.GetMetadata(MetadataKeys.NuGetPackageId); 87PackageVersion = item.GetMetadata(MetadataKeys.NuGetPackageVersion); 89PathInPackage = item.GetMetadata(MetadataKeys.PathInPackage); 91RuntimeIdentifier = item.GetMetadata(MetadataKeys.RuntimeIdentifier); 92Culture = item.GetMetadata(MetadataKeys.Culture);
ResolveFrameworkReferences.cs (9)
30var resolvedRuntimePacks = ResolvedRuntimePacks.ToDictionary(rp => rp.GetMetadata(MetadataKeys.FrameworkName), StringComparer.OrdinalIgnoreCase); 45resolvedFrameworkReference.SetMetadata(MetadataKeys.IsImplicitlyDefined, frameworkReference.GetMetadata(MetadataKeys.IsImplicitlyDefined)); 47resolvedFrameworkReference.SetMetadata("TargetingPackPath", targetingPack.GetMetadata(MetadataKeys.Path)); 48resolvedFrameworkReference.SetMetadata("TargetingPackName", targetingPack.GetMetadata(MetadataKeys.NuGetPackageId)); 49resolvedFrameworkReference.SetMetadata("TargetingPackVersion", targetingPack.GetMetadata(MetadataKeys.NuGetPackageVersion)); 50resolvedFrameworkReference.SetMetadata("Profile", targetingPack.GetMetadata("Profile")); 55resolvedFrameworkReference.SetMetadata("RuntimePackPath", runtimePack.GetMetadata(MetadataKeys.PackageDirectory)); 56resolvedFrameworkReference.SetMetadata("RuntimePackName", runtimePack.GetMetadata(MetadataKeys.NuGetPackageId)); 57resolvedFrameworkReference.SetMetadata("RuntimePackVersion", runtimePack.GetMetadata(MetadataKeys.NuGetPackageVersion));
ResolvePackageAssets.cs (6)
416level: GetMessageLevel(item.GetMetadata(MetadataKeys.Severity)), 417code: item.GetMetadata(MetadataKeys.DiagnosticCode), 455writer.Write(packageReference.GetMetadata(MetadataKeys.Version)); 456writer.Write(packageReference.GetMetadata(MetadataKeys.Publish)); 464writer.Write(implicitPackage.GetMetadata(MetadataKeys.Version) ?? ""); 1319var expectedVersion = implicitPackage.GetMetadata(MetadataKeys.Version);
ResolveReadyToRunCompilers.cs (7)
55_targetRuntimeIdentifier = _runtimePack?.GetMetadata(MetadataKeys.RuntimeIdentifier); 94_crossgenTool.PackagePath = _runtimePack?.GetMetadata(MetadataKeys.PackageDirectory); 126string supportedRuntimeIdentifiers = targetingPack?.GetMetadata(MetadataKeys.RuntimePackRuntimeIdentifiers); 144_hostRuntimeIdentifier = crossgen2Pack?.GetMetadata(MetadataKeys.RuntimeIdentifier); 151_crossgen2Tool.PackagePath = crossgen2Pack.GetMetadata(MetadataKeys.PackageDirectory); 154!NuGetVersion.TryParse(crossgen2Pack.GetMetadata(MetadataKeys.NuGetPackageVersion), out NuGetVersion crossgen2PackVersion)) 242pack => pack.GetMetadata(metadataKey)
ResolveRuntimePackAssets.cs (13)
42fxReference.ItemSpec.Equals(rtFx.GetMetadata(MetadataKeys.FrameworkName), StringComparison.OrdinalIgnoreCase))) 54unavailableRuntimePack.GetMetadata(MetadataKeys.RuntimeIdentifier)); 62if (!frameworkReferenceNames.Contains(runtimePack.GetMetadata(MetadataKeys.FrameworkName))) 64var additionalFrameworkReferences = runtimePack.GetMetadata(MetadataKeys.AdditionalFrameworkReferences); 79.Where(matchingRTReference => runtimePack.GetMetadata("FrameworkName").Equals(matchingRTReference.ItemSpec)) 80.Select(matchingRTReference => matchingRTReference.GetMetadata("Profile")).ToHashSet() ?? []; 84if (runtimePack.GetMetadata(MetadataKeys.FrameworkName) == "Microsoft.Windows.SDK.NET.Ref") 114string runtimePackRoot = runtimePack.GetMetadata(MetadataKeys.PackageDirectory); 131runtimePack.GetMetadata(MetadataKeys.RuntimeIdentifier)); 260string runtimeIdentifier = runtimePack.GetMetadata(MetadataKeys.RuntimeIdentifier); 279assetItem.SetMetadata(MetadataKeys.NuGetPackageId, runtimePack.GetMetadata(MetadataKeys.NuGetPackageId)); 280assetItem.SetMetadata(MetadataKeys.NuGetPackageVersion, runtimePack.GetMetadata(MetadataKeys.NuGetPackageVersion)); 282assetItem.SetMetadata(MetadataKeys.IsTrimmable, runtimePack.GetMetadata(MetadataKeys.IsTrimmable));
ResolveTargetingPackAssets.cs (11)
449targetingPack.GetMetadata(MetadataKeys.NuGetPackageId), 450targetingPack.GetMetadata(MetadataKeys.NuGetPackageVersion)); 493item.GetMetadata(MetadataKeys.Path), 494item.GetMetadata("TargetingPackFormat"), 495item.GetMetadata("TargetFramework"), 496item.GetMetadata("Profile"), 497item.GetMetadata(MetadataKeys.NuGetPackageId), 498item.GetMetadata(MetadataKeys.NuGetPackageVersion), 499item.GetMetadata(MetadataKeys.PackageConflictPreferredPackages))) 501RuntimeFrameworks = runtimeFrameworks.Select(item => new RuntimeFramework(item.ItemSpec, item.GetMetadata(MetadataKeys.FrameworkName), item)).ToArray(); 628return $"{nameof(RuntimeFramework)}: {Name} ({FrameworkName} {Item?.GetMetadata(MetadataKeys.Version)})";
ResourceAssemblyInfo.cs (1)
23string destinationSubDirectory = referenceSatellitePath.GetMetadata("DestinationSubDirectory");
RunReadyToRunCompiler.cs (18)
41private string DotNetHostPath => Crossgen2Tool?.GetMetadata(MetadataKeys.DotNetHostPath); 47string version5 = Crossgen2Tool?.GetMetadata(MetadataKeys.IsVersion5); 71private string DiaSymReader => CrossgenTool.GetMetadata(MetadataKeys.DiaSymReader); 80string emitSymbolsMetadata = CompilationEntry.GetMetadata(MetadataKeys.EmitSymbols); 82_createPDBCommand = CompilationEntry.GetMetadata(MetadataKeys.CreatePDBCommand); 83string createCompositeImageMetadata = CompilationEntry.GetMetadata(MetadataKeys.CreateCompositeImage); 113string jitPath = Crossgen2Tool.GetMetadata(MetadataKeys.JitPath); 131if (string.IsNullOrEmpty(Crossgen2Tool.GetMetadata(MetadataKeys.TargetOS))) 136if (string.IsNullOrEmpty(Crossgen2Tool.GetMetadata(MetadataKeys.TargetArch))) 155if (!File.Exists(CrossgenTool.GetMetadata(MetadataKeys.JitPath))) 162_outputPDBImage = CompilationEntry.GetMetadata(MetadataKeys.OutputPDBImage); 188_outputR2RImage = CompilationEntry.GetMetadata(MetadataKeys.OutputR2RImage); 290result.AppendLine($"/JITPath \"{CrossgenTool.GetMetadata(MetadataKeys.JitPath)}\""); 303string jitPath = Crossgen2Tool.GetMetadata(MetadataKeys.JitPath); 310result.AppendLine($"--targetos:{Crossgen2Tool.GetMetadata(MetadataKeys.TargetOS)}"); 311result.AppendLine($"--targetarch:{Crossgen2Tool.GetMetadata(MetadataKeys.TargetArch)}"); 319if (Crossgen2Tool.GetMetadata(MetadataKeys.TargetOS) == "windows") 329string perfmapFormatVersion = Crossgen2Tool.GetMetadata(MetadataKeys.PerfmapFormatVersion);
RuntimePackAssetInfo.cs (6)
29DestinationSubPath = item.GetMetadata(MetadataKeys.DestinationSubPath) 32string assetTypeString = item.GetMetadata(MetadataKeys.AssetType); 51throw new InvalidOperationException("Unexpected asset type: " + item.GetMetadata(MetadataKeys.AssetType)); 54assetInfo.PackageName = item.GetMetadata(MetadataKeys.NuGetPackageId); 55assetInfo.PackageVersion = item.GetMetadata(MetadataKeys.NuGetPackageVersion); 56assetInfo.PackageRuntimeIdentifier = item.GetMetadata(MetadataKeys.RuntimeIdentifier);
SelectRuntimeIdentifierSpecificItems.cs (1)
61string? itemRuntimeIdentifier = item.GetMetadata(ridMetadata);
SingleProjectInfo.cs (5)
61string culture = satelliteAssembly.GetMetadata(MetadataKeys.Culture); 62string relativePath = satelliteAssembly.GetMetadata(MetadataKeys.TargetPath); 83string sourceProjectFile = projectReferencePath.GetMetadata(MetadataKeys.MSBuildSourceProjectFile); 104string sourceProjectFile = projectReferenceSatellitePath.GetMetadata(MetadataKeys.MSBuildSourceProjectFile); 114string originalItemSpec = projectReferenceSatellitePath.GetMetadata(MetadataKeys.OriginalItemSpec);
TypeLibraryDictionaryBuilder.cs (2)
24string idMetadata = typeLibraries[0].GetMetadata("Id"); 40string idMetadata = typeLibrary.GetMetadata("Id");
ValidateExecutableReferences.cs (4)
32string nearestTargetFramework = project.GetMetadata("NearestTargetFramework"); 41var additionalPropertiesXml = XElement.Parse(project.GetMetadata("AdditionalPropertiesFromProject")); 60var targetFrameworkMonikerIndex = Array.FindIndex(project.GetMetadata("TargetFrameworks").Split(';'), targetFramework => targetFramework == nearestTargetFramework); 63var targetFrameworkMonikers = project.GetMetadata("TargetFrameworkMonikers").Split(';');
Microsoft.NET.Build.Tasks.UnitTests (131)
GetPublishItemsOutputGroupOutputsTests.cs (14)
49task.PublishItemsOutputGroupOutputs[0].GetMetadata("RelativePath").Should().Be("WindowsDesktopSdkTest_without_ProjectSdk_set.exe"); 50task.PublishItemsOutputGroupOutputs[0].GetMetadata("OutputGroup").Should().Be("PublishItemsOutputGroup"); 51task.PublishItemsOutputGroupOutputs[0].GetMetadata("IsKeyOutput").Should().Be("True"); 52task.PublishItemsOutputGroupOutputs[0].GetMetadata("OutputPath").Should().Be(@"bin\Debug\net5.0\publish\WindowsDesktopSdkTest_without_ProjectSdk_set.exe"); 53task.PublishItemsOutputGroupOutputs[0].GetMetadata("CopyToPublishDirectory").Should().Be("Always", "should keep all existing metadata"); 54task.PublishItemsOutputGroupOutputs[0].GetMetadata("TargetPath").Should().Be("WindowsDesktopSdkTest_without_ProjectSdk_set.exe"); 56task.PublishItemsOutputGroupOutputs[1].GetMetadata("RelativePath").Should().Be("WindowsDesktopSdkTest_without_ProjectSdk_set.dll"); 57task.PublishItemsOutputGroupOutputs[1].GetMetadata("OutputGroup").Should().Be("PublishItemsOutputGroup"); 58task.PublishItemsOutputGroupOutputs[1].GetMetadata("CopyToPublishDirectory").Should().Be("Always"); 59task.PublishItemsOutputGroupOutputs[1].GetMetadata("TargetPath").Should().Be(@"WindowsDesktopSdkTest_without_ProjectSdk_set.dll"); 62task.PublishItemsOutputGroupOutputs[2].GetMetadata("RelativePath").Should().Be("WindowsDesktopSdkTest_without_ProjectSdk_set.dll"); 63task.PublishItemsOutputGroupOutputs[2].GetMetadata("OutputGroup").Should().Be("PublishItemsOutputGroup"); 64task.PublishItemsOutputGroupOutputs[2].GetMetadata("CopyToPublishDirectory").Should().Be("Always"); 65task.PublishItemsOutputGroupOutputs[2].GetMetadata("TargetPath").Should().Be(@"WindowsDesktopSdkTest_without_ProjectSdk_set.dll");
GivenAProduceContentsAssetsTask.cs (24)
176item.GetMetadata("TargetPath").Should().Be("samplepp.output.txt"); 177item.GetMetadata(MetadataKeys.NuGetPackageId).Should().Be("LibA"); 178item.GetMetadata(MetadataKeys.NuGetPackageVersion).Should().Be("1.2.3"); 183item.GetMetadata("TargetPath").Should().Be(Path.Combine("output", contentFiles[i])); 184item.GetMetadata(MetadataKeys.NuGetPackageId).Should().Be("LibA"); 185item.GetMetadata(MetadataKeys.NuGetPackageVersion).Should().Be("1.2.3"); 252item.GetMetadata("ProcessedItemType").Should().Be("Content"); 253item.GetMetadata(MetadataKeys.NuGetPackageId).Should().Be(packageId); 254item.GetMetadata(MetadataKeys.NuGetPackageVersion).Should().Be(packageVersion); 257item.GetMetadata("ProcessedItemType").Should().Be("EmbeddedResource"); 258item.GetMetadata(MetadataKeys.NuGetPackageId).Should().Be(packageId); 259item.GetMetadata(MetadataKeys.NuGetPackageVersion).Should().Be(packageVersion); 262item.GetMetadata("ProcessedItemType").Should().Be("Content"); 263item.GetMetadata(MetadataKeys.NuGetPackageId).Should().Be(packageId); 264item.GetMetadata(MetadataKeys.NuGetPackageVersion).Should().Be(packageVersion); 384contentItems.All(t => t.GetMetadata("ProcessedItemType") == "Content").Should().BeTrue(); 385contentItems.All(t => t.GetMetadata(MetadataKeys.NuGetPackageId) == packageId).Should().BeTrue(); 386contentItems.All(t => t.GetMetadata(MetadataKeys.NuGetPackageVersion) == packageVersion).Should().BeTrue(); 428contentItems.First().GetMetadata("ProcessedItemType").Should().Be("Content"); 429contentItems.First().GetMetadata(MetadataKeys.NuGetPackageId).Should().Be(packageId); 430contentItems.First().GetMetadata(MetadataKeys.NuGetPackageVersion).Should().Be(packageVersion); 477item.GetMetadata("ProcessedItemType").Should().Be("Content"); 478item.GetMetadata(MetadataKeys.NuGetPackageId).Should().Be(packageId); 479item.GetMetadata(MetadataKeys.NuGetPackageVersion).Should().Be(packageVersion);
GivenARemoveDuplicatePackageReferences.cs (1)
51var pkgVersion = NuGetVersion.Parse(item.GetMetadata("Version"));
GivenAResolvePackageDependenciesTask.cs (67)
59(items) => items.All(x => !string.IsNullOrEmpty(x.GetMetadata(MetadataKeys.Type))); 79(items) => items.All(x => validTargets.Contains(x.GetMetadata(MetadataKeys.ParentTarget))); 83x => validPackages.Contains(x.GetMetadata(MetadataKeys.ParentPackage)) 84|| string.IsNullOrEmpty(x.GetMetadata(MetadataKeys.ParentPackage))); 105.Where(t => string.IsNullOrEmpty(t.GetMetadata(MetadataKeys.ParentPackage))) 134.Where(t => string.IsNullOrEmpty(t.GetMetadata(MetadataKeys.ParentPackage))); 138topLevels.Select(t => t.GetMetadata(MetadataKeys.ParentTarget)) 183defs["LibA/1.2.3"].Single().GetMetadata(MetadataKeys.DiagnosticLevel).Should().Be("Error"); 184defs["LibB/1.2.3"].Single().GetMetadata(MetadataKeys.DiagnosticLevel).Should().Be("Warning"); 185defs["LibC/1.2.3"].Single().GetMetadata(MetadataKeys.DiagnosticLevel).Should().BeEmpty(); 215.Where(t => string.IsNullOrEmpty(t.GetMetadata(MetadataKeys.ParentPackage))); 220.Select(t => t.GetMetadata(MetadataKeys.ParentTarget)) 227.Select(t => t.GetMetadata(MetadataKeys.ParentTarget)) 250target.GetMetadata(MetadataKeys.RuntimeIdentifier).Should().BeEmpty(); 251target.GetMetadata(MetadataKeys.TargetFrameworkMoniker).Should().Be(".NETCoreApp,Version=v1.0"); 252target.GetMetadata(MetadataKeys.FrameworkName).Should().Be(".NETCoreApp"); 253target.GetMetadata(MetadataKeys.FrameworkVersion).Should().Be("1.0.0.0"); 254target.GetMetadata(MetadataKeys.Type).Should().Be("target"); 257target.GetMetadata(MetadataKeys.RuntimeIdentifier).Should().Be("osx.10.11-x64"); 258target.GetMetadata(MetadataKeys.TargetFrameworkMoniker).Should().Be(".NETCoreApp,Version=v1.0"); 259target.GetMetadata(MetadataKeys.FrameworkName).Should().Be(".NETCoreApp"); 260target.GetMetadata(MetadataKeys.FrameworkVersion).Should().Be("1.0.0.0"); 261target.GetMetadata(MetadataKeys.Type).Should().Be("target"); 292string name = package.GetMetadata(MetadataKeys.Name); 294package.GetMetadata(MetadataKeys.Version).Should().Be("1.2.3"); 298package.GetMetadata(MetadataKeys.Type).Should().Be("project"); 299package.GetMetadata(MetadataKeys.Path).Should().Be($"../ClassLibP/project.json"); 303package.GetMetadata(MetadataKeys.ResolvedPath).Should().Be(resolvedPath); 307package.GetMetadata(MetadataKeys.Type).Should().Be("package"); 308package.GetMetadata(MetadataKeys.Path).Should().Be($"{name}/1.2.3"); 309package.GetMetadata(MetadataKeys.ResolvedPath).Should().Be(Path.Combine(_packageRoot, name, "1.2.3", "path")); 340packageDep.GetMetadata(MetadataKeys.ParentPackage).Should().BeEmpty(); 341packageDep.GetMetadata(MetadataKeys.ParentTarget).Should().Be("netcoreapp1.0"); 344packageDep.GetMetadata(MetadataKeys.ParentPackage).Should().Be("LibA/1.2.3"); 345packageDep.GetMetadata(MetadataKeys.ParentTarget).Should().Be("netcoreapp1.0"); 350packageDeps.Select(t => t.GetMetadata(MetadataKeys.ParentPackage)) 352packageDeps.Select(t => t.GetMetadata(MetadataKeys.ParentTarget)) 393fileDefns.First().GetMetadata(MetadataKeys.Type).Should().Be(pair.Value); 394fileDefns.First().GetMetadata(MetadataKeys.Path).Should().Be(pair.Key); 395fileDefns.First().GetMetadata(MetadataKeys.NuGetPackageId).Should().Be("LibB"); 396fileDefns.First().GetMetadata(MetadataKeys.NuGetPackageVersion).Should().Be("1.2.3"); 397fileDefns.First().GetMetadata(MetadataKeys.ResolvedPath) 449fileDeps.Select(t => t.GetMetadata(MetadataKeys.FileGroup)) 451fileDeps.Select(t => t.GetMetadata(MetadataKeys.ParentPackage)) 453fileDeps.Select(t => t.GetMetadata(MetadataKeys.ParentTarget)) 481fileDeps.First().GetMetadata("locale").Should().Be("de"); 487fileDeps.First().GetMetadata("assetType").Should().Be("native"); 488fileDeps.First().GetMetadata("rid").Should().Be("osx"); 494fileDeps.First().GetMetadata("buildAction").Should().Be("EmbeddedResource"); 495fileDeps.First().GetMetadata("codeLanguage").Should().Be("any"); 496fileDeps.First().GetMetadata("copyToOutput").Should().Be("false"); 523.Any(t => t.GetMetadata(MetadataKeys.Path) == "lib/file/Z.dll") 527.Any(t => t.GetMetadata(MetadataKeys.Path) == "lib/file/_._") 577.Where(t => t.GetMetadata(MetadataKeys.Type) == "AnalyzerAssembly"); 593item.GetMetadata(MetadataKeys.Type).Should().Be("AnalyzerAssembly"); 594item.GetMetadata(MetadataKeys.Path).Should().Be(analyzer); 601fileDeps.Select(f => f.GetMetadata(MetadataKeys.ParentTarget)) 604fileDeps.All(f => f.GetMetadata(MetadataKeys.ParentPackage) == "LibC/1.2.3"); 661.Where(t => t.GetMetadata(MetadataKeys.Type) == "AnalyzerAssembly"); 673item.GetMetadata(MetadataKeys.Type).Should().Be("AnalyzerAssembly"); 674item.GetMetadata(MetadataKeys.Path).Should().Be(analyzer); 681fileDeps.Select(f => f.GetMetadata(MetadataKeys.ParentTarget)) 684fileDeps.All(f => f.GetMetadata(MetadataKeys.ParentPackage) == "LibC/1.2.3"); 691item.GetMetadata(MetadataKeys.Type).Should().NotBe("AnalyzerAssembly"); 733chiDeps.Where(t => t.GetMetadata(MetadataKeys.ParentTarget) == "netcoreapp1.0") 737chiDeps.Where(t => t.GetMetadata(MetadataKeys.ParentTarget) == "netcoreapp1.0/osx.10.11-x64") 800.Where(t => t.GetMetadata(MetadataKeys.TransitiveProjectReference) == "true");
GivenAResolveTargetingPackAssetsTask.cs (6)
33reference.GetMetadata("AssemblyName").Should().Be("Microsoft.Windows.SDK.NET"); 34reference.GetMetadata("AssemblyVersion").Should().Be("10.0.18362.3"); 35reference.GetMetadata("FileVersion").Should().Be("10.0.18362.3"); 36reference.GetMetadata("PublicKeyToken").Should().Be("null"); 37reference.GetMetadata("FrameworkReferenceName").Should().Be("Microsoft.Windows.SDK.NET.Ref"); 38reference.GetMetadata("FrameworkReferenceVersion").Should().Be("5.0.0-preview1");
GivenThatWeWantToGetDependenciesViaDesignTimeBuild.cs (6)
76Assert.Equal("False", item1.GetMetadata(MetadataKeys.IsImplicitlyDefined)); 80Assert.Equal("True", item2.GetMetadata(MetadataKeys.IsImplicitlyDefined)); 84Assert.Equal("True", item3.GetMetadata(MetadataKeys.IsImplicitlyDefined)); 377Assert.Equal("Error", item1.GetMetadata("DiagnosticLevel")); 381Assert.Equal(string.Empty, item2.GetMetadata("DiagnosticLevel")); 385Assert.Equal("Warning", item3.GetMetadata("DiagnosticLevel"));
GivenUnresolvedSDKProjectItemsAndImplicitPackages.cs (3)
105input.GetMetadata(metadata.ToString()).Should().Be(output.GetMetadata(metadata.ToString())); 110output.GetMetadata(MetadataKeys.IsImplicitlyDefined).Should().Be("True");
ProcessFrameworkReferencesTests.cs (10)
241task.RuntimeFrameworks[0].GetMetadata(MetadataKeys.Version).Should().Be("1.9.5"); 303targetingPack.GetMetadata(MetadataKeys.NuGetPackageId).Should().Be("Microsoft.Windows.SDK.NET.Ref"); 304targetingPack.GetMetadata(MetadataKeys.NuGetPackageVersion).Should().Be("10.0.18362.1-preview"); 310runtimePack.GetMetadata(MetadataKeys.RuntimePackAlwaysCopyLocal).Should().Be("true"); 377task.TargetingPacks.Should().Contain(p => p.GetMetadata(MetadataKeys.NuGetPackageId) == "Microsoft.Windows.SDK.NET.Ref"); 378task.TargetingPacks.Should().Contain(p => p.GetMetadata(MetadataKeys.NuGetPackageId) == "Microsoft.NETCore.App.Ref"); 534task.TargetingPacks.Should().Contain(p => p.GetMetadata(MetadataKeys.NuGetPackageId) == "Microsoft.NETCore.App.Ref"); 535task.TargetingPacks.Should().Contain(p => p.GetMetadata(MetadataKeys.NuGetPackageId) == "Microsoft.macOS.Ref.net10.0_15.5"); 657task.TargetingPacks.Should().Contain(p => p.GetMetadata(MetadataKeys.NuGetPackageId) == "Microsoft.NETCore.App.Ref"); 658task.TargetingPacks.Should().Contain(p => p.GetMetadata(MetadataKeys.NuGetPackageId) == "Microsoft.iOS.Ref");
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (23)
BlazorWriteSatelliteAssemblyFile.cs (2)
36new XAttribute("Culture", item.GetMetadata("Culture")), 37new XAttribute("DestinationSubDirectory", item.GetMetadata("DestinationSubDirectory"))));
BrotliCompress.cs (2)
85var inputFullPath = file.GetMetadata("FullPath"); 86var relativePath = file.GetMetadata("RelativePath");
CreateBlazorTrimmerRootDescriptorFile.cs (3)
46var assemblyName = assembly.GetMetadata("FileName"); 47var typePreserved = assembly.GetMetadata("Preserve"); 48var typeRequired = assembly.GetMetadata("Required");
GenerateBlazorWebAssemblyBootJson50.cs (5)
97var fileName = resource.GetMetadata("FileName"); 98var extension = resource.GetMetadata("Extension"); 99var resourceCulture = resource.GetMetadata("Culture"); 100var assetType = resource.GetMetadata("AssetType"); 147resourceList.Add(resourceName, $"sha256-{resource.GetMetadata("FileHash")}");
GenerateServiceWorkerAssetsManifest.cs (2)
40var hash = item.GetMetadata("FileHash"); 41var url = item.GetMetadata("AssetUrl");
GZipCompress.cs (2)
32var inputFullPath = file.GetMetadata("FullPath"); 33var relativePath = file.GetMetadata("RelativePath");
StaticWebAsset.cs (7)
80private string GetOriginalItemMetadata(string name) => _originalItem?.GetMetadata(name); 484result.OriginalItemSpec = string.IsNullOrEmpty(result.OriginalItemSpec) ? item.GetMetadata("FullPath") : result.OriginalItemSpec; 819var relativePath = asset.GetMetadata("RelativePath"); 826var targetPath = asset.GetMetadata("TargetPath"); 833var linkPath = asset.GetMetadata("Link"); 1050string.Equals(asset.GetMetadata(nameof(SourceId)), source, StringComparison.Ordinal); 1301var candidateKind = candidate.GetMetadata(nameof(AssetKind));
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (4)
BlazorReadSatelliteAssemblyFileTest.cs (4)
51assembly.GetMetadata("Culture") == "fr" && 52assembly.GetMetadata("DestinationSubDirectory") == "fr\\" 57assembly.GetMetadata("Culture") == "ja-jp" && 58assembly.GetMetadata("DestinationSubDirectory") == "ja-jp\\"
Microsoft.NET.Sdk.Publish.Tasks (69)
AppSettingsTransform.cs (1)
50string Value = destinationConnectionString.GetMetadata("Value");
MsDeploy\CommonUtility.cs (30)
604string data = item.GetMetadata(enumName); 830string objectName = item.GetMetadata(ReplaceRuleMetadata.ObjectName.ToString()); 831string matchRegularExpression = item.GetMetadata(ReplaceRuleMetadata.Match.ToString()); 832string replaceWith = item.GetMetadata(ReplaceRuleMetadata.Replace.ToString()); 833string scopeAttributeName = item.GetMetadata(ReplaceRuleMetadata.ScopeAttributeName.ToString()); 834string scopeAttributeValue = item.GetMetadata(ReplaceRuleMetadata.ScopeAttributeValue.ToString()); 835string targetAttributeName = item.GetMetadata(ReplaceRuleMetadata.TargetAttributeName.ToString()); 921string element = item.GetMetadata(ExistingParameterValidationMetadata.Element.ToString()); 924string kind = item.GetMetadata(DeclareParameterMetadata.Kind.ToString()); 925string scope = item.GetMetadata(DeclareParameterMetadata.Scope.ToString()); 926string matchRegularExpression = item.GetMetadata(DeclareParameterMetadata.Match.ToString()); 927string description = item.GetMetadata(DeclareParameterMetadata.Description.ToString()); 928string defaultValue = item.GetMetadata(DeclareParameterMetadata.DefaultValue.ToString()); 929string tags = item.GetMetadata(DeclareParameterMetadata.Tags.ToString()); 967string validationString = item.GetMetadata(ExistingParameterValidationMetadata.ValidationString.ToString()); 1083string value = item.GetMetadata(SimpleSyncParameterMetadata.Value.ToString()); 1280string kind = item.GetMetadata(SyncParameterMetadata.Kind.ToString()); 1281string scope = item.GetMetadata(SyncParameterMetadata.Scope.ToString()); 1282string matchRegularExpression = item.GetMetadata(SyncParameterMetadata.Match.ToString()); 1283string value = item.GetMetadata(SyncParameterMetadata.Value.ToString()); 1284string description = item.GetMetadata(SyncParameterMetadata.Description.ToString()); 1285string defaultValue = item.GetMetadata(SyncParameterMetadata.DefaultValue.ToString()); 1286string tags = item.GetMetadata(SyncParameterMetadata.Tags.ToString()); 1287string element = item.GetMetadata(ExistingParameterValidationMetadata.Element.ToString()); 1290string validationString = item.GetMetadata(ExistingParameterValidationMetadata.ValidationString.ToString()); 1324string value = iTaskItem.GetMetadata(name); 1436bool fIsCurrentItemEmpty = string.IsNullOrEmpty(item.GetMetadata(PropertyName)); 1451string itemData = nextItem.GetMetadata(PropertyName); 1701string priority = iTaskItem.GetMetadata("Priority"); 1926return (string.Compare(item.GetMetadata(metadataName), metadataValue, fIgnoreCase) == 0);
MsDeploy\VSHostObject.cs (6)
26username = credentialItem.GetMetadata(VSMsDeployTaskHostObject.UserMetaDataName); 29password = credentialItem.GetMetadata(VSMsDeployTaskHostObject.PasswordMetaDataName); 46&& (item.GetMetadata(VSMsDeployTaskHostObject.SkipApplyMetadataName) == VSMsDeployTaskHostObject.SourceDeployObject || 47string.IsNullOrEmpty(item.GetMetadata(VSMsDeployTaskHostObject.SkipApplyMetadataName))) 54&& (item.GetMetadata(VSMsDeployTaskHostObject.SkipApplyMetadataName) == VSMsDeployTaskHostObject.DestinationDeployObject || 55string.IsNullOrEmpty(item.GetMetadata(VSMsDeployTaskHostObject.SkipApplyMetadataName)))
MsDeploy\VsMSDeployObject.cs (3)
256m_root = taskItem.GetMetadata("Path"); 273string value = taskItem.GetMetadata(name); 292string value = taskItem.GetMetadata(name);
Tasks\GenerateEFSQLScripts.cs (1)
60string connectionStringEscaped = ProjectCollection.Escape(dbContext.GetMetadata("Value"));
Tasks\MsDeploy\CreateManifestFile.cs (3)
62string path = item.GetMetadata("Path"); 65string additionProviderSetting = item.GetMetadata("AdditionalProviderSettings"); 71string value = item.GetMetadata(ps);
Tasks\MsDeploy\CreateParameterFile.cs (5)
124string value = item.GetMetadata(attributeName); 132string elementValue = item.GetMetadata(ExistingParameterValidationMetadata.Element.ToString()); 154identityValues[i] = item.GetMetadata(parameterIdentities[i]); 157string metadataValue = item.GetMetadata(parameterIdentities[i]); 254string value = item.GetMetadata("value");
Tasks\MsDeploy\ImportParameterFile.cs (1)
167string filePath = item.GetMetadata("FullPath");
Tasks\MsDeploy\MSDeploy.cs (13)
585path = taskItem.GetMetadata("Path"); 637string element = item.GetMetadata(ExistingParameterValidationMetadata.Element.ToString()); 645idenities.Add(item.GetMetadata(dPIdentity)); 766string element = item.GetMetadata(ExistingParameterValidationMetadata.Element.ToString()); 776identities.Add(item.GetMetadata(dPIdentity)); 791data = item.GetMetadata(ExistingSyncParameterMetadata.Value.ToString()); 832string path = taskItem.GetMetadata("Path"); 851string value = taskItem.GetMetadata(name); 864string value = taskItem.GetMetadata(name); 893string settingName = item.GetMetadata("Name"); 894string settingValue = item.GetMetadata("Value"); 937string userName = credentialItem.GetMetadata(VSMsDeployTaskHostObject.UserMetaDataName); 941destSettings.SetMetadata(VSMsDeployTaskHostObject.PasswordMetaDataName, credentialItem.GetMetadata(VSMsDeployTaskHostObject.PasswordMetaDataName));
Tasks\MsDeploy\VsMsdeploy.cs (6)
983where (string.IsNullOrEmpty(item.GetMetadata(VSMsDeployTaskHostObject.SkipApplyMetadataName)) || 984item.GetMetadata(VSMsDeployTaskHostObject.SkipApplyMetadataName) == VSMsDeployTaskHostObject.SourceDeployObject) 989where (string.IsNullOrEmpty(item.GetMetadata(VSMsDeployTaskHostObject.SkipApplyMetadataName)) || 990item.GetMetadata(VSMsDeployTaskHostObject.SkipApplyMetadataName) == VSMsDeployTaskHostObject.DestinationDeployObject) 1005string settingName = item.GetMetadata("Name"); 1006string settingValue = item.GetMetadata("Value");
Microsoft.NET.Sdk.Publish.Tasks.Tests (4)
AppSettingsTransformTests.cs (1)
110Assert.Equal(connectionStringValue.ToString(), eachValue.GetMetadata("Value"));
Tasks\TransformAppSettingsTests.cs (3)
62Assert.Equal(connectionStringValue.ToString(), eachValue.GetMetadata("Value")); 134Assert.Equal(connectionStringValue.ToString(), eachValue.GetMetadata("Value")); 183Assert.Equal(connectionStringValue.ToString(), eachValue.GetMetadata("Value"));
Microsoft.NET.Sdk.Razor.Tasks (17)
EncodeRazorInputItem.cs (1)
35var targetPath = Convert.ToBase64String(Encoding.UTF8.GetBytes(input.GetMetadata("TargetPath")));
FindAssembliesWithReferencesTo.cs (2)
29var fusionName = item.GetMetadata(FusionNameKey); 40IsFrameworkReference = item.GetMetadata("IsFrameworkReference") == "true",
SdkRazorGenerate.cs (10)
112builder.AppendLine(input.GetMetadata(FullPath)); 115builder.AppendLine(input.GetMetadata(TargetPath)); 118var outputPath = Path.Combine(ProjectRoot, input.GetMetadata(GeneratedOutput)); 124var kind = input.GetMetadata(DocumentKind); 142var cssScope = input.GetMetadata(CssScope); 146builder.AppendLine(input.GetMetadata(FullPath)); 163builder.AppendLine(Configuration[0].GetMetadata(Identity)); 194builder.AppendLine(Extensions[i].GetMetadata(Identity)); 197builder.AppendLine(Path.GetFullPath(Extensions[i].GetMetadata(AssemblyFilePath))); 205var value = item.GetMetadata(metadataName);
SdkRazorTagHelper.cs (4)
106builder.AppendLine(Configuration[0].GetMetadata(Identity)); 111builder.AppendLine(Extensions[i].GetMetadata(Identity)); 114builder.AppendLine(Path.GetFullPath(Extensions[i].GetMetadata(AssemblyFilePath))); 122var value = item.GetMetadata(metadataName);
Microsoft.NET.Sdk.StaticWebAssets.Tasks (213)
Data\ContentTypeMapping.cs (3)
23contentTypeMappings.GetMetadata(nameof(Cache)), 24contentTypeMappings.GetMetadata(nameof(Pattern)), 25int.Parse(contentTypeMappings.GetMetadata(nameof(Priority)), CultureInfo.InvariantCulture));
Data\ReferencedProjectConfiguration.cs (9)
101Identity = arg.GetMetadata("FullPath"), 102Version = int.Parse(arg.GetMetadata(nameof(Version)), CultureInfo.InvariantCulture), 103Source = arg.GetMetadata(nameof(Source)), 104GetBuildAssetsTargets = arg.GetMetadata(nameof(GetBuildAssetsTargets)), 105AdditionalBuildProperties = arg.GetMetadata(nameof(AdditionalBuildProperties)), 106AdditionalBuildPropertiesToRemove = arg.GetMetadata(nameof(AdditionalBuildPropertiesToRemove)), 107GetPublishAssetsTargets = arg.GetMetadata(nameof(GetPublishAssetsTargets)), 108AdditionalPublishProperties = arg.GetMetadata(nameof(AdditionalPublishProperties)), 109AdditionalPublishPropertiesToRemove = arg.GetMetadata(nameof(AdditionalPublishPropertiesToRemove))
Data\StaticWebAsset.cs (7)
80private string GetOriginalItemMetadata(string name) => _originalItem?.GetMetadata(name); 484result.OriginalItemSpec = string.IsNullOrEmpty(result.OriginalItemSpec) ? item.GetMetadata("FullPath") : result.OriginalItemSpec; 819var relativePath = asset.GetMetadata("RelativePath"); 826var targetPath = asset.GetMetadata("TargetPath"); 833var linkPath = asset.GetMetadata("Link"); 1050string.Equals(asset.GetMetadata(nameof(SourceId)), source, StringComparison.Ordinal); 1301var candidateKind = candidate.GetMetadata(nameof(AssetKind));
Data\StaticWebAssetEndpoint.cs (4)
52_assetFile ??= _originalItem?.GetMetadata(nameof(AssetFile)); 67_selectorsString ??= _originalItem?.GetMetadata(nameof(Selectors)); 94_responseHeadersString ??= _originalItem?.GetMetadata(nameof(ResponseHeaders)); 120_endpointPropertiesString ??= _originalItem?.GetMetadata(nameof(EndpointProperties));
Data\StaticWebAssetProjectConfiguration.cs (9)
27Version = taskItem.GetMetadata(nameof(Version)), 28Source = taskItem.GetMetadata(nameof(Source)), 29GetBuildAssetsTargets = taskItem.GetMetadata(nameof(GetBuildAssetsTargets)), 30AdditionalBuildProperties = taskItem.GetMetadata(nameof(AdditionalBuildProperties)), 31AdditionalBuildPropertiesToRemove = taskItem.GetMetadata(nameof(AdditionalBuildPropertiesToRemove)), 32GetPublishAssetsTargets = taskItem.GetMetadata(nameof(GetPublishAssetsTargets)), 33AdditionalPublishProperties = taskItem.GetMetadata(nameof(AdditionalPublishProperties)), 34AdditionalPublishPropertiesToRemove = taskItem.GetMetadata(nameof(AdditionalPublishPropertiesToRemove)), 35TargetFramework = taskItem.GetMetadata(nameof(TargetFramework))
Data\StaticWebAssetsDiscoveryPattern.cs (5)
61HasSourceId(pattern.GetMetadata(nameof(Source)), source); 73Source = pattern.GetMetadata(nameof(Source)), 74BasePath = pattern.GetMetadata(nameof(BasePath)), 75ContentRoot = pattern.GetMetadata(nameof(ContentRoot)), 76Pattern = pattern.GetMetadata(nameof(Pattern))
DefineStaticWebAssetEndpoints.cs (3)
79var assetFile = endpointCandidate.GetMetadata(nameof(StaticWebAssetEndpoint.AssetFile)); 232var length = CandidateAssets[i].GetMetadata(nameof(StaticWebAsset.FileLength)); 233var lastWriteTime = CandidateAssets[i].GetMetadata(nameof(StaticWebAsset.LastWriteTime));
DefineStaticWebAssets.Cache.cs (1)
126asset.AssetKind = item.GetMetadata(nameof(StaticWebAsset.AssetKind));
DefineStaticWebAssets.cs (34)
115var normalizedAssetPath = Path.GetFullPath(candidate.GetMetadata("FullPath")); 134if (matcher != null && string.IsNullOrEmpty(candidate.GetMetadata("RelativePath"))) 204PropertyOverrides == null || PropertyOverrides.Length == 0 ? candidate.ItemSpec : candidate.GetMetadata("OriginalItemSpec")); 216var identity = Path.GetFullPath(candidate.GetMetadata("FullPath")); 328var candidateFullPath = Path.GetFullPath(candidate.GetMetadata("FullPath")); 387var value = element.GetMetadata(metadataName); 411var relativePath = candidate.GetMetadata("RelativePath"); 419var targetPath = candidate.GetMetadata("TargetPath"); 427var linkPath = candidate.GetMetadata("Link"); 436var normalizedContentRoot = StaticWebAsset.NormalizeContentRootPath(string.IsNullOrEmpty(candidate.GetMetadata(nameof(StaticWebAsset.ContentRoot))) ? 438candidate.GetMetadata(nameof(StaticWebAsset.ContentRoot))); 440var normalizedAssetPath = Path.GetFullPath(candidate.GetMetadata("FullPath")); 481first.GetMetadata("FullPath"), 482first.GetMetadata(nameof(StaticWebAsset.AssetKind)), 483second.GetMetadata("FullPath"), 484second.GetMetadata(nameof(StaticWebAsset.AssetKind)), 492switch ((asset.GetMetadata(nameof(StaticWebAsset.CopyToPublishDirectory)), existingAsset.GetMetadata(nameof(StaticWebAsset.CopyToPublishDirectory)))) 502existingAsset.GetMetadata("FullPath"), 503existingAsset.GetMetadata(nameof(StaticWebAsset.AssetKind)), 504asset.GetMetadata("FullPath"), 505asset.GetMetadata(nameof(StaticWebAsset.AssetKind)), 516asset.GetMetadata("FullPath"), 517asset.GetMetadata(nameof(StaticWebAsset.AssetKind)), 518asset.GetMetadata(nameof(StaticWebAsset.CopyToPublishDirectory)), 523existingAsset.GetMetadata("FullPath"), 524existingAsset.GetMetadata(nameof(StaticWebAsset.AssetKind)), 525existingAsset.GetMetadata(nameof(StaticWebAsset.CopyToPublishDirectory)), 536asset.GetMetadata("FullPath"), 537asset.GetMetadata(nameof(StaticWebAsset.AssetKind)), 538asset.GetMetadata(nameof(StaticWebAsset.CopyToPublishDirectory)), 543existingAsset.GetMetadata("FullPath"), 544existingAsset.GetMetadata(nameof(StaticWebAsset.AssetKind)), 545existingAsset.GetMetadata(nameof(StaticWebAsset.CopyToPublishDirectory)),
DiscoverDefaultScopedCssItems.cs (2)
29var fullPath = candidate.GetMetadata("FullPath"); 30if (string.Equals(candidate.GetMetadata("Scoped"), "false", StringComparison.OrdinalIgnoreCase))
FilterStaticWebAssetEndpoints.cs (3)
174item.GetMetadata("Name"), 175item.GetMetadata("Value"), 176item.GetMetadata("Mode"));
FingerprintPatternMatcher.cs (5)
25p => p.GetMetadata("Pattern"), 26p => p.GetMetadata("Expression") is string expr and not "" ? expr : DefaultFingerprintExpression); 34builder.AddIncludePatterns(pattern.GetMetadata("Pattern")); 173public string Pattern { get; set; } = pattern.GetMetadata(nameof(Pattern)); 175public string Expression { get; set; } = pattern.GetMetadata(nameof(Expression));
GenerateStaticWebAssetsPropsFile.cs (20)
63var orderedAssets = StaticWebAssets.OrderBy(e => e.GetMetadata(BasePath), StringComparer.OrdinalIgnoreCase) 64.ThenBy(e => e.GetMetadata(RelativePath), StringComparer.OrdinalIgnoreCase); 74new XElement(SourceId, element.GetMetadata(SourceId)), 76new XElement(BasePath, element.GetMetadata(BasePath)), 78new XElement(AssetKind, element.GetMetadata(AssetKind)), 79new XElement(AssetMode, element.GetMetadata(AssetMode)), 80new XElement(AssetRole, element.GetMetadata(AssetRole)), 81new XElement(RelatedAsset, element.GetMetadata(RelatedAsset)), 82new XElement(AssetTraitName, element.GetMetadata(AssetTraitName)), 83new XElement(AssetTraitValue, element.GetMetadata(AssetTraitValue)), 84new XElement(Fingerprint, element.GetMetadata(Fingerprint)), 85new XElement(Integrity, element.GetMetadata(Integrity)), 86new XElement(CopyToOutputDirectory, element.GetMetadata(CopyToOutputDirectory)), 87new XElement(CopyToPublishDirectory, element.GetMetadata(CopyToPublishDirectory)), 88new XElement(FileLength, element.GetMetadata(FileLength)), 89new XElement(LastWriteTime, element.GetMetadata(LastWriteTime)), 189var candidateMetadata = candidate.GetMetadata(SourceType); 206var referenceMetadata = reference.GetMetadata(metadata); 207var candidateMetadata = candidate.GetMetadata(metadata); 219var value = item.GetMetadata(metadataName);
JSModules\ApplyJsModules.cs (3)
112var explicitRazorItem = jsModuleCandidate.GetMetadata(explicitMetadataName); 113var jsModuleCandidatePath = jsModuleCandidate.GetMetadata("RelativePath"); 130item.SetMetadata("JSModule", jsModuleCandidate.GetMetadata("JSModule"));
Legacy\GenerateStaticWebAssetsPropsFile50.cs (18)
57var orderedAssets = StaticWebAssets.OrderBy(e => e.GetMetadata(BasePath), StringComparer.OrdinalIgnoreCase) 58.ThenBy(e => e.GetMetadata(RelativePath), StringComparer.OrdinalIgnoreCase); 61var fullPathExpression = @$"$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\{Normalize(PackagePathPrefix)}\{Normalize(element.GetMetadata(RelativePath))}))"; 65new XElement(SourceId, element.GetMetadata(SourceId)), 67new XElement(BasePath, element.GetMetadata(BasePath)), 68new XElement(RelativePath, element.GetMetadata(RelativePath)), 69new XElement(AssetKind, element.GetMetadata(AssetKind)), 70new XElement(AssetMode, element.GetMetadata(AssetMode)), 71new XElement(AssetRole, element.GetMetadata(AssetRole)), 72new XElement(RelatedAsset, element.GetMetadata(RelatedAsset)), 73new XElement(AssetTraitName, element.GetMetadata(AssetTraitName)), 74new XElement(AssetTraitValue, element.GetMetadata(AssetTraitValue)), 75new XElement(CopyToOutputDirectory, element.GetMetadata(CopyToOutputDirectory)), 76new XElement(CopyToPublishDirectory, element.GetMetadata(CopyToPublishDirectory)), 176var candidateMetadata = candidate.GetMetadata(SourceType); 193var referenceMetadata = reference.GetMetadata(metadata); 194var candidateMetadata = candidate.GetMetadata(metadata); 206var value = item.GetMetadata(metadataName);
Legacy\GenerateV1StaticWebAssetsManifest.cs (3)
106var basePath = contentRootDefinition.GetMetadata(BasePath); 107var contentRoot = contentRootDefinition.GetMetadata(ContentRoot); 151var value = item.GetMetadata(metadataName);
Legacy\ValidateStaticWebAssetsUniquePaths.cs (4)
36contentRootDefinition.GetMetadata(BasePath), 37contentRootDefinition.GetMetadata(RelativePath)); 57var relativePath = webRootFile.GetMetadata(TargetPath); 74var value = item.GetMetadata(metadataName);
MergeConfigurationProperties.cs (24)
45["Version"] = configuration.GetMetadata(nameof(StaticWebAssetsManifest.ReferencedProjectConfiguration.Version)), 46["Source"] = configuration.GetMetadata(nameof(StaticWebAssetsManifest.ReferencedProjectConfiguration.Source)), 47["GetBuildAssetsTargets"] = configuration.GetMetadata(nameof(StaticWebAssetsManifest.ReferencedProjectConfiguration.GetBuildAssetsTargets)), 48["AdditionalBuildProperties"] = configuration.GetMetadata(nameof(StaticWebAssetsManifest.ReferencedProjectConfiguration.AdditionalBuildProperties)), 49["AdditionalBuildPropertiesToRemove"] = configuration.GetMetadata(nameof(StaticWebAssetsManifest.ReferencedProjectConfiguration.AdditionalBuildPropertiesToRemove)), 50["GetPublishAssetsTargets"] = configuration.GetMetadata(nameof(StaticWebAssetsManifest.ReferencedProjectConfiguration.GetPublishAssetsTargets)), 51["AdditionalPublishProperties"] = configuration.GetMetadata(nameof(StaticWebAssetsManifest.ReferencedProjectConfiguration.AdditionalPublishProperties)), 52["AdditionalPublishPropertiesToRemove"] = configuration.GetMetadata(nameof(StaticWebAssetsManifest.ReferencedProjectConfiguration.AdditionalPublishPropertiesToRemove)), 56";", configuration.GetMetadata("AdditionalBuildProperties"), 57foundProjectReference.GetMetadata("SetConfiguration"), 58foundProjectReference.GetMetadata("SetPlatform"), 59foundProjectReference.GetMetadata("SetTargetFramework")); 64";", configuration.GetMetadata("AdditionalBuildPropertiesToRemove"), 65foundProjectReference.GetMetadata("GlobalPropertiesToRemove"), 66foundProjectReference.GetMetadata("UndefineProperties")); 71";", configuration.GetMetadata("AdditionalPublishProperties"), 72foundProjectReference.GetMetadata("SetConfiguration"), 73foundProjectReference.GetMetadata("SetPlatform"), 74foundProjectReference.GetMetadata("SetTargetFramework")); 79";", configuration.GetMetadata("AdditionalPublishPropertiesToRemove"), 80foundProjectReference.GetMetadata("GlobalPropertiesToRemove"), 81foundProjectReference.GetMetadata("UndefineProperties")); 108var referenceMetadata = projectReference.GetMetadata("MSBuildSourceProjectFile"); 112var configurationFullPath = configuration.GetMetadata("FullPath");
OverrideHtmlAssetPlaceholders.cs (2)
95string outputPath = Path.Combine(OutputPath, FileHasher.HashString(item.ItemSpec) + item.GetMetadata("Extension")); 223resourceAsset.IsHardFingerprinted = asset.GetMetadata("RelativePath").Contains("#[.{fingerprint}]!");
ResolveStaticWebAssetsEffectiveTargetFramework.cs (2)
46public string TargetFrameworkIdentifier { get; set; } = item.GetMetadata("TargetFrameworkIdentifier"); 48public string TargetFrameworkVersion { get; set; } = item.GetMetadata("TargetFrameworkVersion");
ResolveStaticWebAssetsEmbeddedProjectConfiguration.cs (20)
85if (configurationsToRemove.GetMetadata("AdditionalProperties")? 88Log.LogMessage($"Removing configuration '{configurationsToRemove.GetMetadata("AdditonalProperties")}' because it is embedded."); 186Version = source.GetMetadata(nameof(Version)), 187Source = source.GetMetadata(nameof(Source)), 188GetEmbeddedBuildAssetsTargets = source.GetMetadata(nameof(GetEmbeddedBuildAssetsTargets)), 189AdditionalEmbeddedBuildProperties = source.GetMetadata(nameof(AdditionalEmbeddedBuildProperties)), 190AdditionalEmbeddedBuildPropertiesToRemove = source.GetMetadata(nameof(AdditionalEmbeddedBuildPropertiesToRemove)), 191GetEmbeddedPublishAssetsTargets = source.GetMetadata(nameof(GetEmbeddedPublishAssetsTargets)), 192AdditionalEmbeddedPublishProperties = source.GetMetadata(nameof(AdditionalEmbeddedPublishProperties)), 193AdditionalEmbeddedPublishPropertiesToRemove = source.GetMetadata(nameof(AdditionalEmbeddedPublishPropertiesToRemove)), 194TargetFramework = source.GetMetadata(nameof(TargetFramework)), 195TargetFrameworkIdentifier = source.GetMetadata(nameof(TargetFrameworkIdentifier)), 196TargetFrameworkVersion = source.GetMetadata(nameof(TargetFrameworkVersion)), 197Platform = source.GetMetadata(nameof(Platform)), 198PlatformVersion = source.GetMetadata(nameof(PlatformVersion)) 236TargetFramework = item.GetMetadata("TargetFramework"), 237Platform = item.GetMetadata("Platform"), 238PlatformVersion = item.GetMetadata("PlatformVersion"), 239TargetFrameworkIdentifier = item.GetMetadata("TargetFrameworkIdentifier"), 240TargetFrameworkVersion = item.GetMetadata("TargetFrameworkVersion"),
ScopedCss\ApplyCssScopes.cs (2)
124var explicitRazorItem = scopedCssCandidate.GetMetadata(explicitMetadataName); 136item.SetMetadata("CssScope", scopedCssCandidate.GetMetadata("CssScope"));
ScopedCss\ComputeCssScope.cs (1)
32var scope = input.GetMetadata("CssScope");
ScopedCss\ConcatenateCssFiles.cs (5)
18Comparer<ITaskItem>.Create((x, y) => StringComparer.OrdinalIgnoreCase.Compare(x.GetMetadata("FullPath"), y.GetMetadata("FullPath"))); 85builder.AppendLine(CultureInfo.InvariantCulture, $"/* {NormalizePath(current.GetMetadata("BasePath"))}/{NormalizePath(current.GetMetadata("RelativePath"))} */"); 87foreach (var line in File.ReadLines(current.GetMetadata("FullPath")))
ScopedCss\ConcatenateCssFiles50.cs (7)
18Comparer<ITaskItem>.Create((x, y) => StringComparer.OrdinalIgnoreCase.Compare(x.GetMetadata("FullPath"), y.GetMetadata("FullPath"))); 68var bundleBasePath = NormalizePath(bundle.GetMetadata("BasePath")); 69var relativePath = NormalizePath(bundle.GetMetadata("RelativePath")); 88builder.AppendLine(CultureInfo.InvariantCulture, $"/* {NormalizePath(current.GetMetadata("BasePath"))}/{NormalizePath(current.GetMetadata("RelativePath"))} */"); 90foreach (var line in File.ReadLines(current.GetMetadata("FullPath")))
ScopedCss\ResolveAllScopedCssAssets.cs (1)
29var path = swa.GetMetadata("RelativePath");
ScopedCss\RewriteCss.cs (3)
41var inputFile = input.GetMetadata("FullPath"); 42var outputFile = input.GetMetadata("OutputFile"); 43var cssScope = input.GetMetadata("CssScope");
ServiceWorker\GenerateServiceWorkerAssetsManifest.cs (1)
41var assets = Assets.Select(a => (StaticWebAsset.FromTaskItem(a), a.GetMetadata("AssetUrl"))).ToArray();
StaticWebAssetsGeneratePackManifest.cs (2)
51PackagePath = file.GetMetadata("PackagePath") 60PackagePath = asset.GetMetadata("TargetPath")
UpdateExternallyDefinedStaticWebAssets.cs (1)
117var pattern = fingerprintExpression.GetMetadata("Pattern");
UpdatePackageStaticWebAssets.cs (1)
30if (!StaticWebAsset.SourceTypes.IsPackage(candidate.GetMetadata(nameof(StaticWebAsset.SourceType))))
UpdateStaticWebAssetEndpoints.cs (5)
365item.GetMetadata("UpdateTarget"), 366item.GetMetadata("Name"), 367item.GetMetadata("Value"), 368item.GetMetadata("NewValue"), 369item.GetMetadata("Quality"));
Utils\AssetToCompress.cs (2)
15var relatedAssetOriginalItemSpec = assetToCompress.GetMetadata("RelatedAssetOriginalItemSpec"); 25var relatedAsset = assetToCompress.GetMetadata("RelatedAsset");
Utils\HashingUtils.cs (1)
42writer.Write(item.GetMetadata(properties[j]));
Microsoft.NET.Sdk.StaticWebAssets.Tests (245)
ComputeStaticWebAssetsTargetPathsTest.cs (3)
43asset.GetMetadata("TargetPath").Should().Be(Path.Combine("wwwroot", "candidate.1234asdf.js")); 71asset.GetMetadata("TargetPath").Should().Be(Path.Combine("wwwroot", "candidate.1234asdf.js")); 99asset.GetMetadata("TargetPath").Should().Be(Path.Combine("wwwroot", "candidate.js"));
StaticWebAssets\ApplyCssScopesTest.cs (10)
38taskInstance.RazorComponentsWithScopes.Should().ContainSingle(rcws => rcws.ItemSpec == "TestFiles/Pages/Index.razor" && rcws.GetMetadata("CssScope") == "index-scope"); 39taskInstance.RazorComponentsWithScopes.Should().ContainSingle(rcws => rcws.ItemSpec == "TestFiles/Pages/Counter.razor" && rcws.GetMetadata("CssScope") == "counter-scope"); 67taskInstance.RazorGenerateWithScopes.Should().ContainSingle(rcws => rcws.ItemSpec == "TestFiles/Pages/Index.cshtml" && rcws.GetMetadata("CssScope") == "index-scope"); 68taskInstance.RazorGenerateWithScopes.Should().ContainSingle(rcws => rcws.ItemSpec == "TestFiles/Pages/Counter.cshtml" && rcws.GetMetadata("CssScope") == "counter-scope"); 211taskInstance.RazorComponentsWithScopes.Should().ContainSingle(rcws => rcws.ItemSpec == "TestFiles/Pages/FetchData.razor" && rcws.GetMetadata("CssScope") == "fetchdata-scope"); 240taskInstance.RazorGenerateWithScopes.Should().ContainSingle(rcws => rcws.ItemSpec == "TestFiles/Pages/FetchData.cshtml" && rcws.GetMetadata("CssScope") == "fetchdata-scope"); 338taskInstance.RazorComponentsWithScopes.Should().ContainSingle(rcws => rcws.ItemSpec == "TestFiles/Pages/Index.razor" && rcws.GetMetadata("CssScope") == "index-scope"); 339taskInstance.RazorComponentsWithScopes.Should().ContainSingle(rcws => rcws.ItemSpec == "TestFiles/Pages/Counter.razor" && rcws.GetMetadata("CssScope") == "counter-scope"); 342taskInstance.RazorGenerateWithScopes.Should().ContainSingle(rcws => rcws.ItemSpec == "TestFiles/Pages/Home.cshtml" && rcws.GetMetadata("CssScope") == "home-scope"); 343taskInstance.RazorGenerateWithScopes.Should().ContainSingle(rcws => rcws.ItemSpec == "TestFiles/Pages/_Host.cshtml" && rcws.GetMetadata("CssScope") == "_host-scope");
StaticWebAssets\ComputeCssScopesTests.cs (9)
32taskInstance.ScopedCss.Select(s => s.GetMetadata("CssScope")).Should().OnlyContain(item => 35taskInstance.ScopedCss.Select(s => s.GetMetadata("CssScope")).Should().HaveCount(3).And.OnlyHaveUniqueItems(); 55var existing = taskInstance.ScopedCss.Select(s => s.GetMetadata("CssScope")).ToArray(); 61taskInstance.ScopedCss.Should().OnlyContain(newScoped => !existing.Contains(newScoped.GetMetadata("ScopedCss"))); 81var existing = taskInstance.ScopedCss.Select(s => s.GetMetadata("CssScope")).OrderBy(id => id).ToArray(); 86var computed = taskInstance.ScopedCss.Select(newScoped => newScoped.GetMetadata("CssScope")).OrderBy(id => id).ToArray(); 110taskInstance.ScopedCss[0].GetMetadata("CssScope").Should().NotBe(taskInstance.ScopedCss[1].GetMetadata("CssScope")); 130taskInstance.ScopedCss.Should().ContainSingle(scopedCss => scopedCss.GetMetadata("CssScope") == "b-predefined");
StaticWebAssets\ComputeEndpointsForReferenceStaticWebAssetsTest.cs (4)
37task.Endpoints[0].GetMetadata("AssetFile").Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js"))); 62task.Endpoints[0].GetMetadata("AssetFile").Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js"))); 63var properties = StaticWebAssetEndpointProperty.FromMetadataValue(task.Endpoints[0].GetMetadata("EndpointProperties")); 94task.Endpoints[0].GetMetadata("AssetFile").Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")));
StaticWebAssets\DiscoverPrecompressedAssetsTest.cs (17)
97asset.GetMetadata("RelatedAsset").Should().Be(uncompressedCandidate.Identity); 98asset.GetMetadata("OriginalItemSpec").Should().Be(uncompressedCandidate.Identity); 99asset.GetMetadata("RelativePath").Should().Be("js/site#[.{fingerprint=uncompressed}]?.js.gz"); 100asset.GetMetadata("AssetRole").Should().Be("Alternative"); 101asset.GetMetadata("AssetTraitName").Should().Be("Content-Encoding"); 102asset.GetMetadata("AssetTraitValue").Should().Be("gzip"); 103asset.GetMetadata("Fingerprint").Should().Be("compressed"); 104asset.GetMetadata("Integrity").Should().Be("compressed-integrity"); 105asset.GetMetadata("CopyToPublishDirectory").Should().Be("PreserveNewest"); 106asset.GetMetadata("CopyToOutputDirectory").Should().Be("Never"); 107asset.GetMetadata("AssetMergeSource").Should().Be(string.Empty); 108asset.GetMetadata("AssetMergeBehavior").Should().Be(string.Empty); 109asset.GetMetadata("AssetKind").Should().Be("All"); 110asset.GetMetadata("AssetMode").Should().Be("All"); 111asset.GetMetadata("SourceId").Should().Be("Test"); 112asset.GetMetadata("SourceType").Should().Be("Discovered"); 113asset.GetMetadata("ContentRoot").Should().Be(Path.Combine(Environment.CurrentDirectory, $"wwwroot{Path.DirectorySeparatorChar}"));
StaticWebAssets\DiscoverStaticWebAssetsTest.cs (117)
49asset.GetMetadata(nameof(StaticWebAsset.SourceId)).Should().Be("MyProject"); 50asset.GetMetadata(nameof(StaticWebAsset.SourceType)).Should().Be("Discovered"); 51asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be(Path.GetFullPath("wwwroot") + Path.DirectorySeparatorChar); 52asset.GetMetadata(nameof(StaticWebAsset.BasePath)).Should().Be("_content/Path"); 53asset.GetMetadata(nameof(StaticWebAsset.RelativePath)).Should().Be("candidate.js"); 54asset.GetMetadata(nameof(StaticWebAsset.AssetKind)).Should().Be("All"); 55asset.GetMetadata(nameof(StaticWebAsset.AssetMode)).Should().Be("All"); 56asset.GetMetadata(nameof(StaticWebAsset.AssetRole)).Should().Be("Primary"); 57asset.GetMetadata(nameof(StaticWebAsset.RelatedAsset)).Should().Be(""); 58asset.GetMetadata(nameof(StaticWebAsset.AssetTraitName)).Should().Be(""); 59asset.GetMetadata(nameof(StaticWebAsset.AssetTraitValue)).Should().Be(""); 60asset.GetMetadata(nameof(StaticWebAsset.CopyToOutputDirectory)).Should().Be("Never"); 61asset.GetMetadata(nameof(StaticWebAsset.CopyToPublishDirectory)).Should().Be("PreserveNewest"); 62asset.GetMetadata(nameof(StaticWebAsset.OriginalItemSpec)).Should().Be(Path.Combine("wwwroot", "candidate.js")); 103asset.GetMetadata(nameof(StaticWebAsset.SourceId)).Should().Be("MyProject"); 104asset.GetMetadata(nameof(StaticWebAsset.SourceType)).Should().Be("Discovered"); 105asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be(Path.GetFullPath("wwwroot") + Path.DirectorySeparatorChar); 106asset.GetMetadata(nameof(StaticWebAsset.BasePath)).Should().Be("_content/Path"); 107asset.GetMetadata(nameof(StaticWebAsset.RelativePath)).Should().Be(expectedRelativePath); 108asset.GetMetadata(nameof(StaticWebAsset.AssetKind)).Should().Be("All"); 109asset.GetMetadata(nameof(StaticWebAsset.AssetMode)).Should().Be("All"); 110asset.GetMetadata(nameof(StaticWebAsset.AssetRole)).Should().Be("Primary"); 111asset.GetMetadata(nameof(StaticWebAsset.RelatedAsset)).Should().Be(""); 112asset.GetMetadata(nameof(StaticWebAsset.AssetTraitName)).Should().Be(""); 113asset.GetMetadata(nameof(StaticWebAsset.AssetTraitValue)).Should().Be(""); 114asset.GetMetadata(nameof(StaticWebAsset.CopyToOutputDirectory)).Should().Be("Never"); 115asset.GetMetadata(nameof(StaticWebAsset.CopyToPublishDirectory)).Should().Be("PreserveNewest"); 116asset.GetMetadata(nameof(StaticWebAsset.OriginalItemSpec)).Should().Be(Path.Combine("wwwroot", file)); 153asset.GetMetadata(nameof(StaticWebAsset.SourceId)).Should().Be("MyProject"); 154asset.GetMetadata(nameof(StaticWebAsset.SourceType)).Should().Be("Discovered"); 155asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be(Path.GetFullPath("wwwroot") + Path.DirectorySeparatorChar); 156asset.GetMetadata(nameof(StaticWebAsset.BasePath)).Should().Be("_content/Path"); 157asset.GetMetadata(nameof(StaticWebAsset.RelativePath)).Should().Be(candidate); 158asset.GetMetadata(nameof(StaticWebAsset.AssetKind)).Should().Be("All"); 159asset.GetMetadata(nameof(StaticWebAsset.AssetMode)).Should().Be("All"); 160asset.GetMetadata(nameof(StaticWebAsset.AssetRole)).Should().Be("Primary"); 161asset.GetMetadata(nameof(StaticWebAsset.RelatedAsset)).Should().Be(""); 162asset.GetMetadata(nameof(StaticWebAsset.AssetTraitName)).Should().Be(""); 163asset.GetMetadata(nameof(StaticWebAsset.AssetTraitValue)).Should().Be(""); 164asset.GetMetadata(nameof(StaticWebAsset.CopyToOutputDirectory)).Should().Be("Never"); 165asset.GetMetadata(nameof(StaticWebAsset.CopyToPublishDirectory)).Should().Be("PreserveNewest"); 166asset.GetMetadata(nameof(StaticWebAsset.OriginalItemSpec)).Should().Be(Path.Combine("wwwroot", Path.Combine(candidate.Split('/')))); 204asset.GetMetadata(nameof(StaticWebAsset.SourceId)).Should().Be("MyProject"); 205asset.GetMetadata(nameof(StaticWebAsset.SourceType)).Should().Be("Discovered"); 206asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be(Path.GetFullPath("wwwroot") + Path.DirectorySeparatorChar); 207asset.GetMetadata(nameof(StaticWebAsset.BasePath)).Should().Be("_content/Path"); 208asset.GetMetadata(nameof(StaticWebAsset.RelativePath)).Should().Be(expectedRelativePath); 209asset.GetMetadata(nameof(StaticWebAsset.AssetKind)).Should().Be("All"); 210asset.GetMetadata(nameof(StaticWebAsset.AssetMode)).Should().Be("All"); 211asset.GetMetadata(nameof(StaticWebAsset.AssetRole)).Should().Be("Primary"); 212asset.GetMetadata(nameof(StaticWebAsset.RelatedAsset)).Should().Be(""); 213asset.GetMetadata(nameof(StaticWebAsset.AssetTraitName)).Should().Be(""); 214asset.GetMetadata(nameof(StaticWebAsset.AssetTraitValue)).Should().Be(""); 215asset.GetMetadata(nameof(StaticWebAsset.CopyToOutputDirectory)).Should().Be("Never"); 216asset.GetMetadata(nameof(StaticWebAsset.CopyToPublishDirectory)).Should().Be("PreserveNewest"); 217asset.GetMetadata(nameof(StaticWebAsset.OriginalItemSpec)).Should().Be(Path.Combine("wwwroot", fileName)); 251asset.GetMetadata(nameof(StaticWebAsset.SourceId)).Should().Be("MyProject"); 252asset.GetMetadata(nameof(StaticWebAsset.SourceType)).Should().Be("Discovered"); 253asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be(Path.GetFullPath("wwwroot") + Path.DirectorySeparatorChar); 254asset.GetMetadata(nameof(StaticWebAsset.BasePath)).Should().Be("_content/Path"); 255asset.GetMetadata(nameof(StaticWebAsset.RelativePath)).Should().Be("subdir/candidate.js"); 256asset.GetMetadata(nameof(StaticWebAsset.AssetKind)).Should().Be("All"); 257asset.GetMetadata(nameof(StaticWebAsset.AssetMode)).Should().Be("All"); 258asset.GetMetadata(nameof(StaticWebAsset.AssetRole)).Should().Be("Primary"); 259asset.GetMetadata(nameof(StaticWebAsset.RelatedAsset)).Should().Be(""); 260asset.GetMetadata(nameof(StaticWebAsset.AssetTraitName)).Should().Be(""); 261asset.GetMetadata(nameof(StaticWebAsset.AssetTraitValue)).Should().Be(""); 262asset.GetMetadata(nameof(StaticWebAsset.CopyToOutputDirectory)).Should().Be("Never"); 263asset.GetMetadata(nameof(StaticWebAsset.CopyToPublishDirectory)).Should().Be("PreserveNewest"); 264asset.GetMetadata(nameof(StaticWebAsset.OriginalItemSpec)).Should().Be(Path.Combine("wwwroot", "candidate.js")); 298asset.GetMetadata(nameof(StaticWebAsset.SourceId)).Should().Be("MyProject"); 299asset.GetMetadata(nameof(StaticWebAsset.SourceType)).Should().Be("Discovered"); 300asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be(Path.GetFullPath("wwwroot") + Path.DirectorySeparatorChar); 301asset.GetMetadata(nameof(StaticWebAsset.BasePath)).Should().Be("_content/Path"); 302asset.GetMetadata(nameof(StaticWebAsset.RelativePath)).Should().Be("subdir/candidate.publish.js"); 303asset.GetMetadata(nameof(StaticWebAsset.AssetKind)).Should().Be("All"); 304asset.GetMetadata(nameof(StaticWebAsset.AssetMode)).Should().Be("All"); 305asset.GetMetadata(nameof(StaticWebAsset.AssetRole)).Should().Be("Primary"); 306asset.GetMetadata(nameof(StaticWebAsset.RelatedAsset)).Should().Be(""); 307asset.GetMetadata(nameof(StaticWebAsset.AssetTraitName)).Should().Be(""); 308asset.GetMetadata(nameof(StaticWebAsset.AssetTraitValue)).Should().Be(""); 309asset.GetMetadata(nameof(StaticWebAsset.CopyToOutputDirectory)).Should().Be("Never"); 310asset.GetMetadata(nameof(StaticWebAsset.CopyToPublishDirectory)).Should().Be("PreserveNewest"); 311asset.GetMetadata(nameof(StaticWebAsset.OriginalItemSpec)).Should().Be(Path.Combine("wwwroot", "candidate.js")); 345asset.GetMetadata(nameof(StaticWebAsset.SourceId)).Should().Be("MyProject"); 346asset.GetMetadata(nameof(StaticWebAsset.SourceType)).Should().Be("Discovered"); 347asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be(Path.GetFullPath("wwwroot") + Path.DirectorySeparatorChar); 348asset.GetMetadata(nameof(StaticWebAsset.BasePath)).Should().Be("_content/Path"); 349asset.GetMetadata(nameof(StaticWebAsset.RelativePath)).Should().Be("subdir/candidate.link.js"); 350asset.GetMetadata(nameof(StaticWebAsset.AssetKind)).Should().Be("All"); 351asset.GetMetadata(nameof(StaticWebAsset.AssetMode)).Should().Be("All"); 352asset.GetMetadata(nameof(StaticWebAsset.AssetRole)).Should().Be("Primary"); 353asset.GetMetadata(nameof(StaticWebAsset.RelatedAsset)).Should().Be(""); 354asset.GetMetadata(nameof(StaticWebAsset.AssetTraitName)).Should().Be(""); 355asset.GetMetadata(nameof(StaticWebAsset.AssetTraitValue)).Should().Be(""); 356asset.GetMetadata(nameof(StaticWebAsset.CopyToOutputDirectory)).Should().Be("Never"); 357asset.GetMetadata(nameof(StaticWebAsset.CopyToPublishDirectory)).Should().Be("PreserveNewest"); 358asset.GetMetadata(nameof(StaticWebAsset.OriginalItemSpec)).Should().Be(Path.Combine("wwwroot", "candidate.js")); 394buildAsset.GetMetadata(nameof(StaticWebAsset.AssetKind)).Should().Be("Build"); 395buildAsset.GetMetadata(nameof(StaticWebAsset.CopyToOutputDirectory)).Should().Be("Never"); 396buildAsset.GetMetadata(nameof(StaticWebAsset.CopyToPublishDirectory)).Should().Be("Never"); 399publishAsset.GetMetadata(nameof(StaticWebAsset.AssetKind)).Should().Be("Publish"); 400publishAsset.GetMetadata(nameof(StaticWebAsset.CopyToOutputDirectory)).Should().Be("Never"); 401publishAsset.GetMetadata(nameof(StaticWebAsset.CopyToPublishDirectory)).Should().Be("PreserveNewest"); 501asset.GetMetadata(nameof(StaticWebAsset.BasePath)).Should().Be(expectedPath); 555asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be(expected); 726task.Assets[0].GetMetadata(nameof(StaticWebAsset.RelativePath)).Should().Be("Microsoft.AspNetCore.Components.CustomElements.lib.module.js"); 727task.Assets[0].GetMetadata(nameof(StaticWebAsset.BasePath)).Should().Be("_content/Microsoft.AspNetCore.Components.CustomElements"); 728task.Assets[1].GetMetadata(nameof(StaticWebAsset.RelativePath)).Should().Be("Microsoft.AspNetCore.Components.CustomElements.lib.module.js.map"); 729task.Assets[1].GetMetadata(nameof(StaticWebAsset.BasePath)).Should().Be("_content/Microsoft.AspNetCore.Components.CustomElements"); 766task.Assets[0].GetMetadata(nameof(StaticWebAsset.RelativePath)).Should().Be("Microsoft.AspNetCore.Components.CustomElements.lib.module.js"); 767task.Assets[0].GetMetadata(nameof(StaticWebAsset.BasePath)).Should().Be("_content/Microsoft.AspNetCore.Components.CustomElements"); 768task.Assets[1].GetMetadata(nameof(StaticWebAsset.RelativePath)).Should().Be("Microsoft.AspNetCore.Components.CustomElements.lib.module.js.map"); 769task.Assets[1].GetMetadata(nameof(StaticWebAsset.BasePath)).Should().Be("_content/Microsoft.AspNetCore.Components.CustomElements"); 803task.Assets[0].GetMetadata(nameof(StaticWebAsset.RelativePath)).Should().Be("Components/Dropdown/Dropdown.razor.js"); 804task.Assets[0].GetMetadata(nameof(StaticWebAsset.BasePath)).Should().Be("_content/Project"); 805task.Assets[0].GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().Be("/home/user/work/Repo/Project/");
StaticWebAssets\MergeConfigurationPropertiesTest.cs (40)
43config.GetMetadata("Source").Should().Be("myRcl"); 44config.GetMetadata("GetBuildAssetsTargets").Should().Be("GetCurrentProjectBuildStaticWebAssetItems"); 45config.GetMetadata("GetPublishAssetsTargets").Should() 47config.GetMetadata("Version").Should().Be("2"); 48config.GetMetadata("AdditionalBuildProperties").Should().Be(""); 49config.GetMetadata("AdditionalBuildPropertiesToRemove").Should().Be("TargetFramework;RuntimeIdentifier"); 50config.GetMetadata("AdditionalPublishProperties").Should().Be(""); 51config.GetMetadata("AdditionalPublishPropertiesToRemove").Should().Be("TargetFramework;RuntimeIdentifier"); 134config.GetMetadata("Source").Should().Be("myRcl"); 135config.GetMetadata("GetBuildAssetsTargets").Should().Be("GetCurrentProjectBuildStaticWebAssetItems"); 136config.GetMetadata("GetPublishAssetsTargets").Should() 138config.GetMetadata("Version").Should().Be("2"); 139config.GetMetadata("AdditionalBuildProperties").Should().Be($"TargetFramework={ToolsetInfo.CurrentTargetFramework}"); 140config.GetMetadata("AdditionalBuildPropertiesToRemove").Should().Be(""); 141config.GetMetadata("AdditionalPublishProperties").Should().Be($"TargetFramework={ToolsetInfo.CurrentTargetFramework}"); 142config.GetMetadata("AdditionalPublishPropertiesToRemove").Should().Be(""); 173config.GetMetadata("Source").Should().Be("myRcl"); 174config.GetMetadata("GetBuildAssetsTargets").Should().Be("GetCurrentProjectBuildStaticWebAssetItems"); 175config.GetMetadata("GetPublishAssetsTargets").Should() 177config.GetMetadata("Version").Should().Be("2"); 178config.GetMetadata("AdditionalBuildProperties").Should().Be("RuntimeIdentifier=win-x64"); 179config.GetMetadata("AdditionalBuildPropertiesToRemove").Should().Be(""); 180config.GetMetadata("AdditionalPublishProperties").Should().Be("RuntimeIdentifier=win-x64"); 181config.GetMetadata("AdditionalPublishPropertiesToRemove").Should().Be(""); 212config.GetMetadata("Source").Should().Be("myRcl"); 213config.GetMetadata("GetBuildAssetsTargets").Should().Be("GetCurrentProjectBuildStaticWebAssetItems"); 214config.GetMetadata("GetPublishAssetsTargets").Should() 216config.GetMetadata("Version").Should().Be("2"); 217config.GetMetadata("AdditionalBuildProperties").Should().Be("Configuration=Release"); 218config.GetMetadata("AdditionalBuildPropertiesToRemove").Should().Be(""); 219config.GetMetadata("AdditionalPublishProperties").Should().Be("Configuration=Release"); 220config.GetMetadata("AdditionalPublishPropertiesToRemove").Should().Be(""); 252config.GetMetadata("Source").Should().Be("myRcl"); 253config.GetMetadata("GetBuildAssetsTargets").Should().Be("GetCurrentProjectBuildStaticWebAssetItems"); 254config.GetMetadata("GetPublishAssetsTargets").Should() 256config.GetMetadata("Version").Should().Be("2"); 257config.GetMetadata("AdditionalBuildProperties").Should().Be(""); 258config.GetMetadata("AdditionalBuildPropertiesToRemove").Should().Be("RuntimeIdentifier;TargetFramework"); 259config.GetMetadata("AdditionalPublishProperties").Should().Be(""); 260config.GetMetadata("AdditionalPublishPropertiesToRemove").Should().Be("RuntimeIdentifier;TargetFramework");
StaticWebAssets\ReadStaticWebAssetsManifestFileTest.cs (30)
179asset.GetMetadata(nameof(StaticWebAsset.Identity)).Should().BeEquivalentTo($"{identity}"); 180asset.GetMetadata(nameof(StaticWebAsset.SourceId)).Should().BeEquivalentTo("ComponentApp"); 181asset.GetMetadata(nameof(StaticWebAsset.SourceType)).Should().BeEquivalentTo("Computed"); 182asset.GetMetadata(nameof(StaticWebAsset.ContentRoot)).Should().BeEquivalentTo($"{contentRoot}"); 183asset.GetMetadata(nameof(StaticWebAsset.BasePath)).Should().BeEquivalentTo("_content/ComponentApp"); 184asset.GetMetadata(nameof(StaticWebAsset.RelativePath)).Should().BeEquivalentTo("ComponentApp.styles.css"); 185asset.GetMetadata(nameof(StaticWebAsset.AssetKind)).Should().BeEquivalentTo("All"); 186asset.GetMetadata(nameof(StaticWebAsset.AssetMode)).Should().BeEquivalentTo("CurrentProject"); 187asset.GetMetadata(nameof(StaticWebAsset.AssetRole)).Should().BeEquivalentTo("Primary"); 188asset.GetMetadata(nameof(StaticWebAsset.RelatedAsset)).Should().BeEquivalentTo(""); 189asset.GetMetadata(nameof(StaticWebAsset.AssetTraitName)).Should().BeEquivalentTo("ScopedCss"); 190asset.GetMetadata(nameof(StaticWebAsset.AssetTraitValue)).Should().BeEquivalentTo("ApplicationBundle"); 191asset.GetMetadata(nameof(StaticWebAsset.CopyToOutputDirectory)).Should().BeEquivalentTo("Never"); 192asset.GetMetadata(nameof(StaticWebAsset.CopyToPublishDirectory)).Should().BeEquivalentTo("PreserveNewest"); 193asset.GetMetadata(nameof(StaticWebAsset.OriginalItemSpec)).Should().BeEquivalentTo($"{identity}"); 198endpoint.GetMetadata(nameof(StaticWebAssetEndpoint.AssetFile)).Should().BeEquivalentTo($"{identity}"); 199endpoint.GetMetadata(nameof(StaticWebAssetEndpoint.Selectors)).Should().BeEquivalentTo("""[{"Name":"Content-Encoding","Value":"gzip","Quality":"0.9"}]"""); 200endpoint.GetMetadata(nameof(StaticWebAssetEndpoint.ResponseHeaders)) 259projectConfiguration.GetMetadata(nameof(StaticWebAssetsManifest.ReferencedProjectConfiguration.Version)).Should().BeEquivalentTo("2"); 260projectConfiguration.GetMetadata(nameof(StaticWebAssetsManifest.ReferencedProjectConfiguration.Source)).Should().BeEquivalentTo("AnotherClassLib"); 261projectConfiguration.GetMetadata(nameof(StaticWebAssetsManifest.ReferencedProjectConfiguration.GetPublishAssetsTargets)).Should().BeEquivalentTo("ComputeReferencedStaticWebAssetsPublishManifest;GetCurrentProjectPublishStaticWebAssetItems"); 262projectConfiguration.GetMetadata(nameof(StaticWebAssetsManifest.ReferencedProjectConfiguration.AdditionalPublishProperties)).Should().BeEquivalentTo(";"); 263projectConfiguration.GetMetadata(nameof(StaticWebAssetsManifest.ReferencedProjectConfiguration.AdditionalPublishPropertiesToRemove)).Should().BeEquivalentTo(";WebPublishProfileFile"); 264projectConfiguration.GetMetadata(nameof(StaticWebAssetsManifest.ReferencedProjectConfiguration.GetBuildAssetsTargets)).Should().BeEquivalentTo("GetCurrentProjectBuildStaticWebAssetItems"); 265projectConfiguration.GetMetadata(nameof(StaticWebAssetsManifest.ReferencedProjectConfiguration.AdditionalBuildProperties)).Should().BeEquivalentTo(";"); 266projectConfiguration.GetMetadata(nameof(StaticWebAssetsManifest.ReferencedProjectConfiguration.AdditionalBuildPropertiesToRemove)).Should().BeEquivalentTo(";WebPublishProfileFile"); 319discoveryPattern.GetMetadata(nameof(StaticWebAssetsDiscoveryPattern.Source)).Should().BeEquivalentTo("AnotherClassLib"); 320discoveryPattern.GetMetadata(nameof(StaticWebAssetsDiscoveryPattern.ContentRoot)).Should().BeEquivalentTo($"{contentRoot}"); 321discoveryPattern.GetMetadata(nameof(StaticWebAssetsDiscoveryPattern.BasePath)).Should().BeEquivalentTo("_content/AnotherClassLib"); 322discoveryPattern.GetMetadata(nameof(StaticWebAssetsDiscoveryPattern.Pattern)).Should().BeEquivalentTo("**");
StaticWebAssets\ResolveCompressedAssetsTest.cs (2)
238var relativePath = task.AssetsToCompress[0].GetMetadata("RelativePath"); 245relativePath = task.AssetsToCompress[1].GetMetadata("RelativePath");
StaticWebAssets\UpdateExternallyDefinedStaticWebAssetsTest.cs (13)
82task.UpdatedAssets[0].GetMetadata("Fingerprint").Should().NotBeNullOrEmpty(); 83task.UpdatedAssets[1].GetMetadata("Fingerprint").Should().NotBeNullOrEmpty(); 84task.UpdatedAssets[0].GetMetadata("Integrity").Should().NotBeNullOrEmpty(); 85task.UpdatedAssets[1].GetMetadata("Integrity").Should().NotBeNullOrEmpty(); 168task.UpdatedAssets[0].GetMetadata("Fingerprint").Should().NotBeNullOrEmpty(); 169task.UpdatedAssets[1].GetMetadata("Fingerprint").Should().NotBeNullOrEmpty(); 170task.UpdatedAssets[0].GetMetadata("Integrity").Should().NotBeNullOrEmpty(); 171task.UpdatedAssets[1].GetMetadata("Integrity").Should().NotBeNullOrEmpty(); 251task.UpdatedAssets[0].GetMetadata("Fingerprint").Should().Be("C5tBAdQX"); 252task.UpdatedAssets[0].GetMetadata("RelativePath").Should().Be("assets/index-#[{fingerprint}].css"); 253task.UpdatedAssets[1].GetMetadata("Fingerprint").Should().NotBeNullOrEmpty(); 254task.UpdatedAssets[0].GetMetadata("Integrity").Should().NotBeNullOrEmpty(); 255task.UpdatedAssets[1].GetMetadata("Integrity").Should().NotBeNullOrEmpty();
Microsoft.NETCore.Platforms (1)
UpdateRuntimeIdentifierGraph.cs (1)
43string[] importedRids = rid.GetMetadata("Imports").Split(';');
MSBuild (6)
JsonOutputFormatter.cs (2)
142jsonItem["Identity"] = item.GetMetadata("Identity"); 150jsonItem[metadatumName] = item.GetMetadata(metadatumName);
TaskParameter.cs (4)
598_escapedDefiningProject = EscapingUtilities.EscapeWithCaching(copyFrom.GetMetadata(FileUtilities.ItemSpecModifiers.DefiningProjectFullPath)); 751string originalItemSpec = destinationItem.GetMetadata("OriginalItemSpec"); 758.Where(metadatum => string.IsNullOrEmpty(destinationItem.GetMetadata(metadatum.Key))); 776string value = destinationItem.GetMetadata(entry.Key);
MSBuildTaskHost (3)
TaskParameter.cs (3)
598_escapedDefiningProject = EscapingUtilities.EscapeWithCaching(copyFrom.GetMetadata(FileUtilities.ItemSpecModifiers.DefiningProjectFullPath)); 751string originalItemSpec = destinationItem.GetMetadata("OriginalItemSpec"); 776string value = destinationItem.GetMetadata(entry.Key);
PresentationBuildTasks (18)
Microsoft\Build\Tasks\Windows\FileClassifier.cs (3)
298outputItem.SetMetadata(SharedStrings.Link, inputItem.GetMetadata(SharedStrings.Link)); 299outputItem.SetMetadata(SharedStrings.LogicalName, inputItem.GetMetadata(SharedStrings.LogicalName)); 325string localizableString = fileItem.GetMetadata(SharedStrings.Localizable);
Microsoft\Build\Tasks\Windows\GenerateTemporaryTargetAssembly.cs (2)
731string embedInteropTypesMetadata = pItem.GetMetadata(EMBEDINTEROPTYPES); 739string aliases = pItem.GetMetadata(ALIASES);
Microsoft\Build\Tasks\Windows\MarkupCompilePass1.cs (4)
1541linkAlias = inputXamlItem.GetMetadata(SharedStrings.Link); 1542logicalName = inputXamlItem.GetMetadata(SharedStrings.LogicalName); 1600attributeValue = SourceItem.GetMetadata(listCarryOverAttribute[j]); 1707string strLocalizable = ti.GetMetadata(SharedStrings.Localizable);
Microsoft\Build\Tasks\Windows\ResourcesGenerator.cs (2)
315resFile.GetMetadata(SharedStrings.Link), 316resFile.GetMetadata(SharedStrings.LogicalName),
MS\Internal\Tasks\IncrementalCompileAnalyzer.cs (7)
209string linkAlias = taskItem.GetMetadata(SharedStrings.Link); 210string logicalName = taskItem.GetMetadata(SharedStrings.LogicalName); 391HashSet<string> localMarkupPages = new HashSet<string>(_mcPass1.PageMarkup.Select(x => x.GetMetadata(SharedStrings.FullPath)), StringComparer.OrdinalIgnoreCase); 464taskItem.GetMetadata(SharedStrings.Link), 465taskItem.GetMetadata(SharedStrings.LogicalName)); 533taskItem.GetMetadata(SharedStrings.Link), 534taskItem.GetMetadata(SharedStrings.LogicalName));
sdk-tasks (5)
CalculateTemplateVersions.cs (4)
46var groups = BundledTemplates.GroupBy(bt => bt.GetMetadata("TemplateFrameworkVersion")) 49var itemWithVersion = g.SingleOrDefault(i => i.GetMetadata("UseVersionForTemplateInstallPath").Equals("true", StringComparison.OrdinalIgnoreCase)); 55return Calculate(itemWithVersion.GetMetadata("PackageVersion")); 61templateWithInstallPath.SetMetadata("BundledTemplateInstallPath", groups[t.GetMetadata("TemplateFrameworkVersion")].InstallPath);
ReplaceFileContents.cs (1)
104var replacementString = replacementItem.GetMetadata("ReplacementString");