Skip to content

Commit

Permalink
committing changes for microsoft#958 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DineshChirnanchu committed Sep 5, 2019
1 parent 98cfefc commit 5081873
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ namespace Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework
using System.Reflection;

using Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.Utilities;
using Microsoft.VisualStudio.TestPlatform.Common.Logging;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
using Microsoft.VisualStudio.TestPlatform.Utilities.Helpers;
using Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces;

Expand Down Expand Up @@ -138,6 +140,12 @@ private void GetTestExtensionsFromFiles<TPluginInfo, TExtension>(
this.GetTestExtensionsFromAssembly<TPluginInfo, TExtension>(assembly, pluginInfos);
}
}
catch (FileLoadException e)
{
EqtTrace.Warning("TestPluginDiscoverer: Failed to load extensions from file '{0}'. Skipping test extension scan for this file. Error: {1}", file, e);
string fileLoadErrorMessage = $"TestPluginDiscoverer: Failed to load extensions from file '" + file + "'";
TestSessionMessageLogger.Instance.SendMessage(TestMessageLevel.Error, fileLoadErrorMessage);
}
catch (Exception e)
{
EqtTrace.Warning("TestPluginDiscoverer: Failed to load extensions from file '{0}'. Skipping test extension scan for this file. Error: {1}", file, e);
Expand Down

0 comments on commit 5081873

Please sign in to comment.