Jun
4
2010

Build .NET projects from Windows Explorer using MSBuild Launch Pad (mPad)

In September 2009 I posted about a tool I am using to build my MSBuild projects from the shell “Build your .NET project with a right click in Windows Explorer

Last week I changed to MSBuild Launch Pad (mPad) which also add a context menu when you right click your project or solution files.

The added value for me is that it maintained project, 1.0 was released on May 21, 2010 with following release notes:

    • Support sln, csproj, vbproj, vcxproj, shfbproj, ccproj, oxygene and proj files execution.
    • Basic settings such as Show Prompt, and Auto Hide are provided.
    • MSBuild Shell Extension integration is achieved.

I also very much like that when I right click and say build I get the control on the .NET framework version I want to use and if it is a Release, Debug or what so ever.

4668737460_d5f6fd3791_o[1]

Nice little productivity booster tool.

Jan
7
2010

Visual Studio 2008 little tip

Tonight I found a little tip that you might already know but for me it was the first time I realize that.

When you want to open the properties of a project in Visual Studio 2008, in the past I was doing a right click on the project then I was searching for couple of seconds the entry properties

4251657661_0caae12aa4_o[1]

And since today I do it slightly differently I expand the project and double click on the Properties folder which open the Properties of the project, obvious (at least when you know it ;)

4251663871_e39685f837_o[1]

Dec
3
2009

ProjectReference with Condition in your MSBuild project files

Since some time I have the current scenario where I need to have conditional reference in a project. Basically the application must reference an assembly in one case in other it should reference another one. This was working correctly from an MSBuild point of view as the first implemented solution let me compile and run the application on my development machine and it was also working for our TeamCity build server. So everything was fine in this perfect word expect one thing!

The issue was the following; Visual Studio was showing two references of the ‘same assembly’ with different path. Not really an issue you would say because the correct one was used at compile time and at run time in all configurations. So the issue was that this had an impact of ReSharper. And this is I cannot accept because it affect my productivity.

So the other day I had a discussion with Ilya of JetBrains which gave me some idea but also told me that ReSharper reads project structure out of Visual Studio and that it doesn't provide lots of info, e.g. conditions on references. So this is why seeing two reference of the ‘same assembly’ was not a problem on Visual Studio itself and on the build server but was an issue to ReSharper because it was seeing two same reference, same namespace, same classes…

Today I had some time free and decided to see where I can come with this issue. And I found a solution.

My first solution, which had the explained issue was the same as the one on this post “Don't be afraid of your csproj-Files (III): We have a condition”, so having a Condition on the ItemGroup.

The solution I came to is to bring the Condition to one upper level than the ItemGroup, so I used Choose like this:

  1. <Choose>
  2.   <When Condition=" '$(Configuration)' == 'client1DeployClickOnce' ">
  3.     <ItemGroup>
  4.         <ProjectReferenceInclude="..\client1\app.Controls\app.Controls.csproj">
  5.         <Project>{A7714633-66D7-4099-A255-5A911DB7BED8}</Project>
  6.         <Name>app.Controls %28Sources\client1\app.Controls%29</Name>
  7.       </ProjectReference>
  8.     </ItemGroup>
  9.   </When>
  10.   <Otherwise>
  11.     <ItemGroup>
  12.       <ProjectReference Include="..\app.Controls\app.Controls.csproj">
  13.         <Project>{2E6D4065-E042-44B9-A569-FA1C36F1BDCE}</Project>
  14.         <Name>app.Controls %28Sources\app.Controls%29</Name>
  15.       </ProjectReference>
  16.     </ItemGroup>
  17.   </Otherwise>
  18. </Choose>

Reloading the project I had the surprise to see only one reference and that ReSharper was working again correctly!

For sure the build on TeamCity is also working perfectly.

Oct
8
2009

Unit Tests without leaving the keyboard

I like the Roy Osherove blog: Five Whys, Leadership in software teams.

Follow up on those two posts “How to measure programmer productivity using TDD Katas” or “Be Productive and Go Mouseless”. I would like to share a little keyboard shortcut which save me quite some time on my daily developments.

As you might know I am a fan of ReSharper and when I am doing Test Driven Development I hate having to switch from keyboard to mouse to run the test I just wrote. So searching for ReSharper Keyboard command I found Resharper_UnitTest_ContextRun which I assign to the Ctrl+Shift+<.

Now I can run the unit test I just wrote with just a combination of keys which are really near to each other so really easy!

The bonus of this command is that if I have the cursor in one unit test in a TestFixture class then it will run that particular test, but if I have the cursor out of any unit test method it will run all tests of that TextFixture. Very efficient!

Enjoy it!

May
9
2009

Updated my Live Template for NUnit in ReSharper

I tend to use a lot the Live Template of ReSharper, for example working for some time now with the WPF MVVM pattern I created a ViewModel template of such a class and use it extensively.

Today I updated the File Template I use to write my NUnit tests like this:

using NUnit.Framework;

namespace $NAMESPACE$
{
    // ReSharper disable InconsistentNaming

    [TestFixture]
    public class $CLASSNAME$
    {       
        /*
         * ... hold ...
         *
         * Arrange - Act - Assert
         */

        [Test]
        public void $FIRST_TEST_NAME$()
        {
            $END$
        }
    }

   // ReSharper restore InconsistentNaming
}

where I have the variable names defined as this:

Apr
10
2009

