resharper

Adding and removing multiple references across projects in Visual Studio

大憨熊 提交于 2019-12-07 03:55:08
问题 I have a huge project with over 50 or 60 csproj files. I need to remove 6 or 7 references exiting references and add 10 or 15 new references across all these projects. Is there a mechansim to bulk add references and remove references? Or if there is a way to say, replace reference X with Y across all projects, that would be very helpful too. Let me add that Nuget is not an option. 回答1: This one's easy: just write a script that opens up all your .proj files, removes the lines you don't need

Resharper: How to hide suppressed warnings in Inspection Results?

≯℡__Kan透↙ 提交于 2019-12-07 03:38:41
I suppressed a Resharper warning in a VB.NET class file (*.vb). As expected, the warning is not highlighted at the border of the text editor. If I show all Resharper warnings for my project I would expect that the suppressed warning is neither shown in the Inspection Results view. However, it is shown, see screen shot. How to I hide warnings in the InspectionResults that are suppressed in the code with an annotation? I am using Resharper 8.2.3 (If you have issues with public properties in respect to xaml bindings also see this related question: Resharper says OnPropertyChange set member can be

Find usages of inherited method only from a specific subclass?

两盒软妹~` 提交于 2019-12-07 02:45:51
问题 I have a superclass which is inherited by many subclasses. I would like to find all calls to a certain method in this superclass which originate from instances of a specific inheriting class. Is this possible in VS2012 (with Resharper 7.1)? Code example: public class Super { public void foo(Arg a) { ... } } public class Sub1 : Super { ... } public class Sub2 : Super { ... } public class SomeClass { public void Run() { ... var sub1 = new Sub1(); sub1.foo(a); var sub2 = new Sub2(); sub2.foo(b);

Register generic page base class

放肆的年华 提交于 2019-12-07 01:04:41
问题 I create my own generic page base class: public abstract class ViewPageBase<TModel> : WebViewPage<TModel> { public ParamBuilder<TModel> Param { get { return new ParamBuilder<TModel>(Model); } } } Web.config: <system.web.webPages.razor> <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <pages pageBaseType="ViewPageBase"> <namespaces> <add namespace="System.Web.Mvc" /> <add namespace="System.Web.Mvc

R#6 - Suggests “Use directory” in razor views. How to disable?

廉价感情. 提交于 2019-12-07 00:10:44
问题 I am using R#6 and when I edit some razor views, R#6 suggests that I "use directory". (Whine :)) I dont want to! How do I turn off this annoyance? I have searched through R#6 options. It is definitely R# since the annoyance goes away when i suspend R#. In the printscreen, R# wants to change /SignUp to ../Signup. It is incorrect because the view is the layout and could be in any directory structure. So i want it to be /Signup Solution: As derigel states. Wait for the warning to show. Hit

ReSharper ignore certain folder(s) on TODO explorer

风流意气都作罢 提交于 2019-12-06 23:08:43
问题 I use SignalR in my solution, their Nuget package brings in java scripts. It's OK, but problem is - there is TODO's in there which now shows up under my TODO list. So, I'd like to ignore specific folder(s) or file(s) when ReSharper scan's for TODO's I tried to exclude folder from "Code Inspections" but that doesn't seem to apply to TODO's. Possible? (latest resharper, vs2015) 回答1: ReSharper -> Options Under Code Inspection/Generated Code add folder/files to be excluded and TODO's from there

Resharper completion without overwriting existing code

若如初见. 提交于 2019-12-06 22:24:29
问题 In Resharper when I go back to edit some existing code.. eg. wanting to insert a String.Format into this code: <td> <%= Html.Encode(item.Address) %> </td> I move the cursor to before 'item' and type in 'String.F', getting Resharper's intellisense completion list that includes the 'Format' method. However if I press TAB then it replaces 'item' with '.Format()' Is there a way to use completing without replacing the existing text? 回答1: There are two techniques you can use. The first is to use

Resharper installed, now no automatic code prompts in immediate window

那年仲夏 提交于 2019-12-06 21:47:58
问题 I've become accustomed to using ReSharper, so uninstalling it is not an option. However 1 little thing that I would like to try fix is the immediate window, I used to get automatic intellisense prompts when for example typing myObject. That seems to no longer be working (and only in immediate window while debugging) since I installed ReSharper. Any ideas on how to get it back? 回答1: Unfortunately, if you're using the ReSharper intellisense (instead of the Visual Studio one), it won't work. I

Cannot resolve Symbol ObjectStateManager

北城余情 提交于 2019-12-06 20:14:38
问题 I have getting an Error of " Cannot Resolve Symbol ObjectStateManager " when trying to call it on my Database context from Entity Framework 4. I can't find anyone else having this issue. I have tried using System.Data and System.Data.Objects . Is there a specific Entity Framework that needs to be made in order to use the ObjectStateManager? Or Am I missing some sort of install package? I am using Database First Entity Framework. Here is the code it is giving my error: (Line 7) [HttpPost]

Resharper and ViEmu Keybindings ( and Visual Assist )

元气小坏坏 提交于 2019-12-06 19:39:24
问题 With ViEmu you really need to unbind a lot of resharpers keybindings to make it work well. Does anyone have what they think is a good set of keybindings that work well for resharper when using ViEmu? What I'm doing at the moment using the Visual Studio bindings from Resharper. Toasting all the conflicting ones with ViEmu, and then just driving the rest through the menu modifiers ( Alt-R keyboard shortcut for the menu item ). I also do the same with Visual Assist shortcuts ( for C++ ) if