723 references to Attribute
aspire (27)
Aspire.Cli.EndToEnd.Tests (11)
Aspire.Cli.Tests (169)
DotNet\DotNetAppHostNuGetConfigMergerTests.cs (48)
312Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://feed1.example");
313Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://feed2.example");
352Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://feed2.example");
356Assert.NotNull(psm.Elements("packageSource").First().Elements("package").FirstOrDefault(p => (string?)p.Attribute("pattern") == "Aspire.*"));
392packageSources.Elements("add").Select(e => (string?)e.Attribute("value")));
508.Select(static source => (string?)source.Attribute("value")));
630.Where(element => element.Elements("package").Any(package => package.Attribute("pattern")?.Value == "*"))
631.Select(element => element.Attribute("key")!.Value)
744Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "nuget" && (string?)e.Attribute("value") == "https://api.nuget.org/v3/index.json");
745Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "dotnet9" && (string?)e.Attribute("value") == "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json");
748Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://example.com/aspire-feed");
785Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "nuget.org");
786Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "custom");
789Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://example.com/aspire-daily");
837Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("key") == "nuget.org");
840Assert.Contains(packageSources.Elements("add"), e => (string?)e.Attribute("value") == "https://example.com/aspire-daily");
850var nugetMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "nuget.org");
852Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
855var aspireMapping = psm.Elements("packageSource").FirstOrDefault(ps => (string?)ps.Attribute("key") == "aspire-test");
857Assert.Contains(aspireMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Aspire*");
858Assert.Contains(aspireMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Microsoft.Extensions.ServiceDiscovery*");
904.FirstOrDefault(ps => (string?)ps.Attribute("key") == "nuget.org");
906Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
910.FirstOrDefault(ps => (string?)ps.Attribute("key") == "github");
912Assert.Contains(githubMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "myorg.*");
913Assert.Contains(githubMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "other");
914Assert.DoesNotContain(githubMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
961e => (string?)e.Attribute("value") == "C:\\Users\\user\\.aspire\\hives\\invalid-pr");
965e => (string?)e.Attribute("value") == "https://valid.example");
974ps => (string?)ps.Attribute("key") == "C:\\Users\\user\\.aspire\\hives\\invalid-pr");
978.FirstOrDefault(ps => (string?)ps.Attribute("key") == "https://valid.example");
980Assert.Contains(validExampleMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "ValidPkg*");
981Assert.DoesNotContain(validExampleMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "*");
985.FirstOrDefault(ps => (string?)ps.Attribute("key") == "aspire-test");
987Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Aspire*");
988Assert.Contains(nugetMapping.Elements("package"), p => (string?)p.Attribute("pattern") == "Microsoft.Extensions.ServiceDiscovery*");
991nugetMapping.Elements("package").Select(p => (string)p.Attribute("pattern")!));
1043e => string.Equals((string?)e.Attribute("value"), oldHive, StringComparison.Ordinal));
1045e => string.Equals((string?)e.Attribute("value"), newHive, StringComparison.Ordinal));
1049ps => string.Equals((string?)ps.Attribute("key"), oldHive, StringComparison.Ordinal));
1093e => string.Equals((string?)e.Attribute("value"), oldHive, StringComparison.Ordinal));
1459.Select(static source => source.Attribute("key")!.Value).Order(StringComparer.Ordinal));
1461.Where(static mapping => mapping.Attribute("key")?.Value == "aspire-staging")
1463.Select(static pattern => pattern.Attribute("pattern")!.Value);
1523.Select(static source => source.Attribute("key")!.Value));
1526.Select(static mapping => mapping.Attribute("key")!.Value) ?? []);
Projects\PrebuiltAppHostServerTests.cs (44)
340Assert.Equal("/path/to/MyIntegration.csproj", projectElements[0].Attribute("Include")?.Value);
346Assert.Equal("Aspire.Hosting", packageReference.Attribute("Include")?.Value);
347Assert.Equal("13.5.0", packageReference.Attribute("Version")?.Value);
371Assert.Equal("Aspire.Hosting", packageReference.Attribute("Include")?.Value);
372Assert.Equal("13.5.0", packageReference.Attribute("Version")?.Value);
376Assert.Equal("Aspire.Hosting.Redis", packageReference.Attribute("Include")?.Value);
377Assert.Equal("13.5.0", packageReference.Attribute("Version")?.Value);
392Assert.Equal("[13.5.0]", packageReference.Attribute("Version")?.Value);
690.Select(static source => source.Attribute("value")!.Value)
732Assert.Equal(restoreConfiguration.PackageSourceAlias, projectSource.Attribute("key")?.Value);
733Assert.Equal(feedDirectory.FullName, projectSource.Attribute("value")?.Value);
793.FirstOrDefault(element => element.Attribute("Name")?.Value == "_WriteAspireClosureManifest");
796Assert.Equal("Build", target.Attribute("AfterTargets")?.Value);
797Assert.Equal("ResolveLockFileCopyLocalFiles", target.Attribute("DependsOnTargets")?.Value);
1298.FirstOrDefault(a => string.Equals(a.Attribute("key")?.Value, "globalPackagesFolder", StringComparison.OrdinalIgnoreCase));
1300var gpfValue = gpf.Attribute("value")?.Value;
1358.FirstOrDefault(a => string.Equals(a.Attribute("key")?.Value, "globalPackagesFolder", StringComparison.OrdinalIgnoreCase));
1360var gpfValue = gpf.Attribute("value")?.Value;
1848.FirstOrDefault(a => string.Equals(a.Attribute("key")?.Value, "globalPackagesFolder", StringComparison.OrdinalIgnoreCase));
1852var gpfValue = gpf.Attribute("value")?.Value;
3234.Single(element => element.Attribute("key")?.Value == "globalPackagesFolder")
3235.Attribute("value")?
3271.Select(static source => source.Attribute("key")!.Value));
3280Assert.Equal("Aspire.Hosting", packageElement.Attribute("Include")?.Value);
3281Assert.Equal("13.4.0-pr.17141.gf142085f", packageElement.Attribute("Version")?.Value);
3285Assert.Equal("Aspire.Hosting.Redis", packageElement.Attribute("Include")?.Value);
3286Assert.Equal("13.4.0-pr.17141.gf142085f", packageElement.Attribute("Version")?.Value);
3633ambientConfig.Descendants("config").Elements("add").Single().Attribute("value")?.Value);
4195.Attribute("key")?
4204Assert.Equal("Aspire.Hosting", packageElement.Attribute("Include")?.Value);
4205Assert.Equal("[13.4.0-pr.17166.ga49d604d]", packageElement.Attribute("Version")?.Value);
4209Assert.Equal("Aspire.Hosting.Redis", packageElement.Attribute("Include")?.Value);
4210Assert.Equal("[13.4.0-pr.17166.ga49d604d]", packageElement.Attribute("Version")?.Value);
4214Assert.Equal("CommunityToolkit.Aspire.Hosting.Redis", packageElement.Attribute("Include")?.Value);
4215Assert.Equal("1.0.0", packageElement.Attribute("Version")?.Value);
4423Assert.Equal("Aspire.Hosting", packageReference.Attribute("Include")?.Value);
4424Assert.Equal("13.2.0", packageReference.Attribute("Version")?.Value);
4428Assert.Equal("Aspire.Hosting.Redis", packageReference.Attribute("Include")?.Value);
4429Assert.Equal("13.2.0", packageReference.Attribute("Version")?.Value);
5368element.Attribute("value")?.Value,
5370?.Attribute("key")
5373.Select(static element => element.Attribute("key")?.Value)
5397element.Attribute("key")?.Value,
5401.Select(static element => element.Attribute("pattern")?.Value)
Aspire.Dashboard (1)
Aspire.Dashboard.Tests (2)
Aspire.Hosting.Azure.Provisioning.Generators (1)
Aspire.Hosting.Maui.Tests (11)
Aspire.Hosting.Native.CodeGeneration (7)
Aspire.Hosting.RemoteHost (7)
Aspire.Templates.Tests (9)
Aspire.Tray.Tests (1)
dotnet-svcutil-lib (2)
GenerateDocumentationAndConfigFiles (19)
GenerateTemplateManifest (6)
ilc (9)
Infrastructure.Tests (36)
Pipelines\TrayBundleTests.cs (26)
128var dependencies = build.Attribute("DependsOnTargets")!.Value.Split(';', StringSplitOptions.TrimEntries);
130Assert.Equal("($(TargetRid.StartsWith('osx-')) or $(TargetRid.StartsWith('win-'))) and '$(SkipTrayBuild)' != 'true'", Target(project, "_PublishNativeTray").Attribute("Condition")!.Value);
131Assert.Equal("'$(SkipNativeBuild)' != 'true'", Target(project, "_PublishNativeCli").Attribute("Condition")!.Value);
136Assert.Contains("$(_CliPublishOutputArg)", Assert.Single(cliPublish.Elements("Exec")).Attribute("Command")!.Value);
143Assert.Equal("Publish", Target(project, "PackageTray").Attribute("AfterTargets")!.Value);
145Assert.Null(restore.Attribute("DependsOnTargets"));
146Assert.Contains(restore.Elements("Exec"), exec => exec.Attribute("Command")!.Value.StartsWith("ditto -xk", StringComparison.Ordinal));
147Assert.Contains(restore.Elements("Exec"), exec => exec.Attribute("Command")!.Value.Contains("anchor apple generic", StringComparison.Ordinal));
152.Select(element => element.Attribute("Include")!.Value)
156Assert.Equal("$(TraySigningArchive)", input.Attribute("Include")!.Value);
159Assert.Equal(input.Attribute("Include")!.Value, notarization.Attribute("Include")!.Value);
163Assert.Equal("ValidateTraySigning", signTray.Attribute("DependsOnTargets")!.Value);
165signTray.Elements("SignFiles").Select(task => task.Attribute("Files")!.Value));
225Assert.Equal("_RunCreateLayout", verification.Attribute("AfterTargets")!.Value);
226Assert.Equal("$(TargetRid.StartsWith('osx-'))", verification.Attribute("Condition")!.Value);
227var command = Assert.Single(verification.Elements("Exec")).Attribute("Command")!.Value;
234Assert.Contains(solution.Descendants("Project"), entry => entry.Attribute("Path")?.Value == testProjectPath);
270exec => Assert.Contains("$(_OfficialBuildIdArg)", exec.Attribute("Command")!.Value));
350element => element.Attribute("Include")?.Value == "aspire-tray.exe").Attribute("CertificateName")!.Value);
352element => element.Attribute("Include")?.Value == @"$(ArtifactsBinDir)Aspire.Tray.Windows\**\publish\aspire-tray.exe");
355Assert.Equal("_RunCreateLayout", verify.Attribute("AfterTargets")!.Value);
356Assert.Equal("$(TargetRid.StartsWith('win-'))", verify.Attribute("Condition")!.Value);
358exec => Assert.Contains("verify-windows-tray-payload.ps1", exec.Attribute("Command")!.Value));
470=> Assert.Single(project.Descendants("Target"), target => target.Attribute("Name")?.Value == name);
Microsoft.AspNetCore.DataProtection (18)
Microsoft.AspNetCore.OpenApi.SourceGenerators (9)
Microsoft.AspNetCore.Rewrite (15)
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Microsoft.Build.Tasks.Core (12)
Microsoft.CodeAnalysis (1)
Microsoft.CodeAnalysis.Analyzers (20)
Microsoft.CodeAnalysis.AnalyzerUtilities (19)
Microsoft.CodeAnalysis.CodeStyle (16)
Microsoft.CodeAnalysis.CSharp (4)
Microsoft.CodeAnalysis.Features (3)
Microsoft.CodeAnalysis.NetAnalyzers (3)
Microsoft.CodeAnalysis.ResxSourceGenerator (20)
Microsoft.CodeAnalysis.Workspaces (19)
Microsoft.DotNet.Arcade.Sdk (3)
Microsoft.DotNet.Build.Manifest (1)
Microsoft.DotNet.Build.Tasks.Installers (8)
Microsoft.DotNet.Build.Tasks.Packaging (2)
Microsoft.DotNet.Build.Tasks.VisualStudio (2)
Microsoft.DotNet.Build.Tasks.Workloads (1)
Microsoft.DotNet.MacOsPkg.Core (1)
Microsoft.DotNet.NuGetRepack.Tasks (3)
Microsoft.DotNet.SourceBuild.Tasks (10)
Microsoft.DotNet.XliffTasks (22)
Microsoft.Extensions.FileProviders.Embedded (1)
Microsoft.Maui.Resizetizer (21)
Microsoft.NET.Build.Extensions.Tasks (3)
Microsoft.NET.Build.Tasks (26)
Microsoft.NET.ProjectData (9)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (3)
Microsoft.NET.Sdk.Publish.Tasks (8)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (4)
Microsoft.TestPlatform.TestHostRuntimeProvider (2)
NuGet.Configuration (12)
NuGet.PackageManagement (4)
NuGet.Packaging (31)
NuGet.Protocol (9)
Roslyn.Diagnostics.Analyzers (19)
sdk-tasks (12)
System.ComponentModel.TypeConverter (1)
System.Private.CoreLib.Generators (21)
System.Private.Xml.Linq (6)