Visual Studio 2010: how automatically build wsp packages after SharePoint 2010 build

In the post How To: Package on build in your Visual Studio SharePoint 2010 solution I've found to solution to build wsp packages automatically after SharePoint build:

  • unload your csproj;
  • before the closing tag,
  • add the following lines:

  <PropertyGroup>
    <BuildDependsOn>$(BuildDependsOn);CreatePackage</BuildDependsOn>
  </PropertyGroup>

Now you can reload your project and verify that after a build the wsp is recreated too.

Edit: in my experience the previous method is just fine and works ok, but, as seen in the post Visual Studio & SharePoint: how to create package as part of the build process, if you have problems with the previous tecnique, you can use insted:

  <PropertyGroup>
    <PostBuildDependsOn>$(PostBuildDependsOn);CreatePackage
        </PostBuildDependsOn>
  </PropertyGroup>

Using WinMerge for TFS compare & merge

In the post tfs – using winmerge as your merge/diff tool you can find the commands necessary to use WinMerge for TFS compare and merge.

From Tool, Options, Source Control, Visual Studio Team Foundation Server, Configure User Tools button, Add button:

  • Extension: .*
  • Operation: Compare
  • Command: C:\Program Files (x86)\WinMerge\WinMergeU.exe
  • Arguments: /e /wl /dl %6 /dr %7 %1 %2

And then press again the Add button:

  • Extension: .*
  • Operation: Merge
  • Command: C:\Program Files (x86)\WinMerge\WinMergeU.exe
  • Arguments: /ub /dl %6 /dr %7 %1 %2 %4

Finally, in the article diff/merge configuration in Team Foundation - common Command and Argument values you can find the tutorials to using other compare & merge tools in TFS.

Visual Studio: Collapse All Solution Explorer

Sometimes you have to open very big solution files in Visual Studio; but when Visual Studio opens these big solutions, by default they are all expanded in the Solution Explorer window, so that you can see only a few projects, and you would like to collapse them all.

For this reason, I did some researches and found that Visual Studio hasn't a native command to do this, and so a dedicated macro is needed.

I found one in the post Collapse all Solution Explorer items in Visual Studio 2010: it is very good because the author comments how to install it also.

I've modified it, to ensure that the macro works after the project has been opened and you have worked in it, so that even if you expand projects and then collapse their parent nodes, the modified macro collapses all the projects correctly.

You can download the file modified by me in the file CollapseAllSolutionExplorer.vb.txt (I suggest you don't open it in your browser, but save it locally)

Installing ClearCase Remote Client for Visual Studio 2008 and 2010

Here is the guide to install ClearCase Remote Client 7.0.1 for Visual Studio 2008.

  1. If Visual Studio 2005 wasn't already installed, you have to create in the registry, under the node HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0, a string with name InstallDir and value the install path of Visual Studio 2008, tipically C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE.
  2. After that, install the client, downloaded from https://YourCCRCServer/ccrc/update/ccrcvsi_win32.zip
  3. Download the updates to the registrations specific for Visual Studio 2008 from ftp://ftp.software.ibm.com/software/rational/clearcase/7.0.1/VS2008_support/CC-CQ-VS2008.zip for 32 bit and from ftp://ftp.software.ibm.com/software/rational/clearcase/7.0.1/VS2008_support/CC-CQ-64_BIT-VS2008.rar for 64 bit.
    Extract the zip file, open with Notepad the file reg_VS2008.bat and change the initial assignements so that CC_for_VS=0 and CQ_for_VS=0 (but keep CCRC_for_VS=1).
  4. From the command prompt, go the folder with the extracted files and execute the file reg_VS2008.bat.
    If all went fine, from Visual Studio 2008 the top menu ClearCase should appear.

And here are the adjustments necessary for Visual Studio 2010.

  1. Download and extract the file from ftp://ftp.software.ibm.com/software/rational/clearcase/7.0.1/VS2010_support/CC_7.0.1_VS2010.zip.
  2. Modify the reg_VS2010.bat file so that CC_for_VS=0 and CQ_for_VS=0 (keep CCRC_for_VS=1).
  3. From the command prompt, go to the folder with the extracted files and execute the file reg_VS2010.bat.
    If all went fine, from Visual Studio 2010 the to menu ClearCase should appear.