Resharper always puts tests as inconclusive or aborted - c#

I have VS 15.3.4 and ReSharper 2017.2.1
Whenever I try to run xunit test it shows after run "Inconclusive: Test not run" or "Aborted". Same tests run in VS TestExplorer just fine.

Start Visual Studio in logging mode:
devenv.exe /ReSharper.LogFile C:\temp\resharper.log /ReSharper.LogLevel Verbose
If your log file contains “System.FormatException: String was not recognized as a valid DateTime”, then you have to exit Visual Studio and to change Windows datetime format in control panel to US and try again. If tests run fine, then you can switch dateformat back.
This is kind of similar problem described here: https://resharper-support.jetbrains.com/hc/en-us/community/posts/206702965-Cannot-get-Resharper-to-work-with-VS-2015

Well some additional information would be great.
But I had this problem one time myself in a testclass with over 30,000 lines of code - so my solution was to "Disable Analysis" for this file.
You can do this by right clicking at the top of the scrollbar on the right.
There should be some Symbol, like a blue circle or a green button - if it´s disabled you see a circle with "II" in it.
Edit:
Make sure to have an open Test Session Window, because the "Run" symbols on the left side will disappear.

Related

How to run/test app in Debug mode (F5) and have Output window still visible during the app run (VS Express 2015)

