提交 6b954a19 编写于 作者: J Jason Malinowski

If you forget a Language attribute, give a useful message

上级 c16f7d86
......@@ -466,7 +466,13 @@ private static string GetAssemblyName(TestWorkspace workspace, XElement projectE
private static string GetLanguage(TestWorkspace workspace, XElement projectElement)
{
var languageName = projectElement.Attribute(LanguageAttributeName).Value;
var languageAttribute = projectElement.Attribute(LanguageAttributeName);
if (languageAttribute == null)
{
throw new ArgumentException($"{projectElement} is missing a {LanguageAttributeName} attribute.");
}
var languageName = languageAttribute.Value;
if (!workspace.Services.SupportedLanguages.Contains(languageName))
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册