Fixing bug where net standard would complain about being unable to get attributes from simpl binaries

This commit is contained in:
Chris Cameron
2017-10-05 17:18:12 -04:00
parent 70c5f817c5
commit 4c4a7c2918

View File

@@ -254,7 +254,14 @@ namespace ICD.Common.Utils
#if SIMPLSHARP
return assembly.GetCustomAttributes(typeof(T), false).Cast<T>();
#else
return assembly.GetCustomAttributes<T>();
try
{
return assembly.GetCustomAttributes<T>();
}
catch (FileNotFoundException)
{
return Enumerable.Empty<object>();
}
#endif
}