A few months back, I used to be able to click a circle in the code margin, and the given unit test would run (attributes [TestFixture] / [Test]).
Now on my VS2010, the only way to run a single unit test (NUnit is being used) is to type ctrl+alt+U (or do the same via the resharper menu), select the test, and press the debug button.
Anyone know where those code margin buttons went + how to get them back. The icon was a single circle coloured in two halves.
which exact version of resharper do you use? I have Resharper 6.1.37.86 and this option is there.
Also try checking resharper options: Resharper -> Options -> Tools -> Unit testing. Both 'Enable unit testing' and 'Enable NUnit support' should be checked.
Problem was solved by installing a new version of Resharper.
Related
In Resharper for Visual Studio, often I want to use a refactoring suggestion and I'm not sure whether it is part of Resharper or VS. Sometimes I have to push Ctrl+. to open Resharper's refactorings and then hit escape and then push Alt+Enter to open VS's wrench or light bulb.
Is there a way to combine these into one menu or otherwise see both, of course without losing the VS refactorings?
ReSharper used to be able to merge VS actions into the Alt+Enter menu, but right now as of 2022.3 this functionality is broken (see RSRP-486822).
I suggest you disable "Hide Visual Studio Quick Action icons in the left editor margin" setting in R# options. This was you will be able to see VS actions using Ctrl+., and R# actions using Alt+Enter.
Currently when I run Full Cleanup on a file with NUnit tests R# totally ruins it. For some reason it reorders the methods with [Test] in alphabetical order. How can I turn this "feature" off?
I'm using version 9.2.
This is explained in the documentation here
you need to go to Code Editing | C# | File Layout page of ReSharper options and then remove the default NUnit layout pattern (or change it so that it doesn't reorder alphabetically)
The simplest way to do this via the ui (which seems to be very confusing) is to double click each Type Pattern and make sure you are in composition view (click the icon in the top right corner until its a cog) then double click the method Entry elements until you find the one which has the constraint for the attribute for NUnit framework (somethign like this):
and then change the Sort By option in the bottom right of the main settings window to be none
Whenever I open any solution in VS2012 from local path (which is mapped in TFS), the files are automatically checking out. I want to disable this feature.
I tried to disconnect from TFS and to work on it, But it is closing the solution. Plesase help me out in achieving this. I didn't get this problem before when I was using VS2010
You need to unbind your project(s) from TFS source control.
Select the project or solution from the Solution Explorer
From the main menu select File->Source Control->Advanced->Change Source Control...
Select one or all projects and press the "Unbind" button on the top of the dialog
select ok to the warning popup
You can later bind the projects again, personally I don't do this so I can't say how well it works. I found some more info here
Here are the visual steps:
This brings up the dialog to select projects to bind/unbind.
I had to select one at a time.
Select "Unbind" for each project
Here's what it should look like when unbound.
You can later come back and bind the projects again and TFS will try and reconcile your changes.
Try rather change Checked-in items (Saving, Editing) to 'Prompt for check out'
Tools -> Options -> Source Control -> Enviroment -> Checked-in items
Disable the following option. It should solve your problem.
Tools -> Options -> Source Control -> Enviroment -> Get everything when a solution or project is opened
I noticed a strange behaviour in my VS2012 installation. I use VS2012 Pro and ReSharper 7. Intellisense is just not showing code suggestions anymore. I found a few related questions in my research but they always had a slightly different setup going and none could solve my problem:
Intellisense is working but, it's not showing the tooltip about selected member functions/Properties anymore.
If I take a look at the C# Text Editor Settings in
Tools -> Options -> Text Editor -> C# -> General
Most of the times the two necessary boxes Auto List Members and Parameter Information are selected. However, code suggestions in Intellisense don't work. Sometimes, when I look at the described settings, they are unselected.
Selecting them will make code suggestions work as in VS2010 but, only once. When I check the settings afterwards, they are most likely still selected, but code suggestions are not working anymore.
Some people suggested deleting the %AppData%\Roaming\Microsoft\VisualStudio\11.0 Folder, which did not work for me. I also tried to reset all changes, which also didn't help at all.
Tools -> Import and Export Settings -> Reset
What in the world could make Visual Studio to just forget its settings and trigger such an irrational behavior?
-edit-
I display the code suggestions by pressing CTRL+Alt+Space. However, I have to press that shortcut every time I want to see the suggestions. It has to be possible to automatically display them every time, when possible?
I was having a similar problem, but I kept overlooking one small ReSharper Intellisense setting. I would double check that you have Symbol completion on in
ReSharper | Options | Intellisense | Completion Characters
Check out the answer with screenshots.
Thanks for all the tips, I figured out what I had missing:
I had to enable "Completion Appearance" -> "Show Summary".
I also accepted Anthonys answer because he linked to a detailed post with screenshots that shows all steps necessary. (Although the thing I had missing is not mentioned there)
ReSharper uses it's own code suggestions that override Visual Studio ones, that could be the reason why the ones in the Visual Studio settings may be disabled. Please check ReSharper options at ReSharper -> Options -> Environment -> IntelliSense. Maybe they are turned off there. If your ReSharper options are turned on but you still have no intellisense, then please ReSharper's support at http://www.jetbrains.com/support/
I've got the latest mspec from the codebetter teamcity site and installed the Resharper5.1 runner as suggested. The runner and the annotations show up fine in the resharper option dialogs.
Now even with the annotations library ticked I still get "field xxx is never used" warnings everywhere and when I ask resharper to run all tests in the solution it doesn't seem to find my specifications.
I have unblocked the dlls.
Using resharper 5.1.
"Field xyz is never used" warnings only go away for classes that have the Subject attribute applied. If you don't use Subject you can work around the issue by disabling warning 169 in your spec projects.
Some questions about your issues with solution runs:
Did your enable MSpec under ReSharper | Options | Unit Testing?
Do specification runs for projects
(as opposed to solution runs) work
for you?
Can you start
specifications by clicking the
green/yellow icon in the gutter?
Does the Unit Text Explorer window
correctly reflect the solution's
contexts and specifications?