Skip to content
Draft
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
2 changes: 1 addition & 1 deletion eng/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
<PackageVersion Include="xunit.core" Version="$(_xunitVersion)" />
<PackageVersion Include="Xunit.Combinatorial" Version="1.6.24" />
<PackageVersion Include="xunit.extensibility.core" Version="$(_xunitVersion)" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5 " />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.2" />
<PackageVersion Include="xunit.runner.utility" Version="$(_xunitVersion)" />
<PackageVersion Include="xunit.abstractions" Version="2.0.3" />
<PackageVersion Include="xunit.extensibility.execution" Version="$(_xunitVersion)" />
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,6 @@
in Directory.Packages.props - Microsoft.TestPlatform.TranslationLayer and Microsoft.TestPlatform.ObjectModel.
This version needs to match the Test SDK version consumed by Arcade.
-->
<MicrosoftNETTestSdkVersion>17.5.0</MicrosoftNETTestSdkVersion>
<MicrosoftNETTestSdkVersion>17.13.0</MicrosoftNETTestSdkVersion>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8630,7 +8630,7 @@ public static int Main()
CleanupAllGeneratedFiles(source);
}

[Fact(), WorkItem(546025, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/546025")]
[ConditionalFact(typeof(DesktopOnly), Reason = "https://github.com/dotnet/roslyn/issues/79351"), WorkItem(546025, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/546025")]
public void TestWin32ResWithBadResFile_CS1583ERR_BadWin32Res_01()
{
string source = Temp.CreateFile(prefix: "", extension: ".cs").WriteAllText(@"class Test { static void Main() {} }").Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ public void AssemblyLoading_MultipleVersions_MissingVersion(AnalyzerTestKind kin
/// Test the case where a utility is loaded by multiple analyzers at different versions. Ensure that no matter
/// what order we load the analyzers we correctly resolve the utility version.
/// </summary>
[Theory]
[ConditionalTheory(typeof(DesktopOnly), Reason = "https://github.com/dotnet/roslyn/issues/79352")]
[CombinatorialData]
public void AssemblyLoading_MultipleVersions_AnalyzerDependency(AnalyzerTestKind kind, bool normalOrder)
{
Expand Down
10 changes: 6 additions & 4 deletions src/Compilers/Core/CodeAnalysisTest/CompilerResolverTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

#if NET
using System;
using System.Collections.Immutable;
using System.Linq;
using System.Reflection;
using System.Runtime.Loader;
using Microsoft.CodeAnalysis.Test.Utilities;
using Roslyn.Test.Utilities;
using Roslyn.Utilities;
using Xunit;

Expand All @@ -16,7 +18,7 @@ namespace Microsoft.CodeAnalysis.UnitTests;
public sealed class CompilerResolverTests : IDisposable
{
public TempRoot TempRoot { get; }
public int DefaultLoadContextCount { get; }
public ImmutableArray<string?> DefaultLoadContextAssemblies { get; }
public AssemblyLoadContext CompilerContext { get; }
public AssemblyLoadContext ScratchContext { get; }
public Assembly AssemblyInCompilerContext { get; }
Expand All @@ -25,7 +27,7 @@ public sealed class CompilerResolverTests : IDisposable
public CompilerResolverTests()
{
TempRoot = new TempRoot();
DefaultLoadContextCount = AssemblyLoadContext.Default.Assemblies.Count();
DefaultLoadContextAssemblies = AssemblyLoadContext.Default.Assemblies.SelectAsArray(a => a.FullName);
CompilerContext = new AssemblyLoadContext(nameof(CompilerResolverTests), isCollectible: true);
AssemblyInCompilerContext = CompilerContext.LoadFromAssemblyPath(typeof(AnalyzerAssemblyLoader).Assembly.Location);
ScratchContext = new AssemblyLoadContext("Scratch", isCollectible: true);
Expand All @@ -35,7 +37,7 @@ public CompilerResolverTests()
public void Dispose()
{
// This test should not pollute the default load context and hence interfere with other tests.
Assert.Equal(DefaultLoadContextCount, AssemblyLoadContext.Default.Assemblies.Count());
AssertEx.SetEqual(DefaultLoadContextAssemblies, AssemblyLoadContext.Default.Assemblies.SelectAsArray(a => a.FullName));
CompilerContext.Unload();
ScratchContext.Unload();
TempRoot.Dispose();
Expand All @@ -49,7 +51,7 @@ public void ResolveReturnsNullForNonHostAssembly()
Assert.Null(assembly);
}

[Fact]
[ConditionalFact(typeof(DesktopOnly), Reason = "https://github.com/dotnet/roslyn/issues/79352")]
public void ResolveReturnsForHostAssembly()
{
var assembly = Loader.CompilerAnalyzerAssemblyResolver.Resolve(Loader, AssemblyInCompilerContext.GetName(), ScratchContext, TempRoot.CreateDirectory().Path);
Expand Down
8 changes: 4 additions & 4 deletions src/Compilers/Core/CodeAnalysisTest/InvokeUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ internal void Exec(
}

var loader = new AnalyzerAssemblyLoader(pathResolvers, assemblyResolvers, compilerLoadContext: null);
var compilerContextAssemblyCount = loader.CompilerLoadContext.Assemblies.Count();
var compilerContextAssemblies = loader.CompilerLoadContext.Assemblies.SelectAsArray(a => a.FullName);
try
{
Exec(testOutputHelper, fixture, loader, typeName, methodName, state);
Expand All @@ -72,7 +72,7 @@ internal void Exec(
{
// When using the actual compiler load context (the one shared by all of our unit tests) the test
// did not load any additional assemblies that could interfere with later tests.
Assert.Equal(compilerContextAssemblyCount, loader.CompilerLoadContext.Assemblies.Count());
AssertEx.SetEqual(compilerContextAssemblies, loader.CompilerLoadContext.Assemblies.SelectAsArray(a => a.FullName));
}
}

Expand All @@ -89,7 +89,7 @@ internal void Exec(
// load into the compiler or directory load context.
//
// Not only is this bad behavior it also pollutes future test results.
var defaultContextCount = AssemblyLoadContext.Default.Assemblies.Count();
var defaultContextAssemblies = AssemblyLoadContext.Default.Assemblies.SelectAsArray(a => a.FullName);
using var tempRoot = new TempRoot();

try
Expand Down Expand Up @@ -120,7 +120,7 @@ internal void Exec(
testOutputHelper.WriteLine($"\t{pair.OriginalAssemblyPath} -> {pair.ResolvedAssemblyPath}");
}

Assert.Equal(defaultContextCount, AssemblyLoadContext.Default.Assemblies.Count());
AssertEx.SetEqual(defaultContextAssemblies, AssemblyLoadContext.Default.Assemblies.SelectAsArray(a => a.FullName));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.UnitTests
Public Class CodeGenWithEvents
Inherits BasicTestBase

<Fact>
<Fact(Skip:="https://github.com/dotnet/roslyn/issues/79350")>
Public Sub SimpleWithEventsTest()
Dim compilation1 = CompileAndVerify(
<compilation>
Expand Down Expand Up @@ -400,7 +400,7 @@ handled1

End Sub

<Fact>
<Fact(Skip:="https://github.com/dotnet/roslyn/issues/79350")>
Public Sub SimpleSharedWithEvents()
Dim compilation1 = CompileAndVerify(
<compilation>
Expand Down Expand Up @@ -2003,7 +2003,7 @@ End Class
CompileAndVerify(source)
End Sub

<Fact, WorkItem(4544, "https://github.com/dotnet/roslyn/issues/4544")>
<Fact(Skip:="https://github.com/dotnet/roslyn/issues/79350"), WorkItem(4544, "https://github.com/dotnet/roslyn/issues/4544")>
Public Sub MultipleInitializationsWithAsNew_01()
Dim source =
<compilation>
Expand Down Expand Up @@ -2067,7 +2067,7 @@ False
]]>)
End Sub

<Fact, WorkItem(4544, "https://github.com/dotnet/roslyn/issues/4544")>
<Fact(Skip:="https://github.com/dotnet/roslyn/issues/79350"), WorkItem(4544, "https://github.com/dotnet/roslyn/issues/4544")>
Public Sub MultipleInitializationsWithAsNew_02()
Dim source =
<compilation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1962,7 +1962,7 @@ MethodOverload(Base)

End Sub

<Fact>
<Fact(Skip:="https://github.com/dotnet/roslyn/issues/79350")>
Public Sub Retarget_Events()
'The test involves compilation with/without retargeting and ensuring same behavior at runtime
'same diagnostics (or lack off) as compile time
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading