diff options
author | Sven Boemer <sbomer@gmail.com> | 2019-04-09 11:14:59 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2019-04-09 11:14:59 +0300 |
commit | 84a5611fff0b01ebd014e86904b6ff2240f1314e (patch) | |
tree | 727c6077a84d8581356dbf66e90ac9af2703698e /test/Mono.Linker.Tests | |
parent | 744804f0a48fe92ebad54eff7d581c9d4af7860d (diff) |
Fix IL Compilation tests on .NET Core (#517)
* Fix MissingTargetReference on .NET Core
The test was failing because TypeForwarderMissingReference.il depends
on mscorlib without a version, and roslyn was looking for Object in
mscorlib, Version=0.0.0.0 as a result. This doesn't happen when using
csc from the command line because csc uses a different assembly
identity comparer by default: DesktopAssemblyIdentityComparer (even on
.NET Core).
* Also enable CanCompileILAssembly
* Also enable UnusedAttributeOnReturnTypeIsRemoved
Diffstat (limited to 'test/Mono.Linker.Tests')
-rw-r--r-- | test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs b/test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs index 75eb965ce..d40db5766 100644 --- a/test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs +++ b/test/Mono.Linker.Tests/TestCasesRunner/TestCaseCompiler.cs @@ -203,7 +203,8 @@ namespace Mono.Linker.Tests.TestCasesRunner { { var parseOptions = new CSharpParseOptions (preprocessorSymbols: options.Defines); var compilationOptions = new CSharpCompilationOptions ( - outputKind: options.OutputPath.FileName.EndsWith (".exe") ? OutputKind.ConsoleApplication : OutputKind.DynamicallyLinkedLibrary + outputKind: options.OutputPath.FileName.EndsWith (".exe") ? OutputKind.ConsoleApplication : OutputKind.DynamicallyLinkedLibrary, + assemblyIdentityComparer: DesktopAssemblyIdentityComparer.Default ); // Default debug info format for the current platform. DebugInformationFormat debugType = RuntimeInformation.IsOSPlatform (OSPlatform.Windows) ? DebugInformationFormat.Pdb : DebugInformationFormat.PortablePdb; |