ReSharper 4.5 released

As you might have realized following my blog, I am big fan of JetBrains ReSharper for quite some years! This tool really boost my productivity. Today they just realized ReSharper 4.5 which brings some new functionalities but also a huge improvement in performance.

What's New in ReSharper 4.5

ReSharper 4.5 delivers a great performance boost, new features and more. Read about them below or watch this Live Demo

Performance and Memory Usage Improvements

ReSharper loads and works faster and more smoothly in general, particularly on big solutions: now it takes 20 to 40 percent less time until the solution is ready for code editing. Website loading time has been reduced by 30%. Other accelerated operations include: renaming symbols, finding commonly used symbols, creating symbols from usage, and analyzing large XAML files. Memory requirements for analysis of jumbo autogenerated code files have been reduced. Read more »

Solution-Wide Code Inspections

To detect unused non-private members on the fly, we have improved our solution-wide analysis by introducing a set of specialized code inspections. They only work when you let ReSharper analyze your whole solution and help you discover: unused non-private declarations; unused return values of non-private methods; unaccessed non-private fields; unused parameters in non-private members; and more. Read more »

VB9 Support

Visual Basic .NET developers can now benefit from VB9 language support that includes implicitly typed local variables, object initializers, anonymous types, extension methods, lambda expressions, partial methods, and embedded XML. VB9 support is all around you, courtesy of new context actions, code completion, refactorings, and Parameter Info, among other supporting features. Read more »

Extended Naming Style Configuration

You can now define custom naming style settings for different languages and symbols including types, namespaces, interfaces, parameters, method properties and events, static and instance fields etc. Use them to precisely align the way ReSharper completes and generates code with your specific coding guidelines. Read more »

Other Enhancements

Go to Implementation — Jump from usage of a base type or member straight to any of its end implementations.
New and Improved Refactorings — Added Inline Field and refactored many other refactorings for greater performance.

Native MSTest Support — Finally provided natively in ReSharper on par with nUnit support.
Wider Cross-Language Capabilities — More efficient quick-fixes and context actions in many cross-language scenarios, as well as increased coverage for XAML and ASP.NET.
Smoother Language and Framework Support — Improved compatibility with F#, Compact Framework, Silverlight 2 and other languages and tools. Read more »

Download ReSharper

Feb
21
2009

Pong game using WinForms designmode

My friend Mitsu just posted a funny demo about what you can do in the Visual Studio designer. He made a kind of Pong, remember that old game!, just using the Visual Studio designer. Useless but so much fun!

Sep
10
2008

WCF Add Service Reference issue with Visual Studio 2008 SP1

The other day I faced a strange issue when I wanted to add a service reference to the Tech Head Brothers authoring tool. The code generated wasn’t compiling with errors located in the file Reference.cs.

Drilling down the issue I figured out that the default namespace, TechHeadBrothers.Word, was the issue. It was just added at some place and at other not.

I made then a quick test with another assembly which had no dot in it’s name. That’s was it! The issue was the dot into the Assembly name, Default namespace.

Don’t use . in the name of your Assembly name, Default namespace to get back to normal state, weird!

Apr
22
2008

VisualSVN 1.4 released

VisualSVN, the plugin for Subversion in Visual Studio 2003, 2005 & 2008 was just updated with some new good features:

New Features
  • Quick Diff

    Quick Diff 
    Reviewing changes has never been so easy. Now you don't have to open separate diff window and remember locations of edited code blocks. VisualSVN marks in real-time the text lines changed since original version of the file and offers convenient navigation between them.
    Instead of pressing Page Up/Page Down several times and looking for changes just press Ctrl+Shift+Up/Down and jump to the next change immediatelly.

  • Toolbar

    Toolbar
    You don't need to remember curent code branch you are working on. There is current repository URL displayed on the VisualSVN toolbar and you can easily switch to another code branch from there. Buttons for the most common Subversion commands also make the life a bit easier.

  • Add Solution Wizard
    Add Solution

    First steps in using VisualSVN might have been non-trivial if you are not a Subversion expert. But with the brand new "Add Solution to Subversion" wizard it's just a piece of cake. The wizard automatically detects all potential problems and makes everything simple and intuitive.

  • Improvements and Bugfixes

    This release contains many stability fixes and improvements (eg. command-line tools included by default, digitally signed istallation package and more). For full list of changes please read VisualSVN changelog.

Upgrading from VisualSVN 1.3.x

The upgrade to VisualSVN 1.4 is free for all licensed users of VisualSVN. No need to uninstall previous version - simple install new one on top of it.

Download

Follow to the download page to get VisualSVN 1.4 and enjoy new level of productivity!

About Laurent

Laurent Kempé

Laurent Kempé is the editor, founder, and primary contributor of Tech Head Brothers, a French portal about Microsoft .NET technologies.

He is currently employed by Innoveo Solutions since 10/2007 as a Senior Solution Architect and certified Scrum Master.

Founder, owner and Managing Partner of Jobping, which provides a unique and efficient platform for connecting Microsoft skilled job seekers with employers using Microsoft technologies.

Laurent was awarded Most Valuable Professional (MVP) by Microsoft from April 2002 to April 2012.

JetBrains Academy Member
Certified ScrumMaster
My status

Twitter

Flickr

www.flickr.com
This is a Flickr badge showing public photos and videos from Laurent Kempé. Make your own badge here.

Month List

Page List