From 31d5c199c435751a9e42e58c407328792bc4d6d9 Mon Sep 17 00:00:00 2001 From: Satya Madala Date: Mon, 19 Mar 2018 20:39:35 +0530 Subject: [PATCH] Fix masking assembly load faolure error message --- .../Discovery/AssemblyEnumeratorWrapper.cs | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/Adapter/MSTest.CoreAdapter/Discovery/AssemblyEnumeratorWrapper.cs b/src/Adapter/MSTest.CoreAdapter/Discovery/AssemblyEnumeratorWrapper.cs index a44f303012..c3cd1b39e2 100644 --- a/src/Adapter/MSTest.CoreAdapter/Discovery/AssemblyEnumeratorWrapper.cs +++ b/src/Adapter/MSTest.CoreAdapter/Discovery/AssemblyEnumeratorWrapper.cs @@ -76,33 +76,13 @@ internal ICollection GetTests( fullFilePath, ex); - // Loading a WinPRT dll on the phone produces a - // FileNotFoundException. We check if we get FileNotFoundException - // in spite of the dll existing and try and load the dll from the full path in this case. - try - { - if (PlatformServiceProvider.Instance.FileOperations.DoesFileExist(assemblyFileName)) - { - var assembly = Assembly.Load(new AssemblyName(assemblyFileName)); - } - } - catch (Exception e) - { - var winrtFailureMessage = string.Format( - CultureInfo.CurrentCulture, - Resource.TestAssembly_AssemblyDiscoveryFailure, - assemblyFileName, - e.Message); - warnings.Add(winrtFailureMessage); - return null; - } - var message = string.Format( CultureInfo.CurrentCulture, Resource.TestAssembly_AssemblyDiscoveryFailure, fullFilePath, ex.Message); warnings.Add(message); + return null; } catch (ReflectionTypeLoadException ex)