357 references to XElement
aspire (31)
DotNet\DotNetAppHostRestorePreview.cs (7)
117new XElement("RestoreRootConfigDirectory", MSBuildEscaping.Escape(configuration.EffectiveWorkingDirectory.FullName))));
158new XElement("_AspireIsolatedRestoreOutput",
161new XElement("_AspireRestoreProjectName", "$(MSBuildProjectName)"),
165new XElement("_AspireNamedLockFile",
173new XElement("RestoreOutputPath", outputRoot),
174new XElement("NuGetLockFilePath", outputRoot + "packages.lock.json")),
175new XElement("MakeDir", new XAttribute("Directories", outputRoot)),
Projects\CSharpProjectFile.cs (11)
193var root = new XElement("Project", new XAttribute("Sdk", Sdk));
197root.Add(new XElement("PropertyGroup",
198Properties.Select(property => new XElement(property.Name, property.Value))));
203root.Add(new XElement("ItemGroup",
209root.Add(new XElement("ItemGroup",
215root.Add(new XElement("ItemGroup",
219root.Add(Imports.Select(import => new XElement("Import", new XAttribute("Project", import.ProjectPath))));
230var element = new XElement("PackageReference", new XAttribute("Include", packageReference.Name));
245var element = new XElement("ProjectReference", new XAttribute("Include", projectReference.ProjectPath));
256var element = new XElement("None", new XAttribute("Update", noneItem.Update));
273element.Add(new XElement(name, value.Value ? "true" : "false"));
Projects\IntegrationClosureBuilder.cs (7)
151new XElement("BaseOutputPath", CliPathHelper.EnsureTrailingSlash(Path.Combine(restoreDir, "bin"))),
152new XElement("BaseIntermediateOutputPath", CliPathHelper.EnsureTrailingSlash(intermediateOutputPath)),
153new XElement("MSBuildProjectExtensionsPath", "$(BaseIntermediateOutputPath)"),
154new XElement("RestoreRootConfigDirectory", restoreRootConfigDirectory),
155new XElement("RestoreConfigFile", string.Empty));
159propertyGroup.Add(new XElement("RestorePackagesPath", globalPackagesFolder));
162return new XDocument(new XElement("Project", propertyGroup));
aspire-tray (6)
src\Aspire.Tray\Common\MacTrayStartupSettings.cs (6)
31new XElement("key", "Label"), new XElement("string", Label),
32new XElement("key", "ProgramArguments"),
33new XElement("array", new[] { cliPath, "tray", "start", "--non-interactive", "--nologo" }
34.Select(argument => new XElement("string", argument))),
35new XElement("key", "RunAtLoad"), new XElement("true"))));
Aspire.Cli.EndToEnd.Tests (4)
Aspire.Cli.Tests (15)
Projects\PrebuiltAppHostServerTests.cs (6)
367new XElement("package", new XAttribute("pattern", "Aspire*"))),
369new XElement("package", new XAttribute("pattern", privatePackage)),
370new XElement("package", new XAttribute("pattern", selectedPackage))));
375new XElement("package", new XAttribute("pattern", otherPackage))));
379packageSources, new XElement("auditSources", new XElement("clear")), packageMappings).ToString());
764new XElement("package", new XAttribute("pattern", "*"))))))
Aspire.Hosting.Azure.Provisioning.Generators (3)
Aspire.Hosting.Dotnet (3)
Aspire.Hosting.Maui (7)
Aspire.Templates.Tests (2)
Aspire.Tray.Tests (7)
src\Aspire.Tray\Common\MacTrayStartupSettings.cs (6)
31new XElement("key", "Label"), new XElement("string", Label),
32new XElement("key", "ProgramArguments"),
33new XElement("array", new[] { cliPath, "tray", "start", "--non-interactive", "--nologo" }
34.Select(argument => new XElement("string", argument))),
35new XElement("key", "RunAtLoad"), new XElement("true"))));
dotnet-svcutil-lib (2)
dotnet-user-jwts (1)
dotnet-user-secrets (1)
GenerateDocumentationAndConfigFiles (8)
GenerateTemplateManifest (13)
TemplateRestorePlan.cs (11)
153new XElement("TargetFramework", parameters["Framework"]),
154new XElement("OutputType", "Exe"),
155new XElement("FileBasedProgram", "true")));
172project.Add(new XElement("ItemGroup", new XElement("PackageReference", new XAttribute("Include", name), new XAttribute("Version", value))));
175project.Element("PropertyGroup")!.Add(new XElement(name, value));
298project.Frameworks.Count > 0 ? new XElement("TargetFrameworks", string.Join(";", project.Frameworks)) : null,
299new XElement("EnableDefaultItems", "false"),
300new XElement("ManagePackageVersionsCentrally", "false"),
301new XElement("NuGetAudit", "false")));
307new XDocument(new XElement("Solution", Projects.Select(project =>
308new XElement("Project", new XAttribute("Path", $"{project.Name}/{project.Name}.csproj"))))).Save(solutionPath);
illink (3)
Infrastructure.Tests (49)
Hex1bNativePublishingTests.cs (19)
393new XElement("NuGetPackageId", "Hex1b"),
394new XElement("PathInPackage", pathInPackage),
395new XElement("DestinationSubPath", rid.Length == 0 ? pathInPackage : Path.GetFileName(pathInPackage)),
396new XElement("DestinationSubDirectory", rid.Length == 0 ? pathInPackage[..(pathInPackage.LastIndexOf('/') + 1)] : "")));
403new XElement("NuGetPackageId", "OtherPackage"),
404new XElement("PathInPackage", "native/OpenConsole.exe"),
405new XElement("RelativePath", "other/OpenConsole.exe"));
409new XElement("RelativePath", "%(DestinationSubDirectory)%(Filename)%(Extension)")),
415new XElement("RelativePath", "other/OpenConsole.exe")));
423new XElement("ImportDirectoryBuildProps", "false"),
424new XElement("ImportDirectoryBuildTargets", "false")),
427new XElement("TargetFramework", "net11.0"),
428new XElement("RuntimeIdentifier", rid),
429new XElement("PublishSingleFile", singleFile),
430new XElement("IncludeNativeLibrariesForSelfExtract", "true")),
432new XElement("Import", new XAttribute("Project", Path.Combine(RepoRoot.Path, "src", "Aspire.Hosting", "buildTransitive", "Aspire.Hosting.targets"))),
436new XElement("ItemGroup", new XElement("_ResolvedCopyLocalPublishAssets",
438new XElement("DestinationSubPath", "%(Filename)%(Extension)"),
439new XElement("DestinationSubDirectory", "")))),
ResourceGeneratorMetadataTests.cs (10)
88new XElement("PropertyGroup", configuration.Root!.Elements("PropertyGroup").Elements("ResxCodeGenerator").Select(property => new XElement(property))),
89new XElement("PropertyGroup", source.Root!.Elements("PropertyGroup").Elements("ResxCodeGenerator").Select(property => new XElement(property))),
91neutralResources.Concat(otherResources).Select(path => new XElement("EmbeddedResource", new XAttribute("Include", path))),
92designers.Concat(otherSources).Select(path => new XElement("Compile", new XAttribute("Include", path)))),
93new XElement("ItemGroup", source.Root.Elements("ItemGroup").Elements()
98settingsDesigner.Add(new XElement("DependentUpon", "Settings.settings"));
99settingsDesigner.Add(new XElement("DesignTime", "True"));
100settingsDesigner.Add(new XElement("AutoGen", "True"));
103linkedResource.Add(new XElement("Link", Path.Combine(resourceDirectory, "Linked.resx")));
104linkedResource.Add(new XElement("LogicalName", "Shared.Linked.resources"));
TemplateManifest\TemplateManifestBuildTargetTests.cs (5)
36new XElement("RepoRoot", root + Path.DirectorySeparatorChar),
37new XElement("IntermediateOutputPath", Path.Combine(intermediate, "unused", "..")),
38new XElement("ArtifactsShippingPackagesDir", Path.Combine(root, "artifacts", "packages") + Path.DirectorySeparatorChar)),
39new XElement("Target", new XAttribute("Name", "RefreshTemplatePackageInputsForCgManifest")),
40new XElement("Target", new XAttribute("Name", "ReplacePackageVersionOnTemplates")),
TemplateManifest\TemplateManifestTestEnvironment.cs (8)
57new XElement("package", new XAttribute("pattern", "*")))),
58new XElement("fallbackPackageFolders", new XElement("clear")))).Save(ConfigPath);
122new XDocument(new XElement("package",
124new XElement("id", name),
125new XElement("version", version),
126new XElement("authors", "Test"),
127new XElement("description", "Hermetic template manifest fixture"),
129new XElement("dependencies", dependencies.Select(dependency =>
Microsoft.AspNetCore.DataProtection (18)
KeyManagement\XmlKeyManager.cs (9)
389new XElement(RevocationDateElementName, revocationDate),
391new XElement(KeyElementName,
393new XElement(ReasonElementName, reason));
527new XElement(CreationDateElementName, creationDate),
528new XElement(ActivationDateElementName, activationDate),
529new XElement(ExpirationDateElementName, expirationDate),
634new XElement(RevocationDateElementName, revocationDate),
635new XElement(KeyElementName,
637new XElement(ReasonElementName, reason));
Microsoft.Build.Tasks.Core (5)
Microsoft.CodeAnalysis.Analyzers (8)
Microsoft.CodeAnalysis.AnalyzerUtilities (8)
Microsoft.CodeAnalysis.CodeStyle (8)
Microsoft.CodeAnalysis.ResxSourceGenerator (9)
Microsoft.CodeAnalysis.Workspaces (17)
Log\WorkspaceStructureLogger.cs (9)
80projectElement.Add(new XElement("workspaceDocuments", await CreateElementsForDocumentCollectionAsync(project.Documents, "document", cancellationToken).ConfigureAwait(false)));
81projectElement.Add(new XElement("workspaceAdditionalDocuments", await CreateElementsForDocumentCollectionAsync(project.AdditionalDocuments, "additionalDocuments", cancellationToken).ConfigureAwait(false)));
82projectElement.Add(new XElement("workspaceAnalyzerConfigDocuments", await CreateElementsForDocumentCollectionAsync(project.AnalyzerConfigDocuments, "analyzerConfigDocument", cancellationToken).ConfigureAwait(false)));
86projectElement.Add(new XElement("workspaceSourceGeneratedDocuments", CreateElementsForSourceGeneratedDocuments(sourceGeneratedDocuments)));
155var referenceElement = new XElement("projectReference", new XAttribute("id", SanitizePath(projectReference.ProjectId.ToString())));
259return new XElement("metadataReference", new XAttribute("display", SanitizePath(reference.Display)));
283typesElement.Add(new XElement("type", new XAttribute("name", type.ToDisplayString())));
301var documentElement = new XElement(elementName, new XAttribute("path", SanitizePath(document.FilePath)));
310documentElement.Add(new XElement("loadDiagnostic", loadDiagnostic));
Microsoft.DotNet.Arcade.Sdk (1)
Microsoft.DotNet.Build.Manifest (1)
Microsoft.DotNet.Build.Tasks.Installers (5)
Microsoft.DotNet.Build.Tasks.Workloads (4)
Microsoft.DotNet.HotReload.Watch (1)
Microsoft.DotNet.SourceBuild.Tasks (6)
Microsoft.DotNet.XliffTasks (3)
Microsoft.Extensions.AI.Evaluation.Safety (3)
Microsoft.Extensions.FileProviders.Embedded.Manifest.Task (4)
Microsoft.Maui.Resizetizer (2)
Microsoft.ML.Maml (1)
Microsoft.NET.Build.Tasks (3)
Microsoft.NET.HostModel (2)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (1)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (44)
GenerateStaticWebAssetsPropsFile.cs (19)
111new XElement(SourceType, emittedSourceType),
112new XElement(SourceId, element.GetMetadata(SourceId)),
113new XElement(ContentRoot, @$"$(MSBuildThisFileDirectory)..\{Normalize(PackagePathPrefix)}\"),
114new XElement(BasePath, element.GetMetadata(BasePath)),
115new XElement(RelativePath, relativePath),
116new XElement(AssetKind, element.GetMetadata(AssetKind)),
117new XElement(AssetMode, element.GetMetadata(AssetMode)),
118new XElement(AssetRole, element.GetMetadata(AssetRole)),
119new XElement(RelatedAsset, element.GetMetadata(RelatedAsset)),
120new XElement(AssetTraitName, element.GetMetadata(AssetTraitName)),
121new XElement(AssetTraitValue, element.GetMetadata(AssetTraitValue)),
122new XElement(Fingerprint, element.GetMetadata(Fingerprint)),
123new XElement(Integrity, element.GetMetadata(Integrity)),
124new XElement(CopyToOutputDirectory, element.GetMetadata(CopyToOutputDirectory)),
125new XElement(CopyToPublishDirectory, element.GetMetadata(CopyToPublishDirectory)),
126new XElement(FileLength, element.GetMetadata(FileLength)),
127new XElement(LastWriteTime, element.GetMetadata(LastWriteTime)),
128new XElement(OriginalItemSpec, fullPathExpression)));
132var root = new XElement("Project", itemGroup);
Legacy\GenerateStaticWebAssetsPropsFile50.cs (15)
64new XElement(SourceType, "Package"),
65new XElement(SourceId, element.GetMetadata(SourceId)),
66new XElement(ContentRoot, @$"$(MSBuildThisFileDirectory)..\{Normalize(PackagePathPrefix)}\"),
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)),
77new XElement(OriginalItemSpec, fullPathExpression)));
81var root = new XElement("Project", itemGroup);
NuGet.Commands (12)
RestoreCommand\Utility\BuildAssetsUtils.cs (12)
138new XElement(Namespace + "Warning",
251return new XElement(Namespace + itemName, new XAttribute("Include", path));
266new XElement(Namespace + "NuGetPackageId", packageId),
267new XElement(Namespace + "NuGetPackageVersion", packageVersion),
268new XElement(Namespace + "NuGetItemType", item.BuildAction),
269new XElement(Namespace + "Pack", false));
283entry.Add(new XElement(Namespace + "CopyToOutputDirectory", "PreserveNewest"));
285entry.Add(new XElement(Namespace + "TargetPath", outputPath));
291entry.Add(new XElement(Namespace + "DestinationSubDirectory", destinationSubDirectory + Path.DirectorySeparatorChar));
296entry.Add(new XElement(Namespace + "Private", privateFlag.ToString(CultureInfo.CurrentCulture)));
306entry.Add(new XElement(Namespace + "Link", linkPath));
331var itemGroup = new XElement(Namespace + group.RootName, group.Items);
NuGet.Configuration (3)
NuGet.Packaging (22)
PackageCreation\Authoring\PackageBuilder.cs (6)
1250new XElement(dc + "creator", string.Join(", ", Authors)),
1251new XElement(dc + "description", Description),
1252new XElement(dc + "identifier", Id),
1253new XElement(core + "version", Version!.ToString()),
1255new XElement(core + "keywords", ((IPackageMetadata)this).Tags),
1257new XElement(core + "lastModifiedBy", CreatorInfo())
PackageCreation\Xml\PackageMetadataXmlExtensions.cs (15)
40elem.Add(new XElement(ns + "id", metadata.Id));
50elem.Add(new XElement(ns + "developmentDependency", metadata.DevelopmentDependency));
56elem.Add(new XElement(ns + "requireLicenseAcceptance", metadata.RequireLicenseAcceptance));
85elem.Add(new XElement(ns + "serviceable", metadata.Serviceable));
202return new XElement(ns + NuspecUtility.FrameworkReference, new XAttribute(NuspecUtility.Name, frameworkReference.Name));
207return new XElement(ns + Reference, new XAttribute(File, reference));
231return new XElement(ns + "dependency", attributes);
241return new XElement(
258return new XElement(ns + "contentFiles",
273return new XElement(ns + Files, attributes.Where(xAtt => xAtt != null));
314return new XElement(ns + NuspecUtility.Repository, attributeList);
342return new XElement(ns + NuspecUtility.PackageType, attributes.Where(xAtt => xAtt != null));
360parent.Add(new XElement(ns + name, value));
372parent.Add(new XElement(ns + name, processed));
384parent.Add(new XElement(ns + name, processed));
Roslyn.Diagnostics.Analyzers (8)
Stress.ApiService (1)
System.Private.Xml.Linq (2)