Showing posts with label Dev Tools. Show all posts
Showing posts with label Dev Tools. Show all posts

Wednesday, May 18, 2011

Setting assembly version automatically when building in a Bamboo server

Scenario :
How to instruct your msbuild script to set the correct “AssemblyVersion” of your libraries using “AssemblyInfo.cs”  when building in a Bamboo server.In Puzzlepart it is vital to have the current build number and the current revision number in the assembly version of products.
Solution :
Assembly version syntax : <major version>.<minor version>.<build number>.<revision>
More info can be found here about the syntax. 
Step 1 : First you need to make sure the corresponding Build-Specific Variable are passed into the build script.
How ?
In Bamboo build configuration under the “Builder” tab you have “Options” where you can pass msbuild command line switches.
example : /p:BuildKey=${bamboo.buildKey} /p:BuildPlanName=${bamboo.buildPlanName} /p:BuildNumber=${bamboo.buildNumber} /p:Revision=${bamboo.custom.svn.revision.number}
image
Step 2 : Accessing those variables from the msbuild script
<PropertyGroup>
    <MajorVersion Condition="'$(MajorVersion)' == ''">1</MajorVersion>
    <MinorVersion Condition="'$(MinorVersion)' == ''">0</MinorVersion>
    <BuildNumber Condition="'$(BuildNumber)' == ''">0</BuildNumber>
    <Revision Condition="'$(Revision)' == ''">0</Revision>
    <BuildPlanName Condition="'$(BuildPlanName)' == ''">LocalBuild</BuildPlanName>
    <BuildKey Condition="'$(BuildKey)' == ''">NOKEY</BuildKey>


  </PropertyGroup>
Step 3 : Create the Assembly version using those properties
<PropertyGroup>
       <ComputedAssemblyName>$(MajorVersion).$(MinorVersion).$(BuildNumber).$(Revision)</ComputedAssemblyName>
</PropertyGroup>
Step 4 : Use the assembly version in “AssemblyInfo” task
<AssemblyInfo CodeLanguage="CS"
      OutputFile="$(ApplicationName)\Properties\AssemblyInfo.cs"
      AssemblyTitle="ApplicationName"
      AssemblyDescription="Description"
      AssemblyCompany=""
      AssemblyProduct="$(ApplicationName)"
      AssemblyCopyright="Copyright © "
      ComVisible="false"
      CLSCompliant="false"
      Guid="248D49F7-BC5D-4413-8E4A-98B4654B1594"
      AssemblyVersion="$(ComputedAssemblyName)" />

Wednesday, September 29, 2010

Integrating ReSharper into Visual Studio 2010

Scenario : I am running VS2008 and VS2010 in parallel in my development environment.And I had already installed ReSharper 5 before installing the VS 2010.Then I wanted to integrate the R# into VS2010.
Tried to find out how to do it by googling but to no avail.Only found out issues related to  integration issues with VS2010.
Then suddenly came to my mind that will the re installing R# help.As I re run the installer it prompted with the nice little option of changing the integration with the Visual Studio as in the bellow image.
resharper-1
When you click on the “Change” button you will get this
resharper-2
Now it’s a matter of ticking the check box for VS2010 integration and clicking the “Install” button.
Here we go, R# is at your finger tips in VS2010 now.

Saturday, November 14, 2009

Saturday, June 20, 2009

SharePoint tools for developers

There are very important tools that you can use while you are working with SharePoint development work.

I thought of putting down very important tools that you can use when comes to developing SharePoint projects.Those tools are really handy on reducing your development time as well as troubleshooting time.

WSP Builder – This is a VS extension which is fully cable of deploying sharepoint solutions.This is a dream tool you can think of the problem you are facing when comes to deploying SharePoint solutions.

Hats off to Carsten Keutmann

SharePoint Manger – This is a very useful tool to explore the every item in your SharePoint installation.

BareTail – This is also very important tool that can be used to view the SharePoint log files which lies in the 12 Hive.And you can use this tool to monitor any log file for that matter