I am new to Visual Studio Express 2015 and whole C# stuff (I come from the JAVA world).
I want to see some test string output (like checking variable values etc.) I am sending with Debug.WriteLine() during Debug mode run (F5), but the output window disappears immediately (is replaced by split dual windows). Yet when I close the running app, output window shows up back again WITH MY TEST STRING OUTPUT from Debug.WriteLine(); there - how come?
This is what I call "output window" (sorry, don't know how to call it when it has written Output on it, really...)
This is what I see when I test/run (F5) my app ("output" window is gone):
And this is what I see when I stop/close my app - "output" window is back again also with my test string I sent with Debug.WriteLine():
How can I run my app in Debug mode and also make that output window still visible during the run/test, so I could see my string output in realtime?
I need to see some test values I am sending to the output, or is there some other way how to do this in C#/Visual Studio Express 2015?
In JAVA I use NetBeans and I use Output window/CMD exactly for this, so I thought this is its equivalent. And as I see the output actually is there, it probably is, right?
Just to clarify even more: I am not creating console app that runs in CMD window, I just need to see that test output somewhere and I thought - being completely new to C# coming from JAVA - that the Output window is the place where I can see it.
Like when you C# guys need to see some test values in realtime during the app run/test, how do you do that - where your output goes? Or are you telling me there is nothing like this in Visual Studio GUI (I don't think so as I see after the app is closed my test value is present in that "output" window - the window is just not there during the app run, so...)?
I have the namespace using System.Diagnostics; in place, yet it still act as described above: in Debug mode the output window disappears, so I don't know what the string output is (have no clue how to make the window being visible still) and only comes back again once the app is closed (then there is my string output presented in the output window), with the Release mode the output window is there but no string output is displayed - it stays completely empty during the app run/test.
You just need to enable it..through the Debug->Windows->Output

C# stopped working properly after break from project

Two weeks ago, I decided to take a break from my Unity game project, but, when I came back, I was bombarded with errors on code that works just fine.
This screenshot best describes my problem:
When I hover over "using UnityEngine", it says it's an unnecessary using directive...
I know this problem
and it also happens to me when I take breaks from my code base.
To solve the problem you need to close VS Code and VS and then the Unity Editor as well. Be sure that even their processes are stopped (e.g. through the task manager). Then reopen your Unity Project and wait for all the loading processes to end(you can see that in Unity 2020.x.x in the lower right corner). Then doubleclick a script of yours to open up VS Code or VS. Important!! Dont press or type anything yet as the OmniSharp Server and all your extensions have to load in first. When you see the OmniSharp Server running in the lower left corner and it says "Ready", only then you can start coding.
Explanation
If VS Code isnt fully loaded and you start coding it doesnt detect all libraries and begins to act as mentioned. Be sure to only start coding when the VS Console says "Ready" in the lower left corner.

How Do You Clear the macOS Terminal Pad In Visual Studio For Mac?

I'm debugging a C# console application using Visual Studio for the Mac. I'm using frequent Console.WriteLine() statements.
Is there anyway to clear the output of the Terminal - macOS pad where the Console output is displayed every time I run / debug the program? I've tried calls to Console.Clear() to no effect. I have seen suggestions to use Cmd-K but that doesn't work. Other suggestions are all for VSCode, not Visual Studio.
Surely I can't be the only one who finds seeing the old output distracting when debugging?
You aren't alone. I was just wondering why it didn't clear the screen either. There is an option to use Terminal, instead of the built in terminal. Check under Preferences > Terminal, then remove the check mark next to "Enable Integrated Terminal" and it will just pop up in a normal terminal which doesn't seem to have that issue. If you figure something else out let me know though.
You may deactivate and reactivate the integrated terminal in : preferences\terminal options\uncheck\check. You may have to close VSFM between the uncheck\check process in order to clear the entre data. That way, it does clear the terminal data, but I would prefer some fast “clear” kind of short-cut options instead.
Have a good one.
Prog
Close the terminal window, then the next run will open an empty one.
I call Console.Clear() at first line each time Run project
I came here looking for the solution as I couldn't figure it out for the life of me, tried 'cmd + k' and it worked.
I could have sworn I'd tried it in the past with no success.
Maybe a few points that will help:
Have the terminal selected.
The terminal line has to empty.
New to coding, first stack overflow comment, hope this has some value.

Is there a way to see a history of function calls in visual studio?

Working on a project that keeps crashing. No errors and showing up, my memory monitor tells me that everything is normal and as far as I can see there is nothing aberrant in my code it just stops working, freezes. Is there a way to see a history in visual studio of function calls so I can ascertain accurately the last thing my program does before it breaks?
Thanks!
menu bar -> DEbug -> Windows -> Call Stack

Visual Studio 2008 : Step to next line is very slow when debugging managed code

When stepping through my C# code line by line via F10, it takes the debugger over one second to get to the next line.
I've tried deleting all watches and breakpoints, but that did not make any difference.
Is this normal? It's been like this for quite a long time now, so I can't even remember if this was ever better. My development computer is a Quad-core machine with no background task activity and plenty of RAM left.
If it's not normal, what else could I try? It's still ok to work with, but a less sluggish user interface would be great...
What's likely happening is you have a variable in the call stack frame which has an expensive .ToString method. In 2008, the data for the call stack window is rebuilt on every step regardless of whether or not the window is actually visible. Part of building this window will call .ToString on the values which appear in the parameter list if they have an overridden .ToString. Try disabling implicit .ToString calls and see if that fixes the problem.
Tools -> Options -> Debugger
Uncheck the "Enable Implicit .ToString calls"
I have found that if you have the option to debug unmanaged code turned on, the debugger can take a while to step between lines even if you are only debugging managed code. Try turning that option off (Project > Properties > Debug > Enable Debuggers > Enable unmanaged code debugging).
I tried all of the above. Unchecking 'Show Threads In Source' button fixed it.
In my case, disabling "break all processes when one process breaks" (Tools/Options/Debugger) reduced the time to "step over" from 2-3 seconds to a fraction of a second.
I have no idea why this option had such a big effect on doing a single step over.
BTW, I suppose that disabling this option might cause trouble if you are using threads that are not independent from each other.
I once experienced slow debugging as I had set up VS to look for pdb files on a network share that didn't exist any more.
Check here : Tools - options - Debugging - Symbols - Symbol file (.pdb) Locations
I've heard of this kind of problem if the "Auto" window is open. Try closing that and see if your performance improves.
If you haven't already, you should probably also install the "Visual Studio 2008 SP1 debugging and breakpoint" patch. Note that this patch goes on top of SP1. The docs for the patch don't specifically address the slowness that you're seeing, but it's a pretty large patch, and you might get lucky.
Turn off the Enable address-level debugging option in Tools > Options > Debugging > General.
It made a huge difference for me.
Do you have a lot of Watch expressions set up ? They will be evaluated after between each step, and if they take time to run, you will notice it as a delay when stepping.
I was experiencing a 10 second delay after stopping C# debugging before being able to start C# debugging again. VS2008 would hang during this time with nothing clickable. There is now a 0 second delay after I disabled the Visual Studio hosting process in Project Properties -> Debug.

Categories

Resources