瀏覽代碼

Update testing analyzers (#59516)

Sébastien Ros 1 年之前
父節點
當前提交
1da271238f

+ 2 - 2
eng/Dependencies.props

@@ -66,8 +66,8 @@ and are generated based on the last package release.
     <LatestPackageReference Include="Microsoft.Extensions.Diagnostics.Testing" />
     <LatestPackageReference Include="Microsoft.Extensions.TimeProvider.Testing" />
     <LatestPackageReference Include="Microsoft.Win32.Registry" />
-    <LatestPackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" />
-    <LatestPackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" />
+    <LatestPackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" />
+    <LatestPackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" />
     <LatestPackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" />
     <LatestPackageReference Include="Microsoft.OpenApi" />
     <LatestPackageReference Include="Microsoft.OpenApi.Readers" />

+ 1 - 0
eng/SourceBuildPrebuiltBaseline.xml

@@ -18,6 +18,7 @@
     <UsagePattern IdentityGlob="System.Composition.Runtime/*8.0.0*" />
     <UsagePattern IdentityGlob="System.Composition.TypedParts/*8.0.0*" />
     <UsagePattern IdentityGlob="System.Security.Cryptography.Pkcs/5.0.*" />
+    <UsagePattern IdentityGlob="System.Security.Cryptography.Pkcs/6.0.*" />
 
     <!-- These are what the analyzers are built against. They are overridden in full source build.
          It may be possible to generate SBRPs -->

+ 4 - 0
eng/Version.Details.xml

@@ -206,6 +206,10 @@
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Sha>040cbe276907174316e2cc07b35814b3069874a6</Sha>
     </Dependency>
+    <Dependency Name="System.Formats.Asn1" Version="10.0.0-alpha.1.24617.3">
+      <Uri>https://github.com/dotnet/runtime</Uri>
+      <Sha>040cbe276907174316e2cc07b35814b3069874a6</Sha>
+    </Dependency>
     <Dependency Name="System.IO.Pipelines" Version="10.0.0-alpha.1.24617.3">
       <Uri>https://github.com/dotnet/runtime</Uri>
       <Sha>040cbe276907174316e2cc07b35814b3069874a6</Sha>

+ 5 - 5
eng/Versions.props

@@ -117,6 +117,7 @@
     <SystemDiagnosticsDiagnosticSourceVersion>10.0.0-alpha.1.24617.3</SystemDiagnosticsDiagnosticSourceVersion>
     <SystemDiagnosticsEventLogVersion>10.0.0-alpha.1.24617.3</SystemDiagnosticsEventLogVersion>
     <SystemDirectoryServicesProtocolsVersion>10.0.0-alpha.1.24617.3</SystemDirectoryServicesProtocolsVersion>
+    <SystemFormatsAsn1Version>10.0.0-alpha.1.24617.3</SystemFormatsAsn1Version>
     <SystemIOPipelinesVersion>10.0.0-alpha.1.24617.3</SystemIOPipelinesVersion>
     <SystemNetHttpJsonVersion>10.0.0-alpha.1.24617.3</SystemNetHttpJsonVersion>
     <SystemNetHttpWinHttpHandlerVersion>10.0.0-alpha.1.24617.3</SystemNetHttpWinHttpHandlerVersion>
@@ -208,7 +209,6 @@
     <MicrosoftExtensionsDiagnosticAdapterVersion>5.0.0-preview.3.20215.2</MicrosoftExtensionsDiagnosticAdapterVersion>
     <!-- Build tool dependencies -->
     <MicrosoftVSSDKBuildToolsVersion>15.9.3032</MicrosoftVSSDKBuildToolsVersion>
-    <RepoTasksSystemSecurityCryptographyXmlVersion>8.0.0</RepoTasksSystemSecurityCryptographyXmlVersion>
     <!-- Stable dotnet/corefx packages no longer updated for .NET Core 3 -->
     <MicrosoftCSharpVersion>4.7.0</MicrosoftCSharpVersion>
     <MicrosoftWin32RegistryVersion>5.0.0</MicrosoftWin32RegistryVersion>
@@ -256,7 +256,7 @@
     -->
     <Analyzer_MicrosoftCodeAnalysisCSharpVersion>3.3.1</Analyzer_MicrosoftCodeAnalysisCSharpVersion>
     <Analyzer_MicrosoftCodeAnalysisCSharpWorkspacesVersion>3.3.1</Analyzer_MicrosoftCodeAnalysisCSharpWorkspacesVersion>
-    <!-- Pin the version of the M.CA dependencies that we utilize with a cutom version property $(MicrosoftCodeAnalysisVersion_LatestVS) to avoid automatically
+    <!-- Pin the version of the M.CA dependencies that we utilize with a custom version property $(MicrosoftCodeAnalysisVersion_LatestVS) to avoid automatically
     consuming the newest version of the packages when using the $(MicrosoftCodeAnalysisCSharpVersion) properties in source-build. -->
     <MicrosoftCodeAnalysisVersion_LatestVS>4.13.0-3.24613.7</MicrosoftCodeAnalysisVersion_LatestVS>
     <MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>4.13.0-3.24613.7</MicrosoftCodeAnalysisExternalAccessAspNetCoreVersion>
@@ -264,9 +264,9 @@
     <MicrosoftCodeAnalysisCSharpVersion>4.13.0-3.24613.7</MicrosoftCodeAnalysisCSharpVersion>
     <MicrosoftCodeAnalysisCSharpWorkspacesVersion>4.13.0-3.24613.7</MicrosoftCodeAnalysisCSharpWorkspacesVersion>
     <MicrosoftCodeAnalysisPublicApiAnalyzersVersion>3.3.3</MicrosoftCodeAnalysisPublicApiAnalyzersVersion>
-    <MicrosoftCodeAnalysisCSharpAnalyzerTestingXUnitVersion>1.1.2-beta1.24121.1</MicrosoftCodeAnalysisCSharpAnalyzerTestingXUnitVersion>
-    <MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>1.1.2-beta1.24121.1</MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>
-    <MicrosoftCodeAnalysisCSharpSourceGeneratorsTestingVersion>1.1.2-beta1.24121.1</MicrosoftCodeAnalysisCSharpSourceGeneratorsTestingVersion>
+    <MicrosoftCodeAnalysisCSharpAnalyzerTestingVersion>1.1.2</MicrosoftCodeAnalysisCSharpAnalyzerTestingVersion>
+    <MicrosoftCodeAnalysisCSharpCodeFixTestingVersion>1.1.2</MicrosoftCodeAnalysisCSharpCodeFixTestingVersion>
+    <MicrosoftCodeAnalysisCSharpSourceGeneratorsTestingVersion>1.1.2</MicrosoftCodeAnalysisCSharpSourceGeneratorsTestingVersion>
     <MicrosoftCssParserVersion>1.0.0-20230414.1</MicrosoftCssParserVersion>
     <MicrosoftIdentityModelLoggingVersion>$(IdentityModelVersion)</MicrosoftIdentityModelLoggingVersion>
     <MicrosoftIdentityModelProtocolsOpenIdConnectVersion>$(IdentityModelVersion)</MicrosoftIdentityModelProtocolsOpenIdConnectVersion>

+ 2 - 2
eng/tools/RepoTasks/RepoTasks.csproj

@@ -35,8 +35,8 @@
     <PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildFrameworkVersion)" />
     <PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTasksCoreVersion)" />
     <PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCoreVersion)" />
-    <!-- Manually updated version from 6.0.0 to address CVE-2023-29331 -->
-    <PackageReference Include="System.Security.Cryptography.Xml" Version="$(RepoTasksSystemSecurityCryptographyXmlVersion)" />
+    <!-- Manually updated version to address CVE-2024-38095 -->
+    <PackageReference Include="System.Formats.Asn1" Version="$(SystemFormatsAsn1Version)" />
   </ItemGroup>
 
   <ItemGroup Condition="'$(TargetFramework)' == 'net472'">

+ 1 - 1
src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj

@@ -8,7 +8,7 @@
 
   <ItemGroup>
     <ProjectReference Include="$(RepoRoot)src\Analyzers\Analyzers\src\Microsoft.AspNetCore.Analyzers.csproj" />
-    <Reference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" />
+    <Reference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" />
     <Reference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" />
     <Reference Include="Microsoft.Extensions.DependencyModel" />
 

+ 2 - 2
src/Analyzers/Analyzers/test/StartupCSharpAnalyzerTest.cs

@@ -5,11 +5,11 @@ using System.Collections.Immutable;
 using Microsoft.CodeAnalysis;
 using Microsoft.CodeAnalysis.CSharp.Testing;
 using Microsoft.CodeAnalysis.Diagnostics;
