Best Visual Studio extensions and applications

The list of tools beneath are tools that I use every day! Some are extensions for Team Foundation Server but also extensions for Visual Studio, awesome Nuget packages or general tools.
It are the best Visual Studio extension and applications that I could find.

Visual Studio Extensions

  1. EnterpriseLibrary.Config
    This is a handy tool for your Enterprise Library packages. With this tool you can edit your config with an interface.
  2. GhostDoc
    I use the free version of this but you also have a payed version of this.  With this tool you can generate your summaries above your code. It will also generate documentation for parameters, properties, field, methods etc.
  3. NuGet Package Manager
    I think there is no explanation needed for this…
  4. Target Framework Migrator
    With this extension, you can change all (if you want) your projects to a specific version of the .NET Framework with just one click.
  5. Team Foundation Server Power Tools
    Extra handy things for getting some information out of your TFS server.
  6. Web Essentials
    Handy tools for developing web applications. This allows you to minify and bundle your Javascript code and gives you other things like intellisence for extra languages in Visual Studio.
  7. Wix Toolset
    There is no MSI installer anymore in Visual Studio 2012. You can still use Wix to create your MSI installers.
  8. Recent workitems
    Show a list of last 5 associated workitems in your pending changes window
  9. Last workitem
    Select your last associated workitem
  10. AutoMerge
    AutoMerge your changeset over branches in TFS.
  11. Code Review Checkin policy
    A checkin policy for checking you have requested a code review.
  12. DevExpress CodeRush
    Faster coding and shortcuts in Visual Studio
  13. My History
    Your last history items like workitems or changesets
  14. Sandcastle
    Help file generator for your code.

Applications

  1. TFS Team Project Manager
    Manage your TFS team projects.

NuGet packages

  1. StyleCop
    Create defaults for your team about documentation and code formats.
  2. StyleCop Checkin Policy
    My own checkin policy for validating your StyleCop rules.
  3. Ninject
    Very easy dependency container for fast building applications.
  4. CuttingEdge.Conditions
    Small syntax for creating validation of your objects.
  5. NBuilder
    Generate test data based on your own POCO class.
  6. AutoMapper
    Map your classes from type A to B with just own line of code.

How to fix the CA0053 error in Code Analysis in Visual Studio 2012

I upgraded one big Team project with a lot of different solutions (to separate stuff) to Visual Studio 2012. The custom Code Analysis gave me an CA0053 error on the build server. So I searched for the problem and came to this great blog post: How to fix the CA0053 error in Code Analysis in Visual Studio 2012. This solved my problem. I removed all the tags CodeAnalysisRuleDirectories and CodeAnalysisRuleSetDirectories. This was enough. Now Visual Studio 2012 would get the latest Code Analysis dll’s.

When queued another build, I still got the same error. This was not in all solutions so it had something to do with the solution file or with some of the projects inside it. After removing the project one at the time (after each try the build succeeded) I did a reset of the solution file so that was the same. At the end, all projects where the same and I still got the error. I then searched for a difference between solutions files.

There was the solution, the version of the file format was different and the Visual Studio version was different.

image

I think that I know what the cause of the problem is. Because we have a lot of different solution files (with overlapping projects in it), all the upgrades to Visual Studio 2012 where already done. Because they where already done, no file change was done so the format file version wasn’t migrated to the Visual Studio 2012 version. The custom ruleset in the projects where searching for the Visual Studio 2012 dll’s but the solution was build in Visual Studio 2010 on the build server because of the different format version.

Hopefully this fix will help someone. Let me know!

 

Update 11/06/2013:

We upgraded our solution to VS2013 and the Custom Code Analysis didn’t work again. So I builded the custom rules in VS2013 and used that version of the DLL. Now the clients worked again. When I started a CI build, the build failed with the CA0053 error. It seems that the build server has (in my opinion) a bug that it uses the format version of your solution file -1 to determine the Visual Studio version. Visual Studio 2013 uses the same format version as VS2012 (version 12) so you will end up with VS2012 on the build server. But because we have builded the custom rules against VS2013, the buildserver wont recognize the rules. The solution is to add the /p:VisualStudioVersion=12.0 parameter by the “MSBuild Argurments” in your CI build definition.

Minification and Bundling in MVC 4 RC

Asp .NET MVC 4 Release Candidate is out. One of the features that is included is called the minification and bundling feature. This was already there in the beta but in the release candidate version it has changed.

Why should we use it

The reason why we should use the bundling and minification feature is performance. The features increases your loading performance of your website. Every time you reference a JavaScript (like jQuery or your own), or CSS file in your page, the browser makes a call to the server. This is done for each separate reference. Each referenced file has included all the comments and spacing in your file. This makes the file larger then when we should delete those spaced. The bundling and minification feature does this for us.

How does it work

In your Global.asax the CSS and JavaScript files are Bundled with BundleConfig.RegisterBundles(BundleTable.Bundles); line.

image

image

Reference the files in your page.

image

When you run the application and use Fiddler to view the calls to your server, you still see all the files called separately.

image

image

This is because the Bundling and Minification feature by default only work when your not in debug mode. This handy because then you could debug with all the whitespaces in your files and have the performance in the production environment.

See the difference in your production environment:

image

image

Force Bundling and Minification

You can use the BundleTable.EnableOptmizations override but the best way for a little test is to remove the debug=”true” attribute in your web.config.

image

Browser caching

When the feature is active, the browser will cache the files. When you add or change some JavaScript or CSS code, the files are generated again and the version number in the references are updated. In that way, the browser knows that there is a new version and your website wont brake.

image