Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

Visual Studio {}

Is there a way to make Visual Studio.NET automatically insert your "}" when you type a "{" at the begining of a code block?

Brian
Thursday, June 10, 2004

Like a macro?

Kyralessa
Thursday, June 10, 2004

Yes, by downloading ReSharper. :)
http://www.jetbrains.com/resharper/

Chris Nahr
Thursday, June 10, 2004

Visual Assist-X (http://www.wholetomato.com/) provides this feature as well as numerous others.  I use it with VS6/C++, but apparently the new version supports C#, etc.

Adam P
Thursday, June 10, 2004

Chris,

Resharper looks great... thanks.

Brian
Thursday, June 10, 2004

Beware of ReSharper right now. Don't try to uninstall it, or it'll hose your VS.NET installation.

Brad Wilson (dotnetguy.techieswithcats.com)
Thursday, June 10, 2004

Nonsense. I've uninstalled the last couple of preview versions of ReSharper with no problems.

What was the version that you had a problem with? Or are you referring to key bindings?

Chris Nahr
Friday, June 11, 2004

Ah, I've found the bug you're referring to -- its was reported in build 74 or thereabouts and has been fixed by now.

Unfortunately I've just found another bug related to uninstalling ReSharper... it breaks all other add-ins! They have to be manually uninstalled and reinstalled, and reinstallation may not even work.

On top of that, I've found another catastrophic bug in the current build 86: ReSharper randomly duplicates lines in large source code files, without any user interaction, and appends them to the file when closing it!

So I have to agree with Brad. I'm sorry for my recommendation, I retract it and recommend that you stay away from ReSharper for now. Would have been too good to be true, I guess. :-(

Chris Nahr
Friday, June 11, 2004

Ugh, it's worse than I thought. After uninstalling ReSharper, a *FULL REPAIR INSTALLATION* of Visual Studio .NET 2003 was required before I could reinstall the devMetrics add-in so that it worked!

Profoundly sorry for recommending this obviously very immature tool.

Chris Nahr
Friday, June 11, 2004

There are a lot of other tools that feature macro or template capabilities in VS .NET. CodeRush from Developer Express is one. Or for that matter you could write your own macro and bind it to some other key than {.

Mike Gunderloy
Friday, June 11, 2004

Chris, it was even worse for me. Not only did it kill all my plugins, but it also killed all the wizards. Even the simple things like "Add new class" would fail. Adding new classes meant I'd have to go create a file by hand (such as via Explorer or a command prompt), then go to VStudio, tell it to show everything, find the file, right click to Include it in the project, then un-show.

Pain the butt.

If I weren't doing dev inside a VPC, I'd've been REALLY pissed off.

Brad Wilson (dotnetguy.techieswithcats.com)
Saturday, June 12, 2004

From what I can tell the company doesn't have any experience doing VS.NET add-ins, didn't follow any guidelines (in addition to the uninstallation problems, what's up with all the junk in the Private Assemblies directory?), barely tested anything before the public test releases, and then focused on adding features rather than fixing bugs, despite running late for the release deadline.

It's too bad since ReSharper is damn near perfect as features go. None of the other add-ins I've looked at (AxTools, CodeRush, Visual Assist) comes even close. On the other hand, those other tools don't break Visual Studio or my solutions...

Chris Nahr
Saturday, June 12, 2004

I use resharper - and like it and hate it in equal measures.

You have to keep telling yourself that it is an eap and therefore will contain bugs.  If you use their error reporting system, the bugs should get fixed in the next release or two.

I have found that despite its current annoyances (slow loading caches, it's intellisense getting in the way etc etc) there are a couple of functions that I really couldn't do without i.e. Find usages / Find inheritors and Find declaration (which actually finds the declaration of the function you specify not just any 1 of the overloads - like what VStudio does)

If you find that your wizards go kapput - i.e. can't add a class, form or whatever to projects then do one of the following before jumping in and doing a full Vis studio repair / reinstall

Reinstall the windows scripts
[http://www.microsoft.com/downloads/details.aspx?FamilyId=C717D943-7E4B-4622-86EB-95A22B832CAA&displaylang=en]

if that don't work, try registering (Regsvr32) the following dll

C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\vcpackages\csproj.dll

I think resharpers installer / uninstaller somehow unregisters this file.


Tip: Uninstall your old version of resharper before installing a new version.

Chris Fewtrell
Thursday, July 08, 2004

*  Recent Topics

*  Fog Creek Home