395 references to XAttribute
aspire (22)
Projects\DotNetBasedAppHostServerProject.cs (13)
188new XAttribute("Include", integration.ProjectPath!),
198new XAttribute("Include", projectPath),
217new XAttribute("Include", hostingPath),
230new XAttribute("Include", p.Name),
231new XAttribute("Version", p.Version)))));
240doc.Root!.Add(new XElement("Import", new XAttribute("Project", appHostInTargets)));
244doc.Root!.Add(new XElement("Import", new XAttribute("Project", sdkInTargets)));
252new XElement("ProjectReference", new XAttribute("Include", dashboardProject))));
259new XElement("ProjectReference", new XAttribute("Include", remoteHostProject))));
263doc.Root!.Add(new XElement("Target", new XAttribute("Name", "_CSharpWriteHostProjectMetadataSources")));
264doc.Root!.Add(new XElement("Target", new XAttribute("Name", "_CSharpWriteProjectMetadataSources")));
385new XAttribute("Include", "appsettings.json"),
386new XAttribute("CopyToOutputDirectory", "PreserveNewest"))));
Projects\PrebuiltAppHostServer.cs (9)
294new XAttribute("Sdk", "Microsoft.NET.Sdk"),
307new XAttribute("Include", p.Name),
308new XAttribute("Version", p.Version));
316new XAttribute("Include", p.ProjectPath!)))));
323new XAttribute("Name", "_WriteProjectRefAssemblyNames"),
324new XAttribute("AfterTargets", "Build"),
326new XAttribute("File", Path.Combine(outputDir, "_project-ref-assemblies.txt")),
327new XAttribute("Lines", "@(_ResolvedProjectReferencePaths->'%(Filename)')"),
328new XAttribute("Overwrite", "true"))));
Aspire.Hosting.Maui (21)
Utilities\MauiEnvironmentHelper.cs (21)
97new XAttribute("Project", "$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets"),
98new XAttribute("Condition", "Exists('$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets')")
105itemGroup.Add(new XElement("_GeneratedAndroidEnvironment", new XAttribute("Include", $"{key}={value}")));
112new XAttribute("Name", "AspireGenerateAndroidEnvironmentFiles"),
113new XAttribute("BeforeTargets", "_GenerateEnvironmentFiles"),
114new XAttribute("Condition", "'@(_GeneratedAndroidEnvironment)' != ''")
120new XAttribute("File", "$(IntermediateOutputPath)__aspire_environment__.txt"),
121new XAttribute("Lines", "@(_GeneratedAndroidEnvironment)"),
122new XAttribute("Overwrite", "True"),
123new XAttribute("WriteOnlyWhenDifferent", "True")
129new XElement("AndroidEnvironment", new XAttribute("Include", "$(IntermediateOutputPath)__aspire_environment__.txt"))
135new XElement("FileWrites", new XAttribute("Include", "$(IntermediateOutputPath)__aspire_environment__.txt"))
141new XAttribute("Files", "$(_AndroidStampDirectory)_GeneratePackageManagerJava.stamp")
268new XAttribute("Project", "$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets"),
269new XAttribute("Condition", "Exists('$(MSBuildExtensionsPath)/v$(MSBuildToolsVersion)/Custom.After.Microsoft.Common.targets')")
283new XAttribute("Include", $"{key}={encodedValue}")));
291new XAttribute("Name", "AspireLogMlaunchEnvironmentVariables"),
292new XAttribute("AfterTargets", "PrepareForBuild"),
293new XAttribute("Condition", "'@(MlaunchEnvironmentVariables)' != ''"),
296new XAttribute("Importance", "High"),
297new XAttribute("Text", "Aspire forwarding mlaunch environment variables: @(MlaunchEnvironmentVariables, ', ')")
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)")));
GenerateDocumentationAndConfigFiles (16)
src\roslyn\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));
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),
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.Build.Tasks.Core (15)
AssemblyDependency\GenerateBindingRedirects.cs (9)
101new XAttribute("name", redirect.Key.Name),
102new XAttribute("publicKeyToken", ResolveAssemblyReference.ByteArrayToString(redirect.Key.GetPublicKeyToken())),
103new XAttribute("culture", String.IsNullOrEmpty(redirect.Key.CultureName) ? "neutral" : redirect.Key.CultureName)),
106new XAttribute("oldVersion", "0.0.0.0-" + redirect.Value),
107new XAttribute("newVersion", redirect.Value))));
301new XAttribute("name", newName),
302new XAttribute(
305new XAttribute(
311attributes.Add(new XAttribute("processorArchitecture", newProcessorArchitecture.ToString()));
Microsoft.CodeAnalysis.Analyzers (16)
src\roslyn\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\roslyn\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\roslyn\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\roslyn\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 (36)
Log\WorkspaceStructureLogger.cs (20)
155var referenceElement = new XElement("projectReference", new XAttribute("id", SanitizePath(projectReference.ProjectId.ToString())));
191new XAttribute("id", diagnostic.Id),
192new XAttribute("severity", diagnostic.Severity.ToString()),
193new XAttribute("path", SanitizePath(diagnostic.Location.GetLineSpan().Path)),
204new XAttribute("hintName", document.HintName),
205new XAttribute("path", SanitizePath(document.FilePath)),
206new XAttribute("generatorType", identity.Generator.TypeName),
207new XAttribute("generatorAssembly", identity.Generator.AssemblyName),
208new XAttribute("generatorAssemblyVersion", identity.Generator.AssemblyVersion.ToString()),
209new XAttribute("generatorAssemblyPath", SanitizePath(identity.Generator.AssemblyPath)));
242var aliasesAttribute = new XAttribute("aliases", string.Join(",", reference.Properties.Aliases));
253new XAttribute("file", SanitizePath(portableExecutableReference.FilePath)),
254new XAttribute("display", SanitizePath(portableExecutableReference.Display)),
259return new XElement("metadataReference", new XAttribute("display", SanitizePath(reference.Display)));
265new XAttribute("path", SanitizePath(reference.FullPath)),
266new XAttribute("display", SanitizePath(reference.Display)));
283typesElement.Add(new XElement("type", new XAttribute("name", type.ToDisplayString())));
290new XAttribute("objectId", compilationId.Value),
291new XAttribute("assemblyIdentity", compilation.Assembly.Identity.ToString()),
301var documentElement = new XElement(elementName, new XAttribute("path", SanitizePath(document.FilePath)));
src\roslyn\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.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.HotReload.Watch (1)
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\arcade\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")));
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"));
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.Maui.Resizetizer (2)
Microsoft.ML.Maml (1)
Microsoft.NET.Build.Tasks (9)
Microsoft.NET.HostModel (12)
ComHost\RegFreeComManifest.cs (12)
30XElement manifest = new XElement(ns + "assembly", new XAttribute("manifestVersion", "1.0"));
32new XAttribute("type", "win32"),
33new XAttribute("name", $"{assemblyName}.X"),
34new XAttribute("version", assemblyVersion)));
56XElement fileElement = new XElement(ns + "file", new XAttribute("name", comHostName));
67XElement comClassElement = new XElement(ns + "comClass", new XAttribute("clsid", guid.ToString("B")), new XAttribute("threadingModel", "Both"));
70comClassElement.Add(new XAttribute("progid", progIdValue.GetString()));
91new XAttribute("tlbid", name.ToString("B")),
92new XAttribute("resourceid", typeLibrary.Key),
93new XAttribute("version", version),
94new XAttribute("helpdir", ""));
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (7)
Microsoft.NET.Sdk.Publish.Tasks (5)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (8)
NuGet.Commands (14)
RestoreCommand\Utility\BuildAssetsUtils.cs (14)
135new XAttribute("Name", "EmitMSBuildWarning"),
136new XAttribute("BeforeTargets", "Build"),
139new XAttribute("Text", Strings.MSBuildWarning_MultiTarget))));
214new XAttribute("Condition", $" {ExcludeAllCondition} "),
223new XAttribute("Condition", $" {ExcludeAllCondition} "),
236new XAttribute("ToolsVersion", "14.0"),
237new XAttribute("xmlns", Namespace.NamespaceName)));
245new XAttribute("Condition", $" '$({propertyName})' == '' "),
251return new XElement(Namespace + itemName, new XAttribute("Include", path));
257new XAttribute("Project", path),
258new XAttribute("Condition", $"Exists('{path}')"));
264new XAttribute("Include", path),
265new XAttribute("Condition", $"Exists('{path}')"),
337itemGroup.Add(new XAttribute("Condition", conditionValue));
NuGet.Packaging (41)
PackageCreation\Authoring\PackageBuilder.cs (17)
1194new XAttribute("Type", "http://schemas.microsoft.com/packaging/2010/07/manifest"),
1195new XAttribute("Target", $"/{path}"),
1196new XAttribute("Id", GenerateRelationshipId($"/{path}"))),
1198new XAttribute("Type", "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"),
1199new XAttribute("Target", $"/{psmdcpPath}"),
1200new XAttribute("Id", GenerateRelationshipId($"/{psmdcpPath}")))
1219new XAttribute("Extension", "rels"),
1220new XAttribute("ContentType", "application/vnd.openxmlformats-package.relationships+xml")),
1222new XAttribute("Extension", "psmdcp"),
1223new XAttribute("ContentType", "application/vnd.openxmlformats-package.core-properties+xml"))
1229new XAttribute("Extension", extension),
1230new XAttribute("ContentType", "application/octet")
1238new XAttribute("PartName", file),
1239new XAttribute("ContentType", "application/octet")
1266new XAttribute(XNamespace.Xmlns + "dc", dcText),
1267new XAttribute(XNamespace.Xmlns + "dcterms", dctermsText),
1268new XAttribute(XNamespace.Xmlns + "xsi", xsiText),
PackageCreation\Xml\PackageMetadataXmlExtensions.cs (13)
202return new XElement(ns + NuspecUtility.FrameworkReference, new XAttribute(NuspecUtility.Name, frameworkReference.Name));
207return new XElement(ns + Reference, new XAttribute(File, reference));
214attributes.Add(new XAttribute("id", dependency.Id));
218attributes.Add(new XAttribute("version", dependency.VersionRange.ToLegacyShortString()));
223attributes.Add(new XAttribute("include", string.Join(",", dependency.Include)));
228attributes.Add(new XAttribute("exclude", string.Join(",", dependency.Exclude)));
245new XAttribute(AssemblyName, reference.AssemblyName),
247new XAttribute("targetFramework", string.Join(", ", reference.SupportedFrameworks.Where(f => f.IsSpecificFramework).Select(f => f.GetFrameworkString()))) :
294attributeList.Add(new XAttribute(NuspecUtility.Type, repository.Type));
299attributeList.Add(new XAttribute(NuspecUtility.RepositoryUrl, repository.Url));
304attributeList.Add(new XAttribute(NuspecUtility.RepositoryBranch, repository!.Branch!));
309attributeList.Add(new XAttribute(NuspecUtility.RepositoryCommit, repository!.Commit!));
352return new XAttribute(name, value);
Roslyn.Diagnostics.Analyzers (16)
src\roslyn\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)