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

Use ReferenceAssemblies.Net.Net70 #6311

Merged
merged 4 commits into from
Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
<DefineConstants>$(DefineConstants),NET_ANALYZERS_TEST</DefineConstants>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
<ItemGroup>
<Content Include="$(RepoRoot)\NuGet.config" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis" Version="$(MicrosoftCodeAnalysisVersionForTests)" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand All @@ -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
};
Expand All @@ -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 =
Expand All @@ -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
};
Expand Down