Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts

Thursday, June 27, 2019

Useful Visual Studio Extensions and Addons

JetBrains ReSharper
ReSharper extends Visual Studio with over 1700 code inspections for C#, VB.NET, ASP.NET, JavaScript, TypeScript and other technologies. For most inspections, ReSharper provides quick-fixes (light bulbs) to improve code in one way or another.

SubMain GhostDoc
GhostDoc is a free Visual Studio extension that automatically generates XML documentation comments for methods and properties based on their type, parameters, name, and other contextual information.

HideShow Comments (Visual Studio 2010, 2012,2013)
Hides comments and replaces them with a callout icon. The comments are shown as tooltip and when editing them.

Visual Studio Spell Checker (Visual Studio 2013, 2015)
An editor extension that checks the spelling of comments, strings, and plain text as you type or interactively with a tool window. Extra options are available to control how elements and attributes in XML and MAML files are spell checked.

Ref12 (Visual Studio 2013, 2015, 2017, 2019)
This extension lets you press F12 or use Go To Definition command to open the source code for anything in the .Net framework. You can easily jump to the actual source for things linq LINQ or WinForms or ASP.Net and see how they're implemented, including original comments. Just place the cursor on any class, function, or constant in the .Net framework and press F12 to open your default browser. No more “From Metadata” tabs!

SpecFlow
Use SpecFlow to define, manage and execute automated acceptance tests from business-readable specifications. SpecFlow acceptance tests follow the BDD paradigm: define specifications using examples understandable to business users as well as developers and testers. SpecFlow integrates with Visual Studio, but can be also used from the command line (e.g. on a build server).

Visual Studio Favorites (Visual Studio 2015, 2017, 2019)
Add a Favorites menu to Visual Studio to keep track of locations in Source Control or files in a Solution.

Monday, June 3, 2019

Visual Studio: Ignore Whitespace During Compare

Visual Studio, by default, will include whitespace in its comparison when comparing two files.

This is a workaround that seems to get around the problem.

In Visual Studio, select Tools / Options / Source Control / Visual Studio Team Foundation System and click the Configure User Tools button.

In the dialog, Add an item with the following settings:
  • Extension: .*
  • Operation: Compare
  • Command: C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\diffmerge.exe
  • Arguments: %1 %2 %6 %7 %5 /ignorespace

Depending on your Visual Studio version and installation path (x64/x86), the command option may be…

VS2010: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\diffmerge.exe
VS2012: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\diffmerge.exe
VS2013: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\vsDiffMerge.exe
VS2015: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\vsDiffMerge.exe
VS2017: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\vsDiffMerge.exe
VS2019: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\vsDiffMerge.exe

In the argument option leave it with the same number of arguments as the VS suggests and just add /ignorespace in the end. For example, in the VS2015 it will be:
%1 %2 /ignorespace
You can configure older versions of Visual Studio to use the latest Visual Studio compare tool using this method as well. Just set the path for the Compare tool in the older version to point to the path of the newer version.

Performance: Linking a List of Child Objects To a List of Parent Objects

Many a time I've had to build a relationship where a parent object has a list of child objects linked to it, where the parent itself als...