下面几行代码帮助我识别了缺失的dll,现在它是需要修复的构建。
try
{
}
catch (System.Reflection.ReflectionTypeLoadException ex)
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
foreach (System.Exception exSub in ex.LoaderExceptions)
{
sb.AppendLine(exSub.Message);
System.IO.FileNotFoundException exFileNotFound = exSub as System.IO.FileNotFoundException;
if (exFileNotFound != null)
{
if (!string.IsNullOrEmpty(exFileNotFound.FusionLog))
{
sb.AppendLine("Fusion Log:");
sb.AppendLine(exFileNotFound.FusionLog);
}
}
sb.AppendLine();
}
string errorMessage = sb.ToString();
throw new System.Exception(errorMessage);
}