You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use live reference pack for IntrinsicsInSystemPrivatecorelibAnalyzer.Tests (#93721)
This avoids an issue where the analyzer test tries to restore reference assemblies from nuget.org during the test. We already have helpers in place to use the live reference pack instead.
Fixes#90951Fixes#93103
Copy file name to clipboardExpand all lines: src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/CSharpAnalyzerVerifier`1+Test.cs
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
usingMicrosoft.CodeAnalysis.CSharp.Testing;
2
2
usingMicrosoft.CodeAnalysis.Diagnostics;
3
+
usingMicrosoft.CodeAnalysis.Testing;
3
4
usingMicrosoft.CodeAnalysis.Testing.Verifiers;
4
5
5
6
namespaceIntrinsicsInSystemPrivateCoreLib.Test
@@ -11,6 +12,11 @@ public class Test : CSharpAnalyzerTest<TAnalyzer, XUnitVerifier>
11
12
{
12
13
publicTest()
13
14
{
15
+
// Clear out the default reference assemblies. We explicitly add references from the live ref pack,
16
+
// so we don't want the Roslyn test infrastructure to resolve/add any default reference assemblies
Copy file name to clipboardExpand all lines: src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/IntrinsicsInSystemPrivateCoreLib.Tests.csproj
Copy file name to clipboardExpand all lines: src/libraries/System.Private.CoreLib/tests/IntrinsicsInSystemPrivatecoreLibAnalyzer.Tests/IntrinsicsInSystemPrivateCoreLibUnitTests.cs
-20Lines changed: 0 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,6 @@
5
5
6
6
namespaceIntrinsicsInSystemPrivateCoreLib.Test
7
7
{
8
-
[SkipOnPlatform(TestPlatforms.Browser,"Do not try to run analyzer tests in the browser")]
0 commit comments