-using Microsoft.CodeAnalysis.Testing.Verifiers;
+using Microsoft.CodeAnalysis.Testing;
 
 namespace Microsoft.AspNetCore.Analyzers;
 
-internal sealed class StartupCSharpAnalyzerTest : CSharpAnalyzerTest<StartupAnalyzer, XUnitVerifier>
+internal sealed class StartupCSharpAnalyzerTest : CSharpAnalyzerTest<StartupAnalyzer, DefaultVerifier>
 {
     public StartupCSharpAnalyzerTest(StartupAnalyzer analyzer, ImmutableArray<MetadataReference> metadataReferences)
     {

+ 2 - 2
src/Framework/AspNetCoreAnalyzers/test/Microsoft.AspNetCore.App.Analyzers.Test.csproj

@@ -23,8 +23,8 @@
     <Reference Include="Microsoft.AspNetCore.Mvc" />
     <Reference Include="Microsoft.AspNetCore.Http.Results" />
     <Reference Include="Microsoft.AspNetCore.RateLimiting" />
-    <Reference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" />
-    <Reference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" />
+    <Reference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" />
+    <Reference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" />
     <Reference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" />
   </ItemGroup>
 

+ 4 - 5
src/Framework/AspNetCoreAnalyzers/test/Verifiers/CSharpAnalyzerVerifier.cs

@@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis;
 using Microsoft.CodeAnalysis.CSharp.Testing;
 using Microsoft.CodeAnalysis.Diagnostics;
 using Microsoft.CodeAnalysis.Testing;
-using Microsoft.CodeAnalysis.Testing.Verifiers;
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.AspNetCore.Hosting;
 
@@ -20,20 +19,20 @@ public static partial class CSharpAnalyzerVerifier<TAnalyzer>
 {
     /// <inheritdoc cref="AnalyzerVerifier{TAnalyzer, TTest, TVerifier}.Diagnostic()"/>
     public static DiagnosticResult Diagnostic()
-        => CSharpAnalyzerVerifier<TAnalyzer, XUnitVerifier>.Diagnostic();
+        => CSharpAnalyzerVerifier<TAnalyzer, DefaultVerifier>.Diagnostic();
 
     /// <inheritdoc cref="AnalyzerVerifier{TAnalyzer, TTest, TVerifier}.Diagnostic(string)"/>
     public static DiagnosticResult Diagnostic(string diagnosticId)
-        => CSharpAnalyzerVerifier<TAnalyzer, XUnitVerifier>.Diagnostic(diagnosticId);
+        => CSharpAnalyzerVerifier<TAnalyzer, DefaultVerifier>.Diagnostic(diagnosticId);
 
     /// <inheritdoc cref="AnalyzerVerifier{TAnalyzer, TTest, TVerifier}.Diagnostic(DiagnosticDescriptor)"/>
     public static DiagnosticResult Diagnostic(DiagnosticDescriptor descriptor)
-        => CSharpAnalyzerVerifier<TAnalyzer, XUnitVerifier>.Diagnostic(descriptor);
+        => CSharpAnalyzerVerifier<TAnalyzer, DefaultVerifier>.Diagnostic(descriptor);
 
     /// <inheritdoc cref="AnalyzerVerifier{TAnalyzer, TTest, TVerifier}.VerifyAnalyzerAsync(string, DiagnosticResult[])"/>
     public static async Task VerifyAnalyzerAsync(string source, params DiagnosticResult[] expected)
     {
-        var test = new CSharpAnalyzerTest<TAnalyzer, XUnitVerifier>
+        var test = new CSharpAnalyzerTest<TAnalyzer, DefaultVerifier>
         {
             TestCode = source.ReplaceLineEndings(),
             // We need to set the output type to an exe to properly

+ 5 - 6
src/Framework/AspNetCoreAnalyzers/test/Verifiers/CSharpCodeFixVerifier.cs

@@ -6,7 +6,6 @@ using Microsoft.CodeAnalysis.CodeFixes;
 using Microsoft.CodeAnalysis.CSharp.Testing;
 using Microsoft.CodeAnalysis.Diagnostics;
 using Microsoft.CodeAnalysis.Testing;
-using Microsoft.CodeAnalysis.Testing.Verifiers;
 
 namespace Microsoft.AspNetCore.Analyzers.Verifiers;
 
@@ -16,20 +15,20 @@ public static partial class CSharpCodeFixVerifier<TAnalyzer, TCodeFix>
 {
     /// <inheritdoc cref="CodeFixVerifier{TAnalyzer, TCodeFix, TTest, TVerifier}.Diagnostic()"/>
     public static DiagnosticResult Diagnostic()
-        => CSharpCodeFixVerifier<TAnalyzer, TCodeFix, XUnitVerifier>.Diagnostic();
+        => CSharpCodeFixVerifier<TAnalyzer, TCodeFix, DefaultVerifier>.Diagnostic();
 
     /// <inheritdoc cref="CodeFixVerifier{TAnalyzer, TCodeFix, TTest, TVerifier}.Diagnostic(string)"/>
     public static DiagnosticResult Diagnostic(string diagnosticId)
-        => CSharpCodeFixVerifier<TAnalyzer, TCodeFix, XUnitVerifier>.Diagnostic(diagnosticId);
+        => CSharpCodeFixVerifier<TAnalyzer, TCodeFix, DefaultVerifier>.Diagnostic(diagnosticId);
 
     /// <inheritdoc cref="CodeFixVerifier{TAnalyzer, TCodeFix, TTest, TVerifier}.Diagnostic(DiagnosticDescriptor)"/>
     public static DiagnosticResult Diagnostic(DiagnosticDescriptor descriptor)
-        => CSharpCodeFixVerifier<TAnalyzer, TCodeFix, XUnitVerifier>.Diagnostic(descriptor);
+        => CSharpCodeFixVerifier<TAnalyzer, TCodeFix, DefaultVerifier>.Diagnostic(descriptor);
 
     /// <inheritdoc cref="CodeFixVerifier{TAnalyzer, TCodeFix, TTest, TVerifier}.VerifyAnalyzerAsync(string, DiagnosticResult[])"/>
     public static async Task VerifyAnalyzerAsync(string source, params DiagnosticResult[] expected)
     {
-        var test = new CSharpCodeFixTest<TAnalyzer, TCodeFix, XUnitVerifier>
+        var test = new CSharpCodeFixTest<TAnalyzer, TCodeFix, DefaultVerifier>
         {
             TestCode = source.ReplaceLineEndings(),
             // We need to set the output type to an exe to properly
@@ -54,7 +53,7 @@ public static partial class CSharpCodeFixVerifier<TAnalyzer, TCodeFix>
     /// <inheritdoc cref="CodeFixVerifier{TAnalyzer, TCodeFix, TTest, TVerifier}.VerifyCodeFixAsync(string, DiagnosticResult[], string)"/>
     public static async Task VerifyCodeFixAsync(string source, DiagnosticResult[] expected, string fixedSource, int? expectedIterations = null, string usageSource = null, string codeActionEquivalenceKey = null)
     {
-        var test = new CSharpCodeFixTest<TAnalyzer, TCodeFix, XUnitVerifier>
+        var test = new CSharpCodeFixTest<TAnalyzer, TCodeFix, DefaultVerifier>
         {
             // We need to set the output type to an exe to properly
             // support top-level programs in the tests. Otherwise,

+ 0 - 1
src/Framework/AspNetCoreAnalyzers/test/Verifiers/CSharpSourceGeneratorVerifier.cs

@@ -6,7 +6,6 @@ using Microsoft.AspNetCore.Analyzers.WebApplicationBuilder;
 using Microsoft.CodeAnalysis;
 using Microsoft.CodeAnalysis.CSharp.Testing;
 using Microsoft.CodeAnalysis.Testing;
-using Microsoft.CodeAnalysis.Testing.Verifiers;
 using Microsoft.CodeAnalysis.Text;
 
 namespace Microsoft.AspNetCore.Analyzers.Verifiers;

+ 3 - 4
src/Mvc/Mvc.Analyzers/test/AttributesShouldNotBeAppliedToPageModelAnalyzerTest.cs

@@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis;
 using Microsoft.CodeAnalysis.CSharp.Testing;
 using Microsoft.CodeAnalysis.Diagnostics;
 using Microsoft.CodeAnalysis.Testing;
-using Microsoft.CodeAnalysis.Testing.Verifiers;
 
 namespace Microsoft.AspNetCore.Mvc.Analyzers;
 
@@ -373,7 +372,7 @@ namespace Microsoft.AspNetCore.Mvc.Analyzers.Test
 
     private static Task VerifyAnalyzerAsync(string source, params DiagnosticResult[] expected)
     {
-        var test = new AttributesShouldNotBeAppliedToPageModelCSharpAnalzyerTest(TestReferences.MetadataReferences)
+        var test = new AttributesShouldNotBeAppliedToPageModelCSharpAnalyzerTest(TestReferences.MetadataReferences)
         {
             TestCode = source,
             ReferenceAssemblies = TestReferences.EmptyReferenceAssemblies,
@@ -383,9 +382,9 @@ namespace Microsoft.AspNetCore.Mvc.Analyzers.Test
         return test.RunAsync();
     }
 
-    private sealed class AttributesShouldNotBeAppliedToPageModelCSharpAnalzyerTest : CSharpAnalyzerTest<AttributesShouldNotBeAppliedToPageModelAnalyzer, XUnitVerifier>
+    private sealed class AttributesShouldNotBeAppliedToPageModelCSharpAnalyzerTest : CSharpAnalyzerTest<AttributesShouldNotBeAppliedToPageModelAnalyzer, DefaultVerifier>
     {
-        public AttributesShouldNotBeAppliedToPageModelCSharpAnalzyerTest(ImmutableArray<MetadataReference> metadataReferences)
+        public AttributesShouldNotBeAppliedToPageModelCSharpAnalyzerTest(ImmutableArray<MetadataReference> metadataReferences)
         {
             TestState.AdditionalReferences.AddRange(metadataReferences);
         }

+ 3 - 4
src/Mvc/Mvc.Analyzers/test/AvoidHtmlPartialAnalyzerTest.cs

@@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis;
 using Microsoft.CodeAnalysis.CSharp.Testing;
 using Microsoft.CodeAnalysis.Diagnostics;
 using Microsoft.CodeAnalysis.Testing;
-using Microsoft.CodeAnalysis.Testing.Verifiers;
 
 namespace Microsoft.AspNetCore.Mvc.Analyzers;
 
@@ -412,7 +411,7 @@ namespace AspNetCore
 
     private static Task VerifyAnalyzerAsync(string source, params DiagnosticResult[] expected)
     {
-        var test = new AvoidHtmlPartialCSharpAnalzyerTest(TestReferences.MetadataReferences)
+        var test = new AvoidHtmlPartialCSharpAnalyzerTest(TestReferences.MetadataReferences)
         {
             TestCode = source,
             ReferenceAssemblies = TestReferences.EmptyReferenceAssemblies,
@@ -422,9 +421,9 @@ namespace AspNetCore
         return test.RunAsync();
     }
 
-    internal sealed class AvoidHtmlPartialCSharpAnalzyerTest : CSharpAnalyzerTest<AvoidHtmlPartialAnalyzer, XUnitVerifier>
+    internal sealed class AvoidHtmlPartialCSharpAnalyzerTest : CSharpAnalyzerTest<AvoidHtmlPartialAnalyzer, DefaultVerifier>
     {
-        public AvoidHtmlPartialCSharpAnalzyerTest(ImmutableArray<MetadataReference> metadataReferences)
+        public AvoidHtmlPartialCSharpAnalyzerTest(ImmutableArray<MetadataReference> metadataReferences)
         {
             TestState.AdditionalReferences.AddRange(metadataReferences);
         }

+ 1 - 1
src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj

@@ -16,7 +16,7 @@
     <Reference Include="Microsoft.Extensions.DependencyModel" />
     <Reference Include="Microsoft.AspNetCore.Mvc" />
     <Reference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" />
-    <Reference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" />
+    <Reference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" />
   </ItemGroup>
 
 </Project>

+ 17 - 18
src/Mvc/Mvc.Analyzers/test/TagHelpersInCodeBlocksAnalyzerTest.cs

@@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis;
 using Microsoft.CodeAnalysis.CSharp.Testing;
 using Microsoft.CodeAnalysis.Diagnostics;
 using Microsoft.CodeAnalysis.Testing;
-using Microsoft.CodeAnalysis.Testing.Verifiers;
 
 namespace Microsoft.AspNetCore.Mvc.Analyzers;
 
@@ -58,7 +57,7 @@ namespace AspNetCore
         {
             WriteLiteral(""\r\n"");
             WriteLiteral(""\r\n"");
-  
+
     Action sometMethod = {|#0:() =>
     {
 
@@ -151,7 +150,7 @@ namespace AspNetCore
         {
             WriteLiteral(""\r\n"");
             WriteLiteral(""\r\n"");
-  
+
     Func<Task> sometMethod = {|#0:() =>
     {
 
@@ -243,13 +242,13 @@ namespace AspNetCore
         public async override global::System.Threading.Tasks.Task ExecuteAsync()
         {
             WriteLiteral(""\r\n"");
-  
+
     SometMethod();
 
             WriteLiteral(""\r\n"");
         }
         #pragma warning restore 1998
-            
+
     {|#0:void SometMethod()
     {
 
@@ -336,7 +335,7 @@ namespace AspNetCore
         {
             WriteLiteral(""\r\n"");
             WriteLiteral(""\r\n"");
-  
+
     TestDelegate sometMethod = {|#0:delegate ()
     {
 
@@ -368,7 +367,7 @@ namespace AspNetCore
             WriteLiteral(""\r\n"");
         }
         #pragma warning restore 1998
-            
+
     delegate void TestDelegate();
 
         [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
@@ -430,7 +429,7 @@ namespace AspNetCore
         public async override global::System.Threading.Tasks.Task ExecuteAsync()
         {
             WriteLiteral(""\r\n"");
-  
+
     {|#0:void SometMethod()
     {
 
@@ -520,13 +519,13 @@ namespace AspNetCore
         public async override global::System.Threading.Tasks.Task ExecuteAsync()
         {
             WriteLiteral(""\r\n"");
-  
+
     await SometMethod();
 
             WriteLiteral(""\r\n"");
         }
         #pragma warning restore 1998
-            
+
     async Task SometMethod()
     {
 
@@ -611,7 +610,7 @@ namespace AspNetCore
         {
             WriteLiteral(""\r\n"");
             WriteLiteral(""\r\n"");
-  
+
     TestDelegate sometMethod = async delegate ()
     {
 
@@ -643,7 +642,7 @@ namespace AspNetCore
             WriteLiteral(""\r\n"");
         }
         #pragma warning restore 1998
-            
+
     delegate Task TestDelegate();
 
         [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
@@ -707,7 +706,7 @@ namespace AspNetCore
         public async override global::System.Threading.Tasks.Task ExecuteAsync()
         {
             WriteLiteral(""\r\n"");
-  
+
     async Task SometMethod()
     {
 
@@ -794,13 +793,13 @@ namespace AspNetCore
         public async override global::System.Threading.Tasks.Task ExecuteAsync()
         {
             WriteLiteral(""\r\n"");
-  
+
     SometMethod();
 
             WriteLiteral(""\r\n"");
         }
         #pragma warning restore 1998
-            
+
     {|#0:void SometMethod()
     {
 
@@ -898,7 +897,7 @@ namespace AspNetCore
 
     private static Task VerifyAnalyzerAsync(string source, params DiagnosticResult[] expected)
     {
-        var test = new TagHelpersInCodeBlocksCSharpAnalzyerTest(TestReferences.MetadataReferences)
+        var test = new TagHelpersInCodeBlocksCSharpAnalyzerTest(TestReferences.MetadataReferences)
         {
             TestCode = source,
             ReferenceAssemblies = TestReferences.EmptyReferenceAssemblies,
@@ -908,9 +907,9 @@ namespace AspNetCore
         return test.RunAsync();
     }
 
-    private sealed class TagHelpersInCodeBlocksCSharpAnalzyerTest : CSharpAnalyzerTest<AttributesShouldNotBeAppliedToPageModelAnalyzer, XUnitVerifier>
+    private sealed class TagHelpersInCodeBlocksCSharpAnalyzerTest : CSharpAnalyzerTest<AttributesShouldNotBeAppliedToPageModelAnalyzer, DefaultVerifier>
     {
-        public TagHelpersInCodeBlocksCSharpAnalzyerTest(ImmutableArray<MetadataReference> metadataReferences)
+        public TagHelpersInCodeBlocksCSharpAnalyzerTest(ImmutableArray<MetadataReference> metadataReferences)
         {
             TestState.AdditionalReferences.AddRange(metadataReferences);
         }

+ 1 - 2
src/Mvc/Mvc.Analyzers/test/TopLevelParameterNameAnalyzerTest.cs

@@ -7,7 +7,6 @@ using Microsoft.CodeAnalysis;
 using Microsoft.CodeAnalysis.CSharp.Testing;
 using Microsoft.CodeAnalysis.Diagnostics;
 using Microsoft.CodeAnalysis.Testing;
-using Microsoft.CodeAnalysis.Testing.Verifiers;
 
 namespace Microsoft.AspNetCore.Mvc.Analyzers;
 
@@ -596,7 +595,7 @@ namespace TestApp
         return test.RunAsync();
     }
 
-    internal sealed class TopLevelParameterNameCSharpAnalyzerTest : CSharpAnalyzerTest<TopLevelParameterNameAnalyzer, XUnitVerifier>
+    internal sealed class TopLevelParameterNameCSharpAnalyzerTest : CSharpAnalyzerTest<TopLevelParameterNameAnalyzer, DefaultVerifier>
     {
         public TopLevelParameterNameCSharpAnalyzerTest(ImmutableArray<MetadataReference> metadataReferences)
         {

+ 2 - 2
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/localize/templatestrings.en.json

@@ -21,13 +21,13 @@
   "symbols/InteractivityPlatform/choices/WebAssembly/description": "Runs in the browser using WebAssembly",
   "symbols/InteractivityPlatform/choices/Auto/displayName": "Auto (Server and WebAssembly)",
   "symbols/InteractivityPlatform/choices/Auto/description": "Uses Server while downloading WebAssembly assets, then uses WebAssembly",
-  "symbols/InteractivityLocation/displayName": "_Interactivity location",
+  "symbols/InteractivityLocation/displayName": "Interactivity _location",
   "symbols/InteractivityLocation/description": "Chooses which components will have interactive rendering enabled",
   "symbols/InteractivityLocation/choices/InteractivePerPage/displayName": "Per page/component",
   "symbols/InteractivityLocation/choices/InteractivePerPage/description": "Interactivity is applied on a per-page or per-component basis",
   "symbols/InteractivityLocation/choices/InteractiveGlobal/displayName": "Global",
   "symbols/InteractivityLocation/choices/InteractiveGlobal/description": "Interactivity is applied at the root level",
-  "symbols/IncludeSampleContent/displayName": "_Include sample pages",
+  "symbols/IncludeSampleContent/displayName": "Include _sample pages",
   "symbols/IncludeSampleContent/description": "Configures whether to add sample pages and styling to demonstrate basic usage patterns.",
   "symbols/Empty/description": "Configures whether to omit sample pages and styling that demonstrate basic usage patterns.",
   "symbols/auth/choices/None/description": "No authentication",