Firstly, I've seen this question, and while the problem seems similar, it is not the same.
I'm running a trimmed down mono, built without the 4.5 profile using ./configure --with-profile4=yes --with-profile4_5=no
.
I have an application that targets .NET 4.0, built using mono's xbuild
. When I run it against my trimmed down mono installation, I get this error:
The assembly mscorlib.dll was not found or could not be loaded.
It should have been installed in the `/opt/my-app/mono/lib/mono/4.5/mscorlib.dll' directory.
Now, I'm not referencing only 4.0 assemblies - nothing from 4.5, AFAICS.
Why might I be getting this error?
I'm not sure if it's related, but I get this warning when building with xbuild
(but not when building with msbuild
, although I still get the mscorlib.dll
when running against my trimmed down mono):
warning CS1685: The predefined type `System.Runtime.CompilerServices.ExtensionAttribute' is defined multiple times.
Using definition from `mscorlib.dll'
I'm also not sure if this is relevant either, but the build machine does has .NET 4.5 installed.
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0
. The only thing I've trimmed out of Mono at this stage is support for the 4.5 profile. – Tamp