Bug 29189

Summary: Compiling class referencing corefx facade/contract assemblies raises error "Reference to type `System.SByte' claims it is defined assembly `mscorlib,..` but couldn't be found"
Product: [Mono] Compilers Reporter: Alexander Köplinger <alex.koeplinger>
Component: C#Assignee: Marek Safar <masafa>
Status: RESOLVED FIXED    
Severity: normal CC: mono-bugs+mono
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: Repro code with corefx assemblies

Description Alexander Köplinger 2015-04-17 09:27:36 UTC
Created attachment 10798 [details]
Repro code with corefx assemblies

Repro code with the relevant facade/contract assemblies from CoreFx is attached.

Compiling with:

> mcs /noconfig /nostdlib /reference:System.Runtime.dll /reference:mscorlib.dll test.cs

results in:

> test.cs(9,6): error CS7069: Reference to type `System.SByte' claims it is defined assembly `mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a', but it could not be found
/home/alexander/Desktop/repro/System.Runtime.dll (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings

Note that commenting the sb.Append() line makes the program compile fine on mcs as well.

csc.exe has no problem compiling this on Windows.
Comment 1 Marek Safar 2016-06-01 11:55:22 UTC
Fixed in master