-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot run C# tests #2544
Comments
@denisvlah The red error flame is not because of omnisharp process crashing. It is because of a typical mono behavior and we have already fixed that in master: #2540. From your omnisharp log I don't see any error being printed. Since you are saying that it works on small projects, can you try "omnisharp.projectLoadTimeout" to a higher value and then "Ctrl+Shift+P --> Restart Omnisharp"? |
@denisvlah Any updates here ? |
The OmniSharp doesn't timeout. Intelicence and code navigation and code suggestions works perfect, it just not show links to run tests. Update: Also notice that the custom TestAttribute is inherited from Xunit.Fact and it is used to mark test method in CalculatorTest class. If you use standard Fact attribute it works fine. It worked fine in the previous version. In my prod environment I have ported hundreds Nunit tests to Xunit testing framework using such kind of hack. |
@denisvlah I can totally reproduce the problem. More information: We will get it resolved as soon as possible. Thank you for your patience. |
On investigating further, the line here is throwing the exception: Because it is adding two values for the same key -"testFramework" - xunit and nunit |
When I changed the namespace "NUnit.Framework" to "abc.Framework", everything works fine. |
Closing this issue as it is very specific to the project I am working on and a better way to go is to refactor all tests to use NUnit3 with standard [Test] without additional hacks. |
Environment data
.NET Core SDK: 2.1.401
OS Name: ubuntu 16.04
VS Code version: 1.27.1
C# Extension version: 1.16.1
Steps to reproduce
Expected behavior:
Links Run|Debug should appear above each test method
Actual behavior:
Links Run|Debug don't appear.
It worked in previous version. Also it works on small projects.
The OmniSharp log is ok - no error messages.
At the same time the OmniSharp icon display that it has errors:
Also there are errors in Window log.
I have also attached the VSCode Window log with errors:
WindowLog.txt
And OmniSharp log:
OmniSharpLog.txt
The text was updated successfully, but these errors were encountered: