Added -reference option to load referenced assemblies from a specific location.

This commit is contained in:
jfrijters 2008-04-23 04:21:36 +00:00
Родитель e28c60d9a4
Коммит 9644cb6794
1 изменённых файлов: 14 добавлений и 0 удалений

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

@ -53,6 +53,20 @@ public class NetExp
{
continueOnError = true;
}
else if(s.StartsWith("-r:") || s.StartsWith("-reference:"))
{
string path = s.Substring(s.IndexOf(':') + 1);
try
{
Assembly.ReflectionOnlyLoadFrom(path);
}
catch (Exception x)
{
Console.Error.WriteLine("Error: unable to load reference {0}", path);
Console.Error.WriteLine(" ({0})", x.Message);
return 1;
}
}
else
{
// unrecognized option, or multiple assemblies, print usage message and exit