Bug 29189 - 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"
Summary: Compiling class referencing corefx facade/contract assemblies raises error "R...
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2015-04-17 09:27 UTC by Alexander Köplinger
Modified: 2016-06-01 11:55 UTC (History)
1 user (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Repro code with corefx assemblies (37.71 KB, application/x-zip-compressed)
2015-04-17 09:27 UTC, Alexander Köplinger
Details

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

Note You need to log in before you can comment on or make changes to this bug.