resharper

C#: alternative to Resharper, C# version [duplicate]

你。 提交于 2019-12-14 03:43:46
问题 This question already has answers here : What are some alternatives to ReSharper? [closed] (9 answers) Closed 6 years ago . It's not quite cheap for me (149 USD). I tried it and I loved it though. The most cool thing for me is refactoring to LINQ. So I was wondering if there is a cheaper alternative that can do that same - refactor my loops into smaller LINQ ones? 回答1: DevXpress Refactor! Pro is similar, and is $99 per license. Telerik also makes a refactoring add-in, but it's more expensive

ReSharper C# naming style for private methods and properties

橙三吉。 提交于 2019-12-14 03:39:57
问题 I like to make the first letter of private methods, properties and events lowercase and the first letter of public methods, properties and events uppercase. However, in ReSharper 7.1 there is only one option under C# naming style that applies all methods, properties and events. What is the best way to tell ReSharper to use a different convention for private only? 回答1: You can create your own Naming Style Rule. Resharper Options => Code Editing => [Language] => Naming Style => Advanced Options

How to prevent ReSharper from creating folders in solution?

青春壹個敷衍的年華 提交于 2019-12-14 01:30:18
问题 ReSharper 6 creates folders like ReSharper.projectname with the files and folders below in it. That caused a lot of problems with MSDeploy and source control in general. I had to add ignore rules everywhere. What's the right way to prevent that from happening? Is switching back to Visual Studio Intellisense enough? 08/05/2011 02:21 PM 8 AspFileDataCache.dat 08/05/2011 02:25 PM <DIR> BuildScriptCache 08/05/2011 02:25 PM <DIR> JavaScriptCache 08/05/2011 02:24 PM <DIR> JbPdbInfo 08/05/2011 02:25

How to include observables in computed and get around resharper warning?

廉价感情. 提交于 2019-12-13 19:21:04
问题 I'm trying to get around a resharper warning about unused variables. Here is my current function: self.contentDimensions = _i.ko.computed(function () { var fakeVarToFireComputed = self.contentSize() + self.ListLength(); var firstEl = _i.$(itemSelector, self.viewRef()).first(); if (firstEl.length > 0) { return { width: firstEl.outerWidth(true), height: firstEl.outerHeight(true) }; } else { return self.contentDimensions(); } }, this, { deferEvaluation: true }); But since fakeVarToFireComputed

How to use the StyleCop Plugin with the Resharper command line or “InspectCode” tool

跟風遠走 提交于 2019-12-13 18:28:39
问题 We use Resharper with the StyleCop plugin. It works great inside Visual Studio without any problems. Now I'd like to get statistics about our projects. I am building all our solutions from the command line and so far managed to get the output from the compiler (warnings) static code analysis (ex FxCop) and unit testing (results and coverage). JetBrains offers a commandline tool that does code analysis for free (Link). I'm using it and it works as expected. The command line version does not

Resharper (R#) 4.5 and MVC (1.0) solutions cause Visual Studio 2008 SP1 to crash on solution load

大城市里の小女人 提交于 2019-12-13 16:17:01
问题 Does anyone have the issue with Resharper where opening a solution with MVC projects causes Visual studio to close/crash? No Errors, no warning, just close. To fix the problem, I have to delete the bin and obj folders from the MVC project directory which allows the solution to be opened again. When the solution is loaded, sometimes opening a .aspx/ascx file will close visual studio too. I've never lost any work from this other than the occasional mismatched project/file system. Any help is

Can we integrate Resharper-cli with TFS

冷暖自知 提交于 2019-12-13 16:13:20
问题 I am trying to integrate resharper with TFS build .Can anybody let me know if it is possible to integrate resharper-cli with TFS 回答1: You could try the free new Resharper Command line tools. It has Duplicate Analysis and Code Analysis that you can run from the command line and probably integrate with TFS. 来源: https://stackoverflow.com/questions/18570804/can-we-integrate-resharper-cli-with-tfs

autocompletion of parameter : list static fields without typing a ClassName::

雨燕双飞 提交于 2019-12-13 16:09:05
问题 How to make auto-completion list all (static) fields of a certain class that has appropriate variable-type when ctrl+space at a slot of parameter in a certain function? Example I tried to ctrl+space in the below code :- (Code as text is here.) Question: How to make it show E_1 E_2 E_3 ? I don't mind another plugin if I really need one. It currently works but only for enum :- My workaround In practice, to get smart clue, I have to type more ( PrototypeList:: ) :- Bounty Reason Here is the

Even “IsNullOrEmpty” checks give “Possible multiple enumeration of IEnumerable” warnings

本秂侑毒 提交于 2019-12-13 12:52:41
问题 There's a question on SO about "possible multiple enumerations" already, but this question is more specific. Please consider the following method, which takes an IEnumerable<string> as input and executes a given method against each of its elements: public static bool SomeMethod(IEnumerable<string> enumerable) { if (enumerable.IsNullOrEmpty()) { // throw exception. } else { return (enumerable.All(SomeBooleanMethod)); } } In the code above, IsNullOrEmpty is just an extension method which runs

getting message condition is always true

让人想犯罪 __ 提交于 2019-12-13 08:24:25
问题 I'm getting message from resharper as condition is always true for following code if (filters == "answers" || "solution") { } what's happening here in this code? 回答1: if (filters == "answers" || "solution") { } In the above code "solution" is true always So, Change to this if (filters == "answers" || filters =="solution") { } Example If("i") { } Above is true always. So, In your code the second condition returns TRUE always As per the Boolean OR , [Anything with TRUE] is always TRUE You have