resharper

How do I keep Resharper Files out of SVN?

久未见 提交于 2019-11-30 17:33:48
I am using VS2008 and Resharper. Resharper creates a directory _Resharper.ProjectName. These files provide no value for source control that I am aware of and cause issues when committing changes. How can I get SVN to ignore them? I am using TortoiseSVN as my interface for SVN. EDIT: You guys are fast. Here's a link to show the ignoring process in TortoiseSVN Add the file names (or even the pattern _Resharper.* ) to the svn:ignore property for its parent directory. JasonS Gonna post an answer to my own question here as I read the manual after I typed this up. In TortoiseSVN, goto settings. Add

How do I keep Resharper from massively indenting lambdas?

爱⌒轻易说出口 提交于 2019-11-30 17:27:44
I have Resharper installed with mainly default settings. Currently, I'd like my multi-line lambda expressions to look something like this: foobarclass.biz.baz.Event += (s, e) => { foo.Bar.DoThings.Whatever(); }; However, Resharper "helpfully" will reformat my code to be like this: foobarclass.biz.baz.Event += (s, e) => { foo.Bar.DoThings.Whatever(); }; And in some cases, will also break up long statements so it ends up looking like this: foobarclass.biz.baz.Event += (s, e) => { foo. Bar. DoThings. Whatever(); }; As you can tell, this auto-formatting makes code a lot less readable. How can I

What are the benefits of maintaining a “clean” list of using directives in C#?

浪尽此生 提交于 2019-11-30 16:43:44
问题 I know VS2008 has the remove and sort function for cleaning up using directives, as does Resharper. Apart from your code being "clean" and removing the problem of referencing namespaces which might not exist in the future, what are the benefits of maintaining a "clean" list of using directives? Less code? Faster compilation times? 回答1: For me it's basically all about less noise (plus making Resharper happy!). I would believe any improvement in compilation time would be minimal. 回答2: If you

How do I keep Resharper from massively indenting lambdas?

久未见 提交于 2019-11-30 16:30:39
问题 I have Resharper installed with mainly default settings. Currently, I'd like my multi-line lambda expressions to look something like this: foobarclass.biz.baz.Event += (s, e) => { foo.Bar.DoThings.Whatever(); }; However, Resharper "helpfully" will reformat my code to be like this: foobarclass.biz.baz.Event += (s, e) => { foo.Bar.DoThings.Whatever(); }; And in some cases, will also break up long statements so it ends up looking like this: foobarclass.biz.baz.Event += (s, e) => { foo. Bar.

“Delegate subtraction has unpredictable result” in ReSharper/C#?

孤者浪人 提交于 2019-11-30 13:33:32
问题 When using myDelegate -= eventHandler ReSharper (version 6) issues: Delegate subtraction has unpredictable result The rational behind this is explained by JetBrains here. The explanation makes sense and, after reading it, I'm doubting all my uses of - on delegates. How then , can I write a non-auto event without making ReSharper grumpy? or, is there a better and/or "correct" way to implement this? or, can I just ignore ReSharper? Here is simplified code: public delegate void MyHandler (object

Is there a way, at design time, to initialize an object with all properties in Visual Studio 2010?

删除回忆录丶 提交于 2019-11-30 13:07:00
Background I am writing code in VS 2010, .NET 4, C#. Also, in case it matters, I am using the latest version of ReSharper. Question Let's say I have this model: public class SomeObject { public string Red{ get; set; } public string Green{ get; set; } public string Blue{ get; set; } public string Yellow{ get; set; } public string Purple{ get; set; } public string Orange{ get; set; } public string Black{ get; set; } } Elsewhere in the code, I need to instantiate one of these objects, like so: SomeObject myObject = new SomeObject{ red = "some value", blue = "some other value", . . ., black="last

How to run NUnit test fixtures serially?

一曲冷凌霜 提交于 2019-11-30 13:01:19
问题 I have several suites of integration tests implemented in C#/NUNit. Each test suite is a separate class, each fixture setup creates and populates a SQL Server database from scripts. This all used to work just fine prior to Resharper 5.1. Unfortunately, Resharper 5.1 begins to run several fixtures at the same time. This is a breaking change - they are all attempting to create and populate the same database, which obviously ends up in an mess. Is there any way I could have Resharper run my test

Access to disposed closure - mark methods as safe

柔情痞子 提交于 2019-11-30 11:28:52
This is about ReSharper's warning "Access to disposed closure" which usually appears when an object which is later disposed is used in a lambda. Access to disposed closure in C#? discusses this in a bit more detail. My question is: For methods that take such lamdbas and execute them immediately (so you can be sure they are always executed before the said object is disposed): Is there a way to mark them as safe, so that any code using that method does no longer produced those warnings? Example: using (var myObject = new MyDisposableObject()) { DoThisTwice(() => myObject.DoSomething()); } ...

backup and restore ALL resharper settings

大兔子大兔子 提交于 2019-11-30 11:24:23
问题 How can I backup and later restore (after a clean install) ALL resharper settings? 回答1: On XP Resharper stores its settings in: %userprofile%\Application Data\JetBrains\ReSharper\[R# Version]\[VS Version] and of Vista/7: %userprofile%\AppData\Roaming\JetBrains\ReSharper\[R# Version]\[VS Version] where [R# Version] is the version of ReSharper installed (e.g. v4.5) and [VS Version] is your Visual Studio version (e.g. vs9.0). Just copy all the files from that folder to backup, and put them back

Visual Studio 2010 extension for Go To Interface Implementation? [duplicate]

旧时模样 提交于 2019-11-30 10:57:26
Possible Duplicate: How do you quickly find the implementation(s) of an interface’s method? I like ReSharper's Go To Implementation feature but I often keep ReSharper disabled. Is there an equivalent extension for Visual Studio 2010? I'm looking for the extension for this little "go to implementation" too. But unfortunately I couldn't find any. May be we will have to wait next version of visual studio or enable ReSharper back (which in my opinion, eating too much resources) Well the best solution for me right now is to use "Call Hierarchy" feature of VS2010. Just follow my instruction below