837 references to XAttribute
Aspire.Hosting.Maui (21)
Utilities\MauiEnvironmentHelper.cs (21)
100new XAttribute("Project", "$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets"),
101new XAttribute("Condition", "Exists('$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets')")
108itemGroup.Add(new XElement("_GeneratedAndroidEnvironment", new XAttribute("Include", $"{key}={value}")));
115new XAttribute("Name", "AspireGenerateAndroidEnvironmentFiles"),
116new XAttribute("BeforeTargets", "_GenerateEnvironmentFiles"),
117new XAttribute("Condition", "'@(_GeneratedAndroidEnvironment)' != ''")
123new XAttribute("File", "$(IntermediateOutputPath)__aspire_environment__.txt"),
124new XAttribute("Lines", "@(_GeneratedAndroidEnvironment)"),
125new XAttribute("Overwrite", "True"),
126new XAttribute("WriteOnlyWhenDifferent", "True")
132new XElement("AndroidEnvironment", new XAttribute("Include", "$(IntermediateOutputPath)__aspire_environment__.txt"))
138new XElement("FileWrites", new XAttribute("Include", "$(IntermediateOutputPath)__aspire_environment__.txt"))
144new XAttribute("Files", "$(_AndroidStampDirectory)_GeneratePackageManagerJava.stamp")
283new XAttribute("Project", "$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets"),
284new XAttribute("Condition", "Exists('$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets')")
298new XAttribute("Include", $"{key}={encodedValue}")));
306new XAttribute("Name", "AspireLogMlaunchEnvironmentVariables"),
307new XAttribute("AfterTargets", "PrepareForBuild"),
308new XAttribute("Condition", "'@(MlaunchEnvironmentVariables)' != ''"),
311new XAttribute("Importance", "High"),
312new XAttribute("Text", "Aspire forwarding mlaunch environment variables: @(MlaunchEnvironmentVariables, ', ')")
BuildBoss (4)
dotnet-svcutil-lib (14)
Shared\MSBuildProj.cs (12)
538this.ProjectReferceGroup.Add(new XElement("ProjectReference", new XAttribute("Include", dependency.FullPath)));
541this.ReferenceGroup.Add(new XElement("Reference", new XAttribute("Include", dependency.AssemblyName), new XElement("HintPath", dependency.FullPath)));
544this.PacakgeReferenceGroup.Add(new XElement("PackageReference", new XAttribute("Include", dependency.Name), new XAttribute("Version", dependency.Version)));
547this.ReferenceGroup.Add(new XElement("DotNetCliToolReference", new XAttribute("Include", dependency.Name), new XAttribute("Version", dependency.Version)));
562new XAttribute("CopyToOutputDirectory", "always"),
563new XAttribute("Include", Path.Combine(basePath, $"{framework}\\**")),
564new XAttribute("Link", $"{framework}/%(RecursiveDir)%(Filename)%(Extension)")));
572new XAttribute("CopyToOutputDirectory", "always"),
573new XAttribute("Include", $"{basePath}\\{framework}\\**"),
574new XAttribute("Link", $"{framework}/%(RecursiveDir)%(Filename)%(Extension)")));
EndToEnd.Tests (6)
IIS.LongTests (4)
IIS.NewHandler.FunctionalTests (4)
IIS.NewShim.FunctionalTests (4)
IISExpress.FunctionalTests (4)
illink (4)
Linker\WarningSuppressionWriter.cs (4)
67var xmlAssembly = new XElement("assembly", new XAttribute("fullname", assemblyName.FullName));
74new XAttribute("fullname", "System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute"),
77new XElement("property", new XAttribute("name", UnconditionalSuppressMessageAttributeState.ScopeProperty),
79new XElement("property", new XAttribute("name", UnconditionalSuppressMessageAttributeState.TargetProperty),
Metrics (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID),
467new XAttribute(nameof(Name), Name),
468new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
469new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
Metrics.Legacy (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID),
467new XAttribute(nameof(Name), Name),
468new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
469new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
Microsoft.AspNetCore.App.Analyzers.Test (9)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (9)
266new XAttribute("Name", parameter.Name),
267new XAttribute("IsCatchAll", parameter.IsCatchAll),
268new XAttribute("IsOptional", parameter.IsOptional),
269new XAttribute("EncodeSlashes", parameter.EncodeSlashes));
272parameterElement.Add(new XAttribute("DefaultValue", parameter.DefaultValue));
286new XAttribute("Message", d.Message),
287new XAttribute("Span", d.Span),
291=> new("Text", text.ToString(span));
310element.Add(new XAttribute("value", token.Value));
Microsoft.AspNetCore.Authentication.Test (9)
TestExtensions.cs (5)
55new XElement("claim", new XAttribute("type", claim.Type),
56new XAttribute("value", claim.Value),
57new XAttribute("issuer", claim.Issuer))));
73xml.Add(new XElement("token", new XAttribute("name", token.Name),
74new XAttribute("value", token.Value)));
Microsoft.AspNetCore.DataProtection (18)
KeyManagement\XmlKeyManager.cs (7)
388new XAttribute(VersionAttributeName, 1),
392new XAttribute(IdAttributeName, RevokeAllKeysValue)),
525new XAttribute(IdAttributeName, keyId),
526new XAttribute(VersionAttributeName, 1),
531new XAttribute(DeserializerTypeAttributeName, descriptorXmlInfo.DeserializerType.AssemblyQualifiedName!),
633new XAttribute(VersionAttributeName, 1),
636new XAttribute(IdAttributeName, keyId)),
Microsoft.AspNetCore.Identity.InMemory.Test (4)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (2)
Microsoft.Build.Tasks.Core (15)
AssemblyDependency\GenerateBindingRedirects.cs (9)
97new XAttribute("name", redirect.Key.Name),
98new XAttribute("publicKeyToken", ResolveAssemblyReference.ByteArrayToString(redirect.Key.GetPublicKeyToken())),
99new XAttribute("culture", String.IsNullOrEmpty(redirect.Key.CultureName) ? "neutral" : redirect.Key.CultureName)),
102new XAttribute("oldVersion", "0.0.0.0-" + redirect.Value),
103new XAttribute("newVersion", redirect.Value))));
296new XAttribute("name", newName),
297new XAttribute(
300new XAttribute(
306attributes.Add(new XAttribute("processorArchitecture", newProcessorArchitecture.ToString()));
Microsoft.Cci.Extensions (4)
Microsoft.CodeAnalysis.Analyzers (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID),
467new XAttribute(nameof(Name), Name),
468new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
469new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
Microsoft.CodeAnalysis.AnalyzerUtilities (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID),
467new XAttribute(nameof(Name), Name),
468new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
469new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
Microsoft.CodeAnalysis.BannedApiAnalyzers (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID),
467new XAttribute(nameof(Name), Name),
468new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
469new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
Microsoft.CodeAnalysis.CodeStyle (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID),
467new XAttribute(nameof(Name), Name),
468new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
469new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (12)
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (8)
189new XElement("Capture", new XAttribute("Name", kvp.Key), new XAttribute("Span", kvp.Value), GetTextAttribute(text, kvp.Value))),
191new XElement("Capture", new XAttribute("Name", kvp.Key), new XAttribute("Span", kvp.Value), GetTextAttribute(text, kvp.Value)))));
200new XAttribute("Message", d.Message),
201new XAttribute("Span", d.Span),
205=> new("Text", text.ToString(span));
240element.Add(new XAttribute("value", token.Value));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (5)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (16)
Microsoft.CodeAnalysis.PublicApiAnalyzers (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID),
467new XAttribute(nameof(Name), Name),
468new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
469new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
Microsoft.CodeAnalysis.ResxSourceGenerator (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID),
467new XAttribute(nameof(Name), Name),
468new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
469new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
Microsoft.CodeAnalysis.SemanticSearch.Extensions (2)
Microsoft.CodeAnalysis.Test.Utilities (14)
Syntax\XmlHelpers.cs (13)
51xml.Add(new XAttribute("Type", info.ClassName));
124new XAttribute("IsToken", false),
125new XAttribute("IsTrivia", true),
126new XAttribute("Kind", node.GetKind()),
127new XAttribute("IsMissing", node.IsMissing));
165new XAttribute("IsToken", false),
166new XAttribute("IsTrivia", true),
167new XAttribute("Kind", token.GetKind()),
168new XAttribute("IsMissing", token.IsMissing));
218new XAttribute("IsToken", false),
219new XAttribute("IsTrivia", true),
220new XAttribute("Kind", trivia.GetKind()),
221new XAttribute("IsMissing", false));
Microsoft.CodeAnalysis.Workspaces (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID),
467new XAttribute(nameof(Name), Name),
468new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
469new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (14)
Workspaces\TestWorkspace_XmlCreation.cs (14)
91new XAttribute(AssemblyNameAttributeName, assemblyName),
92new XAttribute(LanguageAttributeName, language),
93commonReferences ? new XAttribute(CommonReferencesAttributeName, true) : null,
107return new XAttribute(LanguageVersionAttributeName, CodeAnalysis.CSharp.LanguageVersionFacts.ToDisplayString(csharpOptions.LanguageVersion));
111return new XAttribute(LanguageVersionAttributeName, CodeAnalysis.VisualBasic.LanguageVersionFacts.ToDisplayString(vbOptions.LanguageVersion));
127return new XAttribute(FeaturesAttributeName, value);
138return new XAttribute(DocumentationModeAttributeName, parseOptions.DocumentationMode);
192new XAttribute(FilePathAttributeName, filePath),
193new XAttribute(NormalizeAttributeName, false),
198element.Add(new XAttribute(FoldersAttributeName, folders));
201element.Add(new XAttribute(MarkupAttributeName, isMarkup));
209new XAttribute(FilePathAttributeName, hintName),
210new XAttribute(NormalizeAttributeName, false),
220new XAttribute(KindAttributeName, parseOptions.Kind));
Microsoft.DotNet.Build.Manifest (1)
Microsoft.DotNet.Build.Tasks.Installers (8)
src\GenerateMacOSDistributionFile.cs (8)
66new XAttribute("id", component.GetMetadata("FileNameWithExtension")),
67new XAttribute("visible", "true"),
68new XAttribute("title", component.GetMetadata("Title")),
69new XAttribute("description", component.GetMetadata("Description")),
70new XElement("pkg-ref", new XAttribute("id", component.GetMetadata("FileNameWithExtension")))));
87.Select(c => new XElement("line", new XAttribute("choice", c.Attribute("id").Value)));
91new XAttribute("id", component.GetMetadata("FileNameWithExtension")),
107optionsElement.Add(new XAttribute("hostArchitectures", hostArchitecture));
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Microsoft.DotNet.Build.Tasks.Workloads (8)
Msi\WorkloadPackGroupMsi.wix.cs (5)
95componentGroupRefElement.ReplaceWith(Enumerable.Range(1, _package.Packs.Count).Select(n => new XElement(ns + "ComponentGroupRef", new XAttribute("Id", "CG_PackageContents" + n))));
105registryKeyElement.Add(new XElement(ns + "RegistryKey", new XAttribute("Key", pack.Id),
106new XElement(ns + "RegistryKey", new XAttribute("Key", pack.PackageVersion),
107new XElement(ns + "RegistryValue", new XAttribute("Value", ""), new XAttribute("Type", "string")))));
Microsoft.DotNet.PackageTesting (10)
VerifyClosure.cs (10)
361new XAttribute("Source", assembly.Name),
362new XAttribute("Target", reference.Name)));
370new XAttribute("Source", assembly.Name),
371new XAttribute("Target", moduleReference)));
381new XAttribute("Id", "native"),
382new XAttribute("Background", "Blue")
386new XAttribute("Id", "managed"),
387new XAttribute("Background", "Green")
401new XAttribute("Id", id),
402new XAttribute("Category", isNative ? "native": "managed")));
Microsoft.DotNet.SharedFramework.Sdk (23)
src\CreateFrameworkListFile.cs (13)
64?.Select(item => new XAttribute(item.ItemSpec, item.GetMetadata("Value")))
160new XAttribute("Type", type),
161new XAttribute("Path", path));
165element.Add(new XAttribute("Language", analyzerLanguage));
171new XAttribute("Culture", Path.GetFileName(Path.GetDirectoryName(path))));
177element.Add(new XAttribute("DropFromSingleFile", "true"));
201new XAttribute("AssemblyName", f.AssemblyName.Name),
202new XAttribute("PublicKeyToken", publicKeyTokenHex),
203new XAttribute("AssemblyVersion", f.AssemblyName.Version));
211element.Add(new XAttribute("FileVersion", f.FileVersion));
221element.Add(new XAttribute("Profile", profile));
228element.Add(new XAttribute("ReferencedByDefault", referencedByDefault));
246element.Add(new XAttribute("DropFromSingleFile", "true"));
src\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (10)
361new XAttribute("Source", assembly.Name),
362new XAttribute("Target", reference.Name)));
370new XAttribute("Source", assembly.Name),
371new XAttribute("Target", moduleReference)));
381new XAttribute("Id", "native"),
382new XAttribute("Background", "Blue")
386new XAttribute("Id", "managed"),
387new XAttribute("Background", "Green")
401new XAttribute("Id", id),
402new XAttribute("Category", isNative ? "native": "managed")));
Microsoft.DotNet.SourceBuild.Tasks (4)
Microsoft.DotNet.XliffTasks (13)
Model\XlfDocument.cs (10)
50new XAttribute("xmlns", XliffNS.NamespaceName),
51new XAttribute(XNamespace.Xmlns + "xsi", XsiNS.NamespaceName),
52new XAttribute("version", "1.2"),
53new XAttribute(XsiNS + "schemaLocation", $"{XliffNS.NamespaceName} xliff-core-1.2-transitional.xsd"),
55new XAttribute("datatype", "xml"),
56new XAttribute("source-language", "en"),
57new XAttribute("target-language", targetLanguage),
58new XAttribute("original", "_"), // placeholder will be replaced on first update
189new XAttribute("id", sourceNode.Id),
191new XElement(Target, new XAttribute("state", "new"), sourceNode.Source),
Microsoft.DotNet.XliffTasks.Tests (2)
Microsoft.Extensions.FileProviders.Embedded.Tests (2)
Microsoft.Maui.Resizetizer (2)
Microsoft.ML.Maml (1)
Microsoft.NET.Build.Tasks (9)
Microsoft.NET.Build.Tasks.UnitTests (2)
Microsoft.NET.Build.Tests (179)
DepsFileSkipTests.cs (9)
204new XAttribute("Name", "AddFilesToSkip"),
205new XAttribute("BeforeTargets", "GenerateBuildDependencyFile"),
206new XAttribute("Condition", "'$(AddFileToSkip)' == 'true'"));
219new XAttribute("Include", "@(ResourceCopyLocalItems)"),
220new XAttribute("Condition", $"'%(DestinationSubPath)' == '{filenameToSkipWithCorrectSlash}'"));
227new XAttribute("Include", "@(ReferencePath);@(ReferenceDependencyPaths);@(RuntimePackAsset);@(NativeCopyLocalItems);@(ResourceCopyLocalItems);@(RuntimeTargetsCopyLocalItems)"),
228new XAttribute("Condition", $"'%(Filename)%(Extension)' == '{filenameToSkip}'"));
234new XAttribute("Include", "@(_FileToSkip)"),
235new XAttribute("KeepMetadata", "-None-"));
GivenFrameworkReferences.cs (20)
204new XAttribute("Include", "NotAKnownFramework")));
206new XAttribute("Include", "AnotherUnknownFramework")));
243new XAttribute("Include", "Microsoft.ASPNETCORE.App")));
285new XAttribute("Include", "NonExistentTestFrameworkReference"),
286new XAttribute("TargetFramework", "net5.0-notwindows7.0"),
287new XAttribute("RuntimeFrameworkName", "NonExistentTestFrameworkReference"),
288new XAttribute("DefaultRuntimeFrameworkVersion", "7.0"),
289new XAttribute("LatestRuntimeFrameworkVersion", "7.0"),
290new XAttribute("TargetingPackName", "NonExistentTestFrameworkReference"),
291new XAttribute("TargetingPackVersion", "7.0")));
451new XAttribute("Include", "Microsoft.WindowsDesktop.App"));
811new XAttribute("Include", "Microsoft.NETCore.App"),
812new XAttribute("IsTrimmable", "false")));
1088new XAttribute("Include", "Microsoft.NETCore.APP"));
1092new XAttribute("Update", "Microsoft.NETCore.App"),
1093new XAttribute("DefaultRuntimeFrameworkVersion", "3.0.0-defaultversion"),
1094new XAttribute("LatestRuntimeFrameworkVersion", "3.0.0-latestversion"),
1095new XAttribute("TargetingPackVersion", "3.0.0-targetingpackversion"));
1099new XAttribute("Update", "Microsoft.NETCore.App"),
1100new XAttribute("AppHostPackVersion", "3.0.0-apphostversion"));
GivenThatWeWantToBuildAComServerLibrary.cs (15)
158.WithProjectChanges(proj => proj.Root.Add(new XElement("ItemGroup", new XElement("ComHostTypeLibrary", new XAttribute("Include", "dummy1.tlb")))));
176new XElement("ComHostTypeLibrary", new XAttribute("Include", "dummy1.tlb")),
177new XElement("ComHostTypeLibrary", new XAttribute("Include", "dummy2.tlb")))));
197new XElement("ComHostTypeLibrary", new XAttribute("Include", "dummy1.tlb"), new XAttribute("Id", 1)),
198new XElement("ComHostTypeLibrary", new XAttribute("Include", "dummy2.tlb"), new XAttribute("Id", 1)))));
222new XElement("ComHostTypeLibrary", new XAttribute("Include", "dummy1.tlb"), new XAttribute("Id", id)))));
242new XElement("ComHostTypeLibrary", new XAttribute("Include", "dummy1.tlb"), new XAttribute("Id", 1)),
243new XElement("ComHostTypeLibrary", new XAttribute("Include", "dummy2.tlb"), new XAttribute("Id", 2)))));
258.WithProjectChanges(proj => proj.Root.Add(new XElement("ItemGroup", new XElement("ComHostTypeLibrary", new XAttribute("Include", "doesnotexist.tlb")))));
275.WithProjectChanges(proj => proj.Root.Add(new XElement("ItemGroup", new XElement("ComHostTypeLibrary", new XAttribute("Include", "invalid.tlb")))));
GivenThatWeWantToBuildADesktopExe.cs (9)
281propertyGroup.Element(ns + "RuntimeIdentifier").Add(new XAttribute("Condition", "'$(TargetFramework)' == 'net46'"));
478itemGroup.Add(new XElement(ns + "Reference", new XAttribute("Include", "System")));
510new XAttribute("Include", "NewtonSoft.Json"),
511new XAttribute("Version", ToolsetInfo.GetNewtonsoftJsonPackageVersion())));
574new XAttribute("Include", "System.Security.Cryptography.Algorithms"),
575new XAttribute("Version", "4.3.0")));
659new XAttribute("Include", "System.Net.Http"));
728new XAttribute("Include", "System.Net.Http"));
841new XAttribute("version", "v999")))));
GivenThatWeWantToBuildADesktopExeWtihNetStandardLib.cs (16)
45new XAttribute("Include", $@"..\{LibraryName}\{LibraryName}.csproj")));
53new XAttribute("Include", LibraryName),
59new XAttribute("Include", binaryPath)));
199new XAttribute("Include", "NETStandard.Library"),
200new XAttribute("Version", "1.6.1")));
205new XAttribute("Name", "CheckForConflicts"),
206new XAttribute("AfterTargets", "_HandlePackageFileConflicts"));
210new XAttribute("Files", "@(_ConflictPackageFiles)"),
211new XAttribute("Path", TestContext.Current.ToolsetUnderTest.GetMicrosoftNETBuildExtensionsPath()),
213new XAttribute("TaskParameter", "InPath"),
214new XAttribute("ItemName", "_ConflictsInSupportLibs"))
217new XAttribute("Condition", "'@(_ConflictsInSupportLibs)' == ''"),
218new XAttribute("Importance", "High"),
219new XAttribute("Text", successMessage)));
221new XAttribute("Condition", "'@(_ConflictsInSupportLibs)' != ''"),
222new XAttribute("Text", "Found conflicts under support libs: @(_ConflictsInSupportLibs)")));
GivenThatWeWantToBuildADesktopLibrary.cs (12)
98itemGroup.Add(new XElement(ns + "Reference", new XAttribute("Include", "System.Net.Http")));
358new XAttribute("Include", "NETStandard.Library"),
359new XAttribute("Version", "2.0.3")));
364new XAttribute("Include", dependency.Item1),
365new XAttribute("Version", dependency.Item2)));
418new XAttribute("Include", "System.Net.Http"),
419new XAttribute("Version", "4.3.2")));
423new XAttribute("Include", "System.Net.Http")));
483new XAttribute("Include", "System.Net.Http"),
531new XAttribute("Name", "Repro"),
532new XAttribute("DependsOnTargets", "RunResolvePublishAssemblies"),
533new XAttribute("BeforeTargets", "BeforeBuild")));
GivenThatWeWantToControlGeneratedAssemblyInfo.cs (17)
118new XAttribute("Name", "InitializeSourceControlInformation"),
149new XAttribute("Name", "InitializeSourceControlInformation"),
181new XAttribute("Name", "_SetSourceRevisionId"),
182new XAttribute("BeforeTargets", "InitializeSourceControlInformation"),
188new XAttribute("Name", "InitializeSourceControlInformation")));
217new XAttribute("Name", "_SetSourceRevisionId"),
218new XAttribute("BeforeTargets", "InitializeSourceControlInformation"),
224new XAttribute("Name", "InitializeSourceControlInformation")));
353new XAttribute("Include", "Tests"))));
547new XAttribute("Include", "Tests"))));
572new XAttribute("Include", "Tests"),
573new XAttribute("Key", "00240000048000009400000006020000002400005253413100040000010001001d3e6bbb36e11ea61ceff6e1022b23dd779fc6230838db2d25a2c7c8433b3fcf86b16c25b281fc3db1027c0675395e7d0548e6add88b6a811962bf958101fa9e243b1618313bee11f5e3b3fefda7b1d1226311b6cc2d07e87ff893ba6890b20082df34a0aac14b605b8be055e81081a626f8c69e9ed4bbaa4eae9f94a35accd2"))));
600new XAttribute("Include", "Tests"))));
625new XAttribute("Include", "MetadataKey"),
626new XAttribute("Value", "MetadataValue"))));
653new XAttribute("Include", "MetadataKey"),
654new XAttribute("Value", "MetadataValue"))));
GivenThatWeWantToReferenceAProject.cs (10)
215new XAttribute("Include", "script.sh"), new XAttribute("CopyToOutputDirectory", "PreserveNewest"));
221new XAttribute("Include", childPath));
225new XAttribute("Name", "WriteOutput"),
226new XAttribute("DependsOnTargets", "GetCopyToOutputDirectoryItems"),
227new XAttribute("BeforeTargets", "_CopyOutOfDateSourceItemsToOutputDirectory"));
266new XElement(ns + "Content", new XAttribute("Include", "a.txt"), new XAttribute("CopyToOutputDirectory", "PreserveNewest"))));
329new XAttribute("Condition", $@"'$(TargetFramework)' == '{tfm}'"));
331new XAttribute("Include", Path.Combine(path, "..", "..", testProjectA.Name, $"{testProjectA.Name}.csproj")));
GivenThereAreDefaultItems.cs (20)
113itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Include", "**\\*.cs")));
155itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Include", "..\\Shared\\**\\*.cs")));
191itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Remove", "Excluded\\**\\*.cs")));
228itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Include", "obj\\Class2.cs")));
264itemGroup.Add(new XElement(ns + "EmbeddedResource", new XAttribute("Include", "CSharpAsResource.cs")));
265itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Remove", "CSharpAsResource.cs")));
314itemGroup.Add(new XElement(ns + "Content", new XAttribute("Include", "CSharpAsContent.cs"),
315new XAttribute("CopyToOutputDirectory", "true")));
316itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Remove", "CSharpAsContent.cs")));
382itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Include", testProject.Name + ".cs")));
383itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Include", testProject.Name + "Program.cs")));
454itemGroup.Add(new XElement(ns + "None", new XAttribute("Update", "@(None)"), new XAttribute("CopyToOutputDirectory", "PreserveNewest")));
499itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Include", "Program.cs")));
526itemGroup.Add(new XElement(ns + "Compile", new XAttribute("Include", @"**\*.cs")));
567new XAttribute("Include", "netstandard.Library"), new XAttribute("Version", "1.6.1")));
598new XAttribute("Include", "Microsoft.NETCore.App")));
639new XAttribute("Include", "Microsoft.NETCore.App")));
642new XAttribute("Include", "Microsoft.NETCore.App")));
KnownRuntimePackTests.cs (13)
86new XAttribute("Update", "Microsoft.NETCore.App"),
87new XAttribute("RuntimePackLabels", "Mono"));
120new XAttribute("Update", "Microsoft.AspNetCore.App"),
121new XAttribute("RuntimePackExcludedRuntimeIdentifiers", "android"));
144new XAttribute("Include", "Microsoft.NETCore.App"),
145new XAttribute("TargetFramework", "net5.0"),
146new XAttribute("RuntimeFrameworkName", "Microsoft.NETCore.App"),
147new XAttribute("DefaultRuntimeFrameworkVersion", "5.0.0-preview1"),
148new XAttribute("LatestRuntimeFrameworkVersion", "5.0.0-preview1.1"),
149new XAttribute("RuntimePackNamePatterns", "Microsoft.NETCore.App.Runtime.Mono.**RID**"),
150new XAttribute("RuntimePackRuntimeIdentifiers", "linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86;ios-arm64;ios-arm;iossimulator-x64;iossimulator-arm64;iossimulator-x86;tvos-arm64;tvossimulator-x64;tvossimulator-arm64;android-arm64;android-arm;android-x64;android-x86;browser-wasm;maccatalyst-x64;maccatalyst-arm64"),
151new XAttribute("IsTrimmable", "true"),
152new XAttribute("RuntimePackLabels", "Mono"));
Microsoft.NET.Pack.Tests (4)
Microsoft.NET.Publish.Tests (55)
GivenThatWeWantToExcludeAPackageFromPublish.cs (10)
32itemGroup.Add(new XElement(ns + "PackageReference", new XAttribute("Include", "NEWTONSOFT.Json"),
33new XAttribute("Version", ToolsetInfo.GetNewtonsoftJsonPackageVersion()),
34new XAttribute("PrivateAssets", "All")));
82itemGroup.Add(new XElement(ns + "PackageReference", new XAttribute("Include", "Newtonsoft.Json"),
83new XAttribute("Version", ToolsetInfo.GetNewtonsoftJsonPackageVersion()),
84new XAttribute("Publish", "false")));
132itemGroup.Add(new XElement(ns + "PackageReference", new XAttribute("Include", "Newtonsoft.Json"),
133new XAttribute("Version", ToolsetInfo.GetNewtonsoftJsonPackageVersion()),
134new XAttribute("PrivateAssets", "All"),
135new XAttribute("Publish", "true")));
GivenThatWeWantToPublishAnAotApp.cs (7)
548new XAttribute("Update", "@(KnownILCompilerPack)"),
1034new XAttribute("BeforeTargets", "PrepareForILLink"),
1035new XAttribute("Name", targetName));
1041new XAttribute("Condition", $"'%(FileName)' == '{assemblyName}'"),
1042new XAttribute(key, value))));
1273new XAttribute("Include", "key1"),
1274new XAttribute("Value", "value1"))));
GivenThatWeWantToPublishASingleFileApp.cs (19)
145target.ReplaceAttributes(new XAttribute[] { new XAttribute("Name", "AfterAfterSdkPublish"), new XAttribute("AfterTargets", "AfterSdkPublish") });
147message.ReplaceAttributes(new XAttribute[] { new XAttribute("Importance", "High"), new XAttribute("Text", "Executed AfterAfterSdkPublish") });
1045new XAttribute("Name", targetName),
1046new XAttribute("BeforeTargets", "GenerateSingleFileBundle"),
1047new XAttribute("DependsOnTargets", "PrepareForBundle"));
1054new XAttribute("Condition", "'@(FilesToBundle->AnyHaveMetadataValue('RelativePath', 'System.Private.CoreLib.dll'))' != 'true'"),
1055new XAttribute("Text", "System.Private.CoreLib.dll is not in FilesToBundle list")));
1063new XAttribute("Condition", $"'$(AppHostFile)' != '{host}'"),
1064new XAttribute("Text", $"AppHostFile expected to be: '{host}' actually: '$(AppHostFile)'")));
1095new XAttribute("Name", targetName),
1096new XAttribute("BeforeTargets", "GenerateSingleFileBundle"),
1097new XAttribute("DependsOnTargets", "PrepareForBundle"));
1110new XAttribute("SourceFiles", "@(FilesToBundle)"),
1111new XAttribute("DestinationFiles", "@(FilesToBundle->'%(FullPath).renamed')"),
1112new XAttribute("Condition", "'%(FilesToBundle.RelativePath)' == 'SingleFileTest.dll'")));
1125new XAttribute("Remove", "@(FilesToBundle)"),
1126new XAttribute("Condition", "'%(FilesToBundle.RelativePath)' == 'SingleFileTest.dll'"))));
GivenThatWeWantToRunILLink.cs (12)
156new XAttribute("Remove", "Microsoft.NET.ILLink.Tasks"))));
1878new XAttribute("Include", rootDescriptorFileName)));
1901new XAttribute("BeforeTargets", "PrepareForILLink"),
1902new XAttribute("Name", targetName));
1908new XAttribute("Condition", $"'%(FileName)' == '{assemblyName}'"),
1909new XAttribute(key, value))));
1942new XAttribute("BeforeTargets", "PrepareForILLink"),
1943new XAttribute("Name", "_EnableNonFrameworkTrimming"));
1951new XAttribute("Include", "@(IntermediateAssembly->'%(FullPath)')")));
1982new XAttribute("Include", "DisableFeature"),
1983new XAttribute("Value", "true"),
1984new XAttribute("Trim", trim.ToString()))));
Microsoft.NET.Restore.Tests (9)
GivenThatWeWantAutomaticTargetingPackReferences.cs (8)
80new XAttribute("Include", $"Microsoft.NETFramework.ReferenceAssemblies"),
81new XAttribute("Version", $"1.0.0-preview.2")));
146new XAttribute("Include", $"Newtonsoft.Json"),
147new XAttribute("Version", ToolsetInfo.GetNewtonsoftJsonPackageVersion())));
149new XAttribute("Include", $"sqlite"),
150new XAttribute("Version", $"3.13.0")));
152new XAttribute("Include", $"Microsoft.NETFramework.ReferenceAssemblies"),
153new XAttribute("Version", $"1.0.0")));
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (7)
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (19)
Microsoft.NET.Sdk.Publish.Tasks (5)
Microsoft.NET.Sdk.Publish.Tasks.Tests (2)
Microsoft.NET.Sdk.Razor.Tests (3)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (7)
Microsoft.NET.Sdk.StaticWebAssets.Tests (22)
StaticWebAssetsIntegrationTest.cs (12)
480sdkAttribute = new XAttribute("Sdk", "Microsoft.NET.Sdk");
487project.Root.AddFirst(new XElement("Import", new XAttribute("Project", "ExternalStaticAssets.targets")));
535sdkAttribute = new XAttribute("Sdk", "Microsoft.NET.Sdk");
542project.Root.AddFirst(new XElement("Import", new XAttribute("Project", "ExternalStaticAssets.targets")));
554new XAttribute("Include", "Version"),
555new XAttribute("Pattern", ".*(?<fingerprint>v\\d{1})\\.js$"))));
587new XAttribute("Update", "wwwroot\\file.build.txt"),
588new XAttribute("TargetPath", "wwwroot\\file.txt"),
589new XAttribute("CopyToPublishDirectory", "Never")),
591new XAttribute("Update", "wwwroot\\file.publish.txt"),
592new XAttribute("TargetPath", "wwwroot\\file.txt"),
593new XAttribute("CopyToOutputDirectory", "Never"))));
Microsoft.NET.TestFramework (35)
Commands\GetValuesCommand.cs (7)
107new XAttribute("Name", TargetName),
108ShouldCompile ? new XAttribute("DependsOnTargets", DependsOnTargets) : null);
128new XAttribute("Include", linesAttribute)));
132new XAttribute("File", $@"bin\$(Configuration)\$(TargetFramework)\{_valueName}Values.txt"),
133new XAttribute("Lines", "@(LinesToWrite)"),
134new XAttribute("Overwrite", bool.TrueString),
135new XAttribute("Encoding", "Unicode")));
ProjectConstruction\TestProject.cs (22)
193new XAttribute(includeOrUpdate, packageReference.ID));
196packageReferenceElement.Add(new XAttribute("Version", packageReference.Version));
200packageReferenceElement.Add(new XAttribute("PrivateAssets", packageReference.PrivateAssets));
204packageReferenceElement.Add(new XAttribute("Aliases", packageReference.Aliases));
208packageReferenceElement.Add(new XAttribute("Publish", packageReference.Publish));
216new XAttribute("Include", $"{dotnetCliToolReference.ID}"),
217new XAttribute("Version", $"{dotnetCliToolReference.Version}")));
281item.Add(new XAttribute(attribute.Key, attribute.Value));
312new XAttribute("Include", $"../{referencedProject.Name}/{referencedProject.Name}{referencedProject.TargetExtension}")));
329new XAttribute("Include", reference)));
340new XAttribute("Include", frameworkReference)));
349new XAttribute("Name", copyFilesTarget.TargetName),
350new XAttribute("AfterTargets", copyFilesTarget.TargetToRunAfter));
353new XAttribute("SourceFiles", copyFilesTarget.SourceFiles),
354new XAttribute("DestinationFolder", copyFilesTarget.Destination));
382new XAttribute("Name", "WritePropertyValues"),
383new XAttribute("BeforeTargets", "AfterBuild"));
394new XAttribute("Include", $"{propertyName}: $({propertyName})")));
399new XAttribute("File", $@"$(BaseIntermediateOutputPath)\$(Configuration)\$(TargetFramework)\PropertyValues.txt"),
400new XAttribute("Lines", "@(LinesToWrite)"),
401new XAttribute("Overwrite", bool.TrueString),
402new XAttribute("Encoding", "Unicode")));
Microsoft.NET.ToolPack.Tests (2)
Microsoft.VisualStudio.LanguageServices (2)
Microsoft.VisualStudio.LanguageServices.Implementation (4)
Roslyn.Diagnostics.Analyzers (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID),
467new XAttribute(nameof(Name), Name),
468new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
469new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
System.Private.Xml.Linq (9)
Text.Analyzers (16)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (6)
466new XAttribute(nameof(ID), ID),
467new XAttribute(nameof(Name), Name),
468new XAttribute(nameof(Prefix), Prefix ?? string.Empty),
469new XAttribute(nameof(Suffix), Suffix ?? string.Empty),
470new XAttribute(nameof(WordSeparator), WordSeparator ?? string.Empty),
471new XAttribute(nameof(CapitalizationScheme), CapitalizationScheme));
XmlFileLogger (19)
xunit.console (1)