diff --git a/build/scripts/tests.sh b/build/scripts/tests.sh index 56337a8b30bbf..5c818317c3225 100755 --- a/build/scripts/tests.sh +++ b/build/scripts/tests.sh @@ -69,6 +69,11 @@ do echo Running "${runtime} ${file_name[@]}" if [[ "${runtime}" == "dotnet" ]]; then runner="dotnet exec --depsfile ${deps_json} --runtimeconfig ${runtimeconfig_json}" + if [[ "${file_name[@]}" == *'Roslyn.Compilers.CSharp.Emit.UnitTests.dll' ]] + then + echo "Skipping ${file_name[@]}" + continue + fi elif [[ "${runtime}" == "mono" ]]; then runner=mono fi diff --git a/src/Compilers/CSharp/Test/Emit/Attributes/InternalsVisibleToAndStrongNameTests.cs b/src/Compilers/CSharp/Test/Emit/Attributes/InternalsVisibleToAndStrongNameTests.cs index b5ddc6f949b1b..f944d272ff214 100644 --- a/src/Compilers/CSharp/Test/Emit/Attributes/InternalsVisibleToAndStrongNameTests.cs +++ b/src/Compilers/CSharp/Test/Emit/Attributes/InternalsVisibleToAndStrongNameTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - +#if NET461 using System; using System.Collections.Immutable; using System.IO; @@ -2471,3 +2471,5 @@ public void ConsistentErrorMessageWhenProvidingEmptyKeyFile_PublicSign() #endregion } } + +#endif diff --git a/src/Compilers/CSharp/Test/Emit/CSharpCompilerEmitTest.csproj b/src/Compilers/CSharp/Test/Emit/CSharpCompilerEmitTest.csproj index 966f2c874b2c6..310813fb4085a 100644 --- a/src/Compilers/CSharp/Test/Emit/CSharpCompilerEmitTest.csproj +++ b/src/Compilers/CSharp/Test/Emit/CSharpCompilerEmitTest.csproj @@ -8,9 +8,9 @@ Library Microsoft.CodeAnalysis.CSharp.UnitTests Roslyn.Compilers.CSharp.Emit.UnitTests - net461 - $(RoslynDesktopRuntimeIdentifier) - UnitTest + $(RoslynPortableTargetFrameworks) + UnitTestPortable + $(RoslynPortableRuntimeIdentifiers) true @@ -35,13 +35,7 @@ - - - - - - - + diff --git a/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenTupleTest.cs b/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenTupleTest.cs index 3bb4725caa009..a08caaefdca9c 100644 --- a/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenTupleTest.cs +++ b/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenTupleTest.cs @@ -14,7 +14,6 @@ using Microsoft.CodeAnalysis.Text; using Roslyn.Test.Utilities; using Xunit; -using static Roslyn.Test.Utilities.SigningTestHelpers; using static TestResources.NetFX.ValueTuple; namespace Microsoft.CodeAnalysis.CSharp.UnitTests.CodeGen @@ -21329,7 +21328,7 @@ public class A }"; var signedDllOptions = TestOptions.ReleaseDll. WithCryptoKeyFile(SigningTestHelpers.KeyPairFile). - WithStrongNameProvider(s_defaultDesktopProvider); + WithStrongNameProvider(SigningTestHelpers.s_defaultDesktopProvider); var comp0v1 = CreateCompilationWithMscorlib40(source0v1, assemblyName: "A", options: signedDllOptions); comp0v1.VerifyDiagnostics(); var ref0v1 = comp0v1.EmitToImageReference(); diff --git a/src/Compilers/CSharp/Test/Emit/CodeGen/DestructorTests.cs b/src/Compilers/CSharp/Test/Emit/CodeGen/DestructorTests.cs index 5e1007f1e6967..c47e6adfd9e56 100644 --- a/src/Compilers/CSharp/Test/Emit/CodeGen/DestructorTests.cs +++ b/src/Compilers/CSharp/Test/Emit/CodeGen/DestructorTests.cs @@ -11,7 +11,6 @@ using Microsoft.CodeAnalysis.CSharp.UnitTests.Emit; using Microsoft.CodeAnalysis.Test.Utilities; using Microsoft.CodeAnalysis.Text; -using Microsoft.CSharp.RuntimeBinder; using Roslyn.Test.Utilities; using Xunit; diff --git a/src/Compilers/CSharp/Test/Emit/Emit/CompilationEmitTests.cs b/src/Compilers/CSharp/Test/Emit/Emit/CompilationEmitTests.cs index 62c9be0ce54f2..ab1ee04c54c30 100644 --- a/src/Compilers/CSharp/Test/Emit/Emit/CompilationEmitTests.cs +++ b/src/Compilers/CSharp/Test/Emit/Emit/CompilationEmitTests.cs @@ -1,4 +1,5 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#if NET461 using System; using System.Collections.Immutable; @@ -5046,3 +5047,5 @@ public void CompileAndVerifyModuleIncludesAllModules() } } } + +#endif diff --git a/src/Compilers/CSharp/Test/Emit/Emit/DesktopStrongNameProviderTests.cs b/src/Compilers/CSharp/Test/Emit/Emit/DesktopStrongNameProviderTests.cs index a967f61c0dafa..60836195e3df8 100644 --- a/src/Compilers/CSharp/Test/Emit/Emit/DesktopStrongNameProviderTests.cs +++ b/src/Compilers/CSharp/Test/Emit/Emit/DesktopStrongNameProviderTests.cs @@ -1,4 +1,5 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#if NET461 using System.Collections.Immutable; using System.IO; @@ -70,3 +71,4 @@ public static void Main(string[] args) { } } } } +#endif diff --git a/src/Compilers/CSharp/Test/Emit/PrivateProtected.cs b/src/Compilers/CSharp/Test/Emit/PrivateProtected.cs index 2524566951d46..e1982d0da4d6d 100644 --- a/src/Compilers/CSharp/Test/Emit/PrivateProtected.cs +++ b/src/Compilers/CSharp/Test/Emit/PrivateProtected.cs @@ -1,5 +1,7 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#if NET461 + using System.Collections.Immutable; using Microsoft.CodeAnalysis.CSharp.Test.Utilities; using Microsoft.CodeAnalysis.Test.Utilities; @@ -788,3 +790,4 @@ public static void M(string s) } } } +#endif diff --git a/src/Setup/DevDivInsertionFiles/BuildDevDivInsertionFiles.vb b/src/Setup/DevDivInsertionFiles/BuildDevDivInsertionFiles.vb index aebf4bd10fb21..49fa260722286 100644 --- a/src/Setup/DevDivInsertionFiles/BuildDevDivInsertionFiles.vb +++ b/src/Setup/DevDivInsertionFiles/BuildDevDivInsertionFiles.vb @@ -834,12 +834,12 @@ Public Class BuildDevDivInsertionFiles add("UnitTests\EditorServicesTest\BasicUndo.dll") add("UnitTests\EditorServicesTest\Moq.dll") add("UnitTests\EditorServicesTest\Microsoft.CodeAnalysis.Test.Resources.Proprietary.dll") - add("UnitTests\CSharpCompilerEmitTest\Microsoft.DiaSymReader.PortablePdb.dll") - add("UnitTests\CSharpCompilerEmitTest\Microsoft.DiaSymReader.Converter.dll") - add("UnitTests\CSharpCompilerEmitTest\Microsoft.DiaSymReader.Converter.Xml.dll") - add("UnitTests\CSharpCompilerEmitTest\Microsoft.DiaSymReader.dll") - add("UnitTests\CSharpCompilerEmitTest\Microsoft.DiaSymReader.Native.amd64.dll") - add("UnitTests\CSharpCompilerEmitTest\Microsoft.DiaSymReader.Native.x86.dll") + add("UnitTests\CSharpCompilerEmitTest\net461\Microsoft.DiaSymReader.PortablePdb.dll") + add("UnitTests\CSharpCompilerEmitTest\net461\Microsoft.DiaSymReader.Converter.dll") + add("UnitTests\CSharpCompilerEmitTest\net461\Microsoft.DiaSymReader.Converter.Xml.dll") + add("UnitTests\CSharpCompilerEmitTest\net461\Microsoft.DiaSymReader.dll") + add("UnitTests\CSharpCompilerEmitTest\net461\Microsoft.DiaSymReader.Native.amd64.dll") + add("UnitTests\CSharpCompilerEmitTest\net461\Microsoft.DiaSymReader.Native.x86.dll") add("UnitTests\EditorServicesTest\Microsoft.VisualStudio.Platform.VSEditor.Interop.dll") add("Vsix\ExpressionEvaluatorPackage\Microsoft.VisualStudio.Debugger.Engine.dll") add("Vsix\VisualStudioIntegrationTestSetup\Microsoft.Diagnostics.Runtime.dll")