diff --git a/src/NetAnalyzers/UnitTests/Microsoft.CodeAnalysis.NetAnalyzers.UnitTests.csproj b/src/NetAnalyzers/UnitTests/Microsoft.CodeAnalysis.NetAnalyzers.UnitTests.csproj
index ffdeeeacc1..058b1699e5 100644
--- a/src/NetAnalyzers/UnitTests/Microsoft.CodeAnalysis.NetAnalyzers.UnitTests.csproj
+++ b/src/NetAnalyzers/UnitTests/Microsoft.CodeAnalysis.NetAnalyzers.UnitTests.csproj
@@ -5,9 +5,6 @@
$(DefineConstants),NET_ANALYZERS_TEST
true
-
-
-
diff --git a/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/InteropServices/DisableRuntimeMarshallingTests.cs b/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/InteropServices/DisableRuntimeMarshallingTests.cs
index 011df8a78c..4c08c17593 100644
--- a/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/InteropServices/DisableRuntimeMarshallingTests.cs
+++ b/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/InteropServices/DisableRuntimeMarshallingTests.cs
@@ -1613,8 +1613,7 @@ private static async Task VerifyCSAnalyzerWithAdditionalSourceAsync(string sourc
var test = new VerifyCS.Test
{
LanguageVersion = LanguageVersion.CSharp9,
- ReferenceAssemblies = new ReferenceAssemblies("net7.0", new PackageIdentity("Microsoft.NETCore.App.Ref", "7.0.0-preview.1.22075.6"), Path.Combine("ref", "net7.0"))
- .WithNuGetConfigFilePath(Path.Combine(Path.GetDirectoryName(typeof(DisableRuntimeMarshallingTests).Assembly.Location), "NuGet.config")),
+ ReferenceAssemblies = ReferenceAssemblies.Net.Net70,
TestCode = source,
MarkupOptions = MarkupOptions.UseFirstDescriptor
};
@@ -1623,13 +1622,13 @@ private static async Task VerifyCSAnalyzerWithAdditionalSourceAsync(string sourc
await test.RunAsync();
}
+
private static async Task VerifyCSAnalyzerWithAdditionalAssemblyAsync(string source, string additionalReferencedAssemblySource)
{
var test = new VerifyCS.Test
{
LanguageVersion = LanguageVersion.CSharp9,
- ReferenceAssemblies = new ReferenceAssemblies("net7.0", new PackageIdentity("Microsoft.NETCore.App.Ref", "7.0.0-preview.1.22075.6"), Path.Combine("ref", "net7.0"))
- .WithNuGetConfigFilePath(Path.Combine(Path.GetDirectoryName(typeof(DisableRuntimeMarshallingTests).Assembly.Location), "NuGet.config")),
+ ReferenceAssemblies = ReferenceAssemblies.Net.Net70,
TestCode = source,
MarkupOptions = MarkupOptions.UseFirstDescriptor
};
@@ -1656,8 +1655,7 @@ private static async Task VerifyCSCodeFixAsync(string source, string codeFix, bo
var test = new VerifyCS.Test
{
LanguageVersion = LanguageVersion.CSharp9,
- ReferenceAssemblies = new ReferenceAssemblies("net7.0", new PackageIdentity("Microsoft.NETCore.App.Ref", "7.0.0-preview.1.22075.6"), Path.Combine("ref", "net7.0"))
- .WithNuGetConfigFilePath(Path.Combine(Path.GetDirectoryName(typeof(DisableRuntimeMarshallingTests).Assembly.Location), "NuGet.config")),
+ ReferenceAssemblies = ReferenceAssemblies.Net.Net70,
TestCode = source,
FixedCode = codeFix,
SolutionTransforms =
@@ -1684,8 +1682,7 @@ private static async Task VerifyVBAnalyzerAsync(string source)
{
var test = new VerifyVB.Test
{
- ReferenceAssemblies = new ReferenceAssemblies("net7.0", new PackageIdentity("Microsoft.NETCore.App.Ref", "7.0.0-preview.1.22075.6"), Path.Combine("ref", "net7.0"))
- .WithNuGetConfigFilePath(Path.Combine(Path.GetDirectoryName(typeof(DisableRuntimeMarshallingTests).Assembly.Location), "NuGet.config")),
+ ReferenceAssemblies = ReferenceAssemblies.Net.Net70,
TestCode = source,
FixedCode = source
};