Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge latest Library.Template #1270

Merged
merged 38 commits into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
6269161
Bump powershell from 7.3.8 to 7.3.9 (#227)
dependabot[bot] Oct 30, 2023
2e6c239
Bump xunit from 2.5.3 to 2.6.1 (#228)
dependabot[bot] Nov 6, 2023
4337ca1
Ignore `dotnet-format` v9 versions
AArnott Nov 8, 2023
5a0cd15
Bump Microsoft.NET.Test.Sdk from 17.7.2 to 17.8.0 (#229)
dependabot[bot] Nov 13, 2023
0fcb1d8
Apply Directory.Packages.props in Apply-Template.ps1
AArnott Nov 13, 2023
e678b45
Bump to the .NET 8.0.100 SDK
AArnott Nov 15, 2023
966c44a
Merge pull request #230 from AArnott/sdkUpdate8
AArnott Nov 15, 2023
d1ffce8
Bump xunit from 2.6.1 to 2.6.2 (#234)
dependabot[bot] Nov 20, 2023
ccd2c89
Bump Microsoft.SourceLink.GitHub from 1.1.1 to 8.0.0 (#232)
dependabot[bot] Nov 20, 2023
4289461
Bump powershell from 7.3.9 to 7.4.0 (#231)
dependabot[bot] Nov 20, 2023
7e872d3
Bump xunit.runner.visualstudio from 2.5.3 to 2.5.4 (#233)
dependabot[bot] Nov 20, 2023
5da8083
Validate formatted code in builds
AArnott Nov 22, 2023
1749a96
Merge pull request #235 from AArnott/dotnetFormat
AArnott Nov 22, 2023
c489050
Enable auto-format on save in VS and VS Code
AArnott Nov 22, 2023
41f6d27
Remove `dotnet-format` as a tool
AArnott Nov 22, 2023
27eb2a1
Merge pull request #236 from AArnott/removedotnet-format
AArnott Nov 22, 2023
ac3f1df
Make symbolic link failures more detectable
AArnott Nov 29, 2023
10eb110
Merge remote-tracking branch 'origin/main' into microbuild
AArnott Nov 30, 2023
d0e3bf5
Update TeamName comment
AArnott Nov 30, 2023
4177150
Add xml header to msbuild files
AArnott Nov 30, 2023
140a33b
Update Microsoft.SourceLink.AzureRepos.Git to 8.0.0
AArnott Nov 30, 2023
db44402
Stop VS Code from wrapping xml files
AArnott Dec 1, 2023
17bed25
Merge branch 'main' into microbuild
AArnott Dec 1, 2023
3a5c8f0
Add dotnet_separate_import_directive_groups to .editorconfig
AArnott Dec 11, 2023
f8f3f9e
Bump xunit from 2.6.2 to 2.6.3 (#239)
dependabot[bot] Dec 12, 2023
20c7541
Bump dotnet-coverage from 17.9.3 to 17.9.5 (#238)
dependabot[bot] Dec 12, 2023
37705a8
Bump xunit.runner.visualstudio from 2.5.4 to 2.5.5 (#237)
dependabot[bot] Dec 12, 2023
1311029
Merge branch 'main' into microbuild
AArnott Dec 13, 2023
5af59ec
Include SBOM in nuget packages
AArnott Dec 13, 2023
4b35644
Fix `Install-NuGetPackage` exit code check
AArnott Dec 13, 2023
4f229af
Merge remote-tracking branch 'libtemplate/microbuild' into libtemplat…
AArnott Jan 5, 2024
248800d
Bump Xunit.Combinatorial from 1.5.25 to 1.6.24
dependabot[bot] Sep 11, 2023
67fed58
Bump System.Drawing.Common from 7.0.0 to 8.0.0
dependabot[bot] Nov 20, 2023
7ea5ed8
Fix tests
AArnott Jan 6, 2024
e268bc5
Fix build break
AArnott Jan 6, 2024
f82df21
Merge branch 'main' into libtemplateUpdate
AArnott Jan 6, 2024
30e1048
Fix whitespace issues
AArnott Jan 6, 2024
52a1e17
Disable `dotnet format` check
AArnott Jan 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,13 @@
"isRoot": true,
"tools": {
"powershell": {
"version": "7.3.8",
"version": "7.4.0",
"commands": [
"pwsh"
]
},
"dotnet-format": {
"version": "5.1.250801",
"commands": [
"dotnet-format"
]
},
"dotnet-coverage": {
"version": "17.9.3",
"version": "17.9.5",
"commands": [
"dotnet-coverage"
]
Expand All @@ -27,4 +21,4 @@
]
}
}
}
}
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions
FROM mcr.microsoft.com/dotnet/sdk:7.0.401-jammy
FROM mcr.microsoft.com/dotnet/sdk:8.0.100-jammy

# Installing mono makes `dotnet test` work without errors even for net472.
# But installing it takes a long time, so it's excluded by default.
Expand Down
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ indent_size = 4
[*.{cs,vb}]
# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false
dotnet_style_qualification_for_field = true:warning
dotnet_style_qualification_for_property = true:warning
dotnet_style_qualification_for_method = true:warning
Expand Down
3 changes: 0 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ updates:
schedule:
interval: weekly
ignore:
# This package has unlisted versions on nuget.org that are not supported. Avoid them.
- dependency-name: dotnet-format
versions: ["6.x", "7.x", "8.x"]
- dependency-name: Microsoft.CodeAnalysis* # We intentionally target older VS versions.
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@
"omnisharp.enableEditorConfigSupport": true,
"omnisharp.enableRoslynAnalyzers": true,
"dotnet.completion.showCompletionItemsFromUnimportedNamespaces": true,
"dotnet.defaultSolution": "Microsoft.VisualStudio.Threading.sln"
"dotnet.defaultSolution": "Microsoft.VisualStudio.Threading.sln",
"editor.formatOnSave": true,
"[xml]": {
"editor.wordWrap": "off"
}
}
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<RepoRootPath>$(MSBuildThisFileDirectory)</RepoRootPath>
<BaseIntermediateOutputPath>$(RepoRootPath)obj\$([MSBuild]::MakeRelative($(RepoRootPath), $(MSBuildProjectDirectory)))\</BaseIntermediateOutputPath>
<BaseOutputPath Condition=" '$(BaseOutputPath)' == '' ">$(RepoRootPath)bin\$(MSBuildProjectName)\</BaseOutputPath>
<PackageOutputPath>$(RepoRootPath)bin\Packages\$(Configuration)\NuGet\</PackageOutputPath>
<LangVersion>11</LangVersion>
<LangVersion>12</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<AnalysisLevel>latest</AnalysisLevel>
Expand Down
3 changes: 3 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<!-- Workaround https://github.com/dotnet/wpf/issues/1718 -->
Expand All @@ -8,4 +9,6 @@
<!-- Avoid compile error about missing namespace when combining ImplicitUsings with .NET Framework target frameworks. -->
<Using Remove="System.Net.Http" Condition="'$(TargetFrameworkIdentifier)'=='.NETFramework'" />
</ItemGroup>

<Import Project="azure-pipelines\NuGetSbom.targets" Condition="'$(IsPackable)'!='false'" />
</Project>
13 changes: 7 additions & 6 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!-- https://learn.microsoft.com/nuget/consume-packages/central-package-management -->
<PropertyGroup>
Expand All @@ -24,7 +25,7 @@
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.CodeFix.Testing.XUnit" Version="$(CodefixTestingVersion)" />
<PackageVersion Include="Microsoft.Diagnostics.Runtime.Utilities" Version="$(MicrosoftDiagnosticsRuntimeVersion)" />
<PackageVersion Include="Microsoft.Diagnostics.Runtime" Version="$(MicrosoftDiagnosticsRuntimeVersion)" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="Microsoft.VisualStudio.Internal.MicroBuild.NonShipping" Version="$(MicroBuildVersion)" />
<PackageVersion Include="Microsoft.VisualStudio.Interop" Version="17.4.33103.184" />
<PackageVersion Include="Microsoft.VisualStudio.Shell.15.0" Version="17.4.33103.184" />
Expand All @@ -34,16 +35,16 @@
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.188-beta" />
<PackageVersion Include="Nullable" Version="1.3.1" />
<PackageVersion Include="System.Collections.Immutable" Version="6.0.0" />
<PackageVersion Include="System.Drawing.Common" Version="7.0.0" />
<PackageVersion Include="System.Drawing.Common" Version="8.0.0" />
<PackageVersion Include="System.Memory" Version="4.5.5" />
<PackageVersion Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="7.0.0" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
<PackageVersion Include="xunit" Version="2.5.3" />
<PackageVersion Include="xunit" Version="2.6.3" />
<PackageVersion Include="xunit.abstractions" Version="2.0.3" />
<PackageVersion Include="Xunit.Combinatorial" Version="1.5.25" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.3" />
<PackageVersion Include="Xunit.Combinatorial" Version="1.6.24" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.5" />
<PackageVersion Include="Xunit.SkippableFact" Version="1.4.13" />
<PackageVersion Include="Xunit.StaFact" Version="1.1.11" />
</ItemGroup>
Expand All @@ -56,6 +57,6 @@
<GlobalPackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.507" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion azure-pipelines/Install-NuGetPackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ try {

if ($PSCmdlet.ShouldProcess($PackageId, 'nuget install')) {
$p = Start-Process $nugetPath $nugetArgs -NoNewWindow -Wait -PassThru
if ($p.ExitCode -ne 0) { throw }
if ($null -ne $p.ExitCode -and $p.ExitCode -ne 0) { throw }
}

# Provide the path to the installed package directory to our caller.
Expand Down
12 changes: 12 additions & 0 deletions azure-pipelines/NuGetSbom.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project>
<PropertyGroup>
<GenerateSBOMThisProject>true</GenerateSBOMThisProject>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);IncludeSbomInNupkg</TargetsForTfmSpecificBuildOutput>
</PropertyGroup>

<Target Name="IncludeSbomInNupkg">
<ItemGroup>
<BuildOutputInPackage Include="@(SbomOutput)" />
</ItemGroup>
</Target>
</Project>
6 changes: 6 additions & 0 deletions azure-pipelines/artifacts/_stage_all.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ function Create-SymbolicLink {
} else {
cmd /c "mklink `"$Link`" `"$Target`"" | Out-Null
}

if ($LASTEXITCODE -ne 0) {
# Windows requires admin privileges to create symbolic links
# unless Developer Mode has been enabled.
throw "Failed to create symbolic link at $Link that points to $Target"
}
}

# Stage all artifacts
Expand Down
3 changes: 3 additions & 0 deletions azure-pipelines/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ jobs:
- template: dotnet.yml
parameters:
RunTests: ${{ parameters.RunTests }}
- script: dotnet format --verify-no-changes --no-restore
displayName: 💅 Verify formatted code
enabled: false

- job: macOS
condition: and(${{ parameters.includeMacOS }}, ne(variables['OptProf'], 'true'))
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/variables/TeamName.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This value is used to craft a \\cpvsbuild\drops path for symbol archival.
# This value is used as an input to the MicroBuild Insert VS task.
'VS IDE'
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.401",
"version": "8.0.100",
"rollForward": "patch",
"allowPrerelease": false
},
Expand Down
Empty file modified init.ps1
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions settings.VisualStudio.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"textEditor.codeCleanup.profile": "profile1"
}
1 change: 1 addition & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!-- Include and reference README in nuget package, if a README is in the project directory. -->
<PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)AssemblyInfo.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ internal static async Task<ImmutableArray<string>> ReadAdditionalFilesAsync(IEnu
}

IEnumerable<TextDocument>? docs = from doc in additionalFiles.OrderBy(x => x.FilePath, StringComparer.Ordinal)
let fileName = Path.GetFileName(doc.Name)
where fileNamePattern.IsMatch(fileName)
select doc;
let fileName = Path.GetFileName(doc.Name)
where fileNamePattern.IsMatch(fileName)
select doc;
ImmutableArray<string>.Builder? result = ImmutableArray.CreateBuilder<string>();
foreach (TextDocument? doc in docs)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ private void AnalyzeNode(OperationAnalysisContext context)
if (firstArgExpression is IDelegateCreationOperation { Target: IAnonymousFunctionOperation anonFunc })
{
System.Collections.Generic.IEnumerable<IInvocationOperation>? problems = from invocation in anonFunc.Descendants().OfType<IInvocationOperation>()
let invokedSymbol = invocation.TargetMethod
where invokedSymbol is object && CommonInterest.SyncBlockingMethods.Any(m => m.Method.IsMatch(invokedSymbol))
select invocation;
let invokedSymbol = invocation.TargetMethod
where invokedSymbol is object && CommonInterest.SyncBlockingMethods.Any(m => m.Method.IsMatch(invokedSymbol))
select invocation;
IInvocationOperation? firstProblem = problems.FirstOrDefault();
if (firstProblem is object)
{
Expand Down
8 changes: 4 additions & 4 deletions src/Microsoft.VisualStudio.Threading/AsyncLazy`1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ public class AsyncLazy<T>
private readonly object syncObject = new object();

/// <summary>
/// The unique instance identifier.
/// An optional means to avoid deadlocks when synchronous APIs are called that must invoke async methods in user code.
/// </summary>
private AsyncLocal<object>? recursiveFactoryCheck;
private readonly JoinableTaskFactory? jobFactory;

/// <summary>
/// An optional means to avoid deadlocks when synchronous APIs are called that must invoke async methods in user code.
/// The unique instance identifier.
/// </summary>
private readonly JoinableTaskFactory? jobFactory;
private AsyncLocal<object>? recursiveFactoryCheck;

/// <summary>
/// The function to invoke to produce the task.
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.VisualStudio.Threading/TplExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public static void ApplyResultTo<T>(this Task<T> task, TaskCompletionSource<T> t
/// <param name="task">The task whose completion should be applied to another.</param>
/// <param name="tcs">The task that should receive the completion status.</param>
public static void ApplyResultTo<T>(this Task task, TaskCompletionSource<T> tcs)
//// where T : defaultable
//// where T : defaultable
{
Requires.NotNull(task, nameof(task));
Requires.NotNull(tcs, nameof(tcs));
Expand Down
1 change: 1 addition & 0 deletions test/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove($(MSBuildThisFile), $(MSBuildThisFileDirectory)..))" />

Expand Down
1 change: 1 addition & 0 deletions test/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove($(MSBuildThisFile), $(MSBuildThisFileDirectory)..))" />
</Project>
4 changes: 2 additions & 2 deletions test/IsolatedTestHost/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="xunit.core" publicKeyToken="8d05b1bb7a6fdb6c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.5.3.0" newVersion="2.5.3.0" />
<bindingRedirect oldVersion="0.0.0.0-2.6.3.0" newVersion="2.6.3.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="xunit.execution.desktop" publicKeyToken="8d05b1bb7a6fdb6c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.5.3.0" newVersion="2.5.3.0" />
<bindingRedirect oldVersion="0.0.0.0-2.6.3.0" newVersion="2.6.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ public class Test : CSharpCodeFixVerifier<VSTHRD002UseJtfRunAnalyzer, EmptyCodeF
protected override IEnumerable<DiagnosticAnalyzer> GetDiagnosticAnalyzers()
{
IEnumerable<DiagnosticAnalyzer>? analyzers = from type in typeof(VSTHRD002UseJtfRunAnalyzer).Assembly.GetTypes()
where type.GetCustomAttributes(typeof(DiagnosticAnalyzerAttribute), true).Any()
select (DiagnosticAnalyzer?)Activator.CreateInstance(type) ?? throw Assumes.Fail("Unable to instantiate the analyzer");
where type.GetCustomAttributes(typeof(DiagnosticAnalyzerAttribute), true).Any()
select (DiagnosticAnalyzer?)Activator.CreateInstance(type) ?? throw Assumes.Fail("Unable to instantiate the analyzer");
return analyzers.ToImmutableArray();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ public void SetReturnsBeforeInlinedContinuations()
.ContinueWith(
delegate
{
// Arrange to synchronously block the continuation until Set() has returned,
// which would deadlock if Set does not return until inlined continuations complete.
Assert.True(setReturned.Wait(AsyncDelay));
// Arrange to synchronously block the continuation until Set() has returned,
// which would deadlock if Set does not return until inlined continuations complete.
Assert.True(setReturned.Wait(AsyncDelay));
},
TaskContinuationOptions.ExecuteSynchronously);
this.evt.Set();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4512,7 +4512,7 @@ await Task.WhenAll(
await secondLockInQueue.SetAsync();
}),
secondLockObtained.Task);
});
});
}

private Task UncontestedTopLevelLocksAllocFreeHelperAsync(Func<AsyncReaderWriterLock.Awaitable> locker, bool yieldingLock)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@ public void GetHangReportProducesDgmlWithNamedJoinableCollections()
this.Logger.WriteLine(report.Content);
var dgml = XDocument.Parse(report.Content);
IEnumerable<string>? collectionLabels = from node in dgml.Root!.Element(XName.Get("Nodes", DgmlNamespace))!.Elements()
where node.Attribute(XName.Get("Category"))?.Value == "Collection"
select node.Attribute(XName.Get("Label"))?.Value;
where node.Attribute(XName.Get("Category"))?.Value == "Collection"
select node.Attribute(XName.Get("Label"))?.Value;
Assert.Contains(collectionLabels, label => label == jtcName);
return Task.CompletedTask;
});
Expand All @@ -433,8 +433,8 @@ public void GetHangReportProducesDgmlWithMethodNameRequestingMainThread()
this.Logger.WriteLine(report.Content);
var dgml = XDocument.Parse(report.Content);
IEnumerable<string>? collectionLabels = from node in dgml.Root!.Element(XName.Get("Nodes", DgmlNamespace))!.Elements()
where node.Attribute(XName.Get("Category"))?.Value == "Task"
select node.Attribute(XName.Get("Label"))?.Value;
where node.Attribute(XName.Get("Category"))?.Value == "Task"
select node.Attribute(XName.Get("Label"))?.Value;
Assert.Contains(collectionLabels, label => label.Contains(nameof(this.GetHangReportProducesDgmlWithMethodNameRequestingMainThread)));
}

Expand All @@ -456,8 +456,8 @@ public void GetHangReportProducesDgmlWithMethodNameYieldingOnMainThread()
this.Logger.WriteLine(report.Content);
var dgml = XDocument.Parse(report.Content);
IEnumerable<string>? collectionLabels = from node in dgml.Root!.Element(XName.Get("Nodes", DgmlNamespace))!.Elements()
where node.Attribute(XName.Get("Category"))?.Value == "Task"
select node.Attribute(XName.Get("Label"))?.Value;
where node.Attribute(XName.Get("Category"))?.Value == "Task"
select node.Attribute(XName.Get("Label"))?.Value;
Assert.Contains(collectionLabels, label => label.Contains(nameof(this.YieldingMethodAsync)));
});
}
Expand Down