2016-11-29 54 views
5

無法運行測試,因爲空。調試xunit測試時視覺工作室代碼錯誤

試圖運行xunit測試的奇怪錯誤visual studio代碼

enter image description here

+0

看來,這個錯誤消息來自https://github.com/OmniSharp/omnisharp-vscode/blob/master/ src/features/dotnetTest.ts#L52 您是否試圖運行.net框架xUnit測試?看起來像只有dotnet核心測試支持!? –

+0

哈 - 小字體 - 這是一個普通的dotnet項目 - 你想發佈作爲答案 - 我會堅持與工作室 - 它重新啓動:-) – Jim

回答

0

對我們來說問題是嵌套類。 OmniSharp不能處理這個問題:

public class SomeClass 
{ 
    public class SomeMethod 
    { 
     [Fact] 
     public void SomeTest() 
     { 

     } 
    } 
} 

它能但是處理這個問題:

public class SomeMethod 
{ 
    [Fact] 
    public void SomeTest() 
    { 

    } 
}