Exit if AssemblyResolver.Init() returns an error and load ikvmstub.exe assembly via AssemblyResolver to get error checking (and mscorlib version checking).

This commit is contained in:
jfrijters 2010-05-12 08:39:57 +00:00
Родитель 5649a786d8
Коммит b7c7d0139c
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -103,8 +103,11 @@ static class NetExp
references.Add(assemblyNameOrPath); references.Add(assemblyNameOrPath);
} }
AssemblyResolver resolver = new AssemblyResolver(); AssemblyResolver resolver = new AssemblyResolver();
resolver.Init(StaticCompiler.Universe, nostdlib, references, libpaths); if (resolver.Init(StaticCompiler.Universe, nostdlib, references, libpaths) != 0)
StaticCompiler.Universe.LoadFile(typeof(NetExp).Assembly.Location); {
return 1;
}
resolver.LoadFile(typeof(NetExp).Assembly.Location);
Dictionary<string, Assembly> cache = new Dictionary<string, Assembly>(); Dictionary<string, Assembly> cache = new Dictionary<string, Assembly>();
foreach (string reference in references) foreach (string reference in references)
{ {