diff --git a/src/Microsoft.TestPlatform.Common/ExtensionFramework/Utilities/TestExtensionPluginInformation.cs b/src/Microsoft.TestPlatform.Common/ExtensionFramework/Utilities/TestExtensionPluginInformation.cs index ec389d56ec..fd94f4f9c6 100644 --- a/src/Microsoft.TestPlatform.Common/ExtensionFramework/Utilities/TestExtensionPluginInformation.cs +++ b/src/Microsoft.TestPlatform.Common/ExtensionFramework/Utilities/TestExtensionPluginInformation.cs @@ -67,7 +67,7 @@ public string ExtensionUri private static string GetExtensionUri(Type testLoggerType) { string extensionUri = string.Empty; - + object[] attributes = testLoggerType.GetTypeInfo().GetCustomAttributes(typeof(ExtensionUriAttribute), false).ToArray(); if (attributes != null && attributes.Length > 0) { @@ -79,6 +79,11 @@ private static string GetExtensionUri(Type testLoggerType) } } + if (EqtTrace.IsErrorEnabled && string.IsNullOrEmpty(extensionUri)) + { + EqtTrace.Error("The type \"{0}\" defined in \"{1}\" does not have ExtensionUri attibute.", testLoggerType.ToString(), testLoggerType.Module.Name); + } + return extensionUri; } }