Bug 16922 - Unhandled exception from smcs: FileLoadException: I/O Error
Summary: Unhandled exception from smcs: FileLoadException: I/O Error
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: 3.2.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
Depends on:
Reported: 2013-12-20 16:10 UTC by Jonathan Pryor
Modified: 2014-01-02 11:55 UTC (History)
1 user (show)

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

C5.dll (254.50 KB, application/x-msdownload)
2013-12-20 16:10 UTC, Jonathan Pryor

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Jonathan Pryor 2013-12-20 16:10:19 UTC
Created attachment 5708 [details]

mcs from Mono 3.2.5 does not like the Portable C5.dll v2.2.5073 assembly.

To reproduce:
1. Download the attached C5.dll
2. Compile a "hello-world" app and reference C5.dll. It's not necessary to use any types from C5.dll:

    mcs App.cs -r:C5.dll

Expected results: It should compile.

Actual results:

> Unhandled Exception:
> System.IO.FileLoadException: I/O Error
>   at IKVM.Reflection.AssemblyName..ctor (System.String assemblyName) [0x00000] in <filename unknown>:0 
>   at Mono.CSharp.ImportedAssemblyDefinition.ReadAttributes () [0x00000] in <filename unknown>:0 
>   at Mono.CSharp.MetadataImporter.GetAssemblyDefinition (IKVM.Reflection.Assembly assembly) [0x00000] in <filename unknown>:0 
>   at Mono.CSharp.StaticImporter.ImportAssembly (IKVM.Reflection.Assembly assembly, Mono.CSharp.RootNamespace targetNamespace) [0x00000] in <filename unknown>:0 
>   at Mono.CSharp.StaticLoader.LoadReferences (Mono.CSharp.ModuleContainer module) [0x00000] in <filename unknown>:0 
>   at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
>   at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 

The C5.dll assembly looks sane enough, in that `monodis` is able to disassemble it without error.
Comment 2 Marek Safar 2014-01-02 11:55:48 UTC
Works fine with mono master