Using Git as source control provider


1. Get repository from remote repository. Right click on a directory location which wanted to make as working directory. Select Git Clone option from the context menu.

clip_image002

 

2. To get project from remote repository, provide the URL into the URL field.

 

clip_image004

 

3. Start downloading the remote repository.

clip_image006

 

4. Now open the project with visual studio. To work visual studio with git, another tool Git Source Control Provider is needed to install.

 

clip_image008

 

5. Follow the steps provided in the picture to download and install Git Source Control Provider.

clip_image010

clip_image012

 

6. After installation make Git Source Control Provider as default source control plug in.

clip_image014

 

7. Now the project is controllable from visual studio.

clip_image016

clip_image018

 

8. Right click on project, context menu shows TortoiseGit and Git Extension related commands to control project.

clip_image020

 

9. To add local changes into local repository, use any of the Commits either from GitExtensions\TortoiseGit.

clip_image022

 

10. To add local changes/local branches to Remote repository/Server, use Push command.

clip_image024

 

11. After applying Push command a dialog opens asking the remote branch name, to which the local changes would be applied.

clip_image026

 

12. To get latest from server (Merge local changes with server branch).

clip_image028

clip_image030

13. Checkout Branch à Can be also used to take latest version from both local/Remote repository.

clip_image032

clip_image034

 

14. Now suppose you worked on an issue, but want to commit and push it in a branch for future use.

 

clip_image036

clip_image038

clip_image040

 

15. After pushing you want to continue work on master.

clip_image042

clip_image044

 

16. Started working on master. Now decision taken to implement Issue-383. And move away the changes that you made on master. To move the changes use stash (stash is like a branch, it saves the changes in a separate place).

clip_image046

clip_image047

Git configuration/Installation on Windows


 

1. Install Git Extensions, It would provide options to install MsysGit(git for windows) and KDiff(merege tool).

clip_image002

 

2. During installation it would prompt GuI to install KDiff.Complete the installation.

 

clip_image004

 

3. Then it would also prompt to install msysGit. Complete the installation.

clip_image006

 

4. Now check GitExtension Settings.

clip_image008

 

clip_image010

 

5. If any of the settings in the above picture shown as red text with repair then fix these settings.

6. Now set the Global Settings and Local Settings.

clip_image012

 

7. Now install TortoiseGit.

 

clip_image014

 

8. Check TortoiseGit–à Settings.

clip_image016

 

9. Set Git credentials.

clip_image018

clip_image020

 

10. Installation is completed. Now it is time to use Git as a source control provider.

Use NuGet as package manager visual studio


Following steps shows how to use NuGet with visual studio:

1.  Tools—>Extension Manager..

1.ExtensionManager

 

2.  Click open gallery and download NuGet Package Manager

2.Download_NuGetManager

 

3. Wait to complete the download process.

3.Downloading

 

4.

4.Installation_complete

 

5. Now from Tools—>Options—>Package Manager—–> General , Check Allow NuGet to download missing package. 

5.CheckForMissedPackages

 

6.  Click yes to allow NuGet to automatically download the missing package components during build.

6.ConfirmNuGetControl

 

7.  Now right click on the solution node, and click ‘Enable NuGet package Restore’

6.EnableNuGetPackageRestore

8.  Configures the solution to restore NuGet packages on build.

7.Configuring_the_application_to_restore_nuget_package

 

 

9.  Now to add jquery to your project, just open the Tools—>Extension Manager..—>Online Gallery—-> Search for jquery. From the result view click install on jQuery.

7.InstallJquery

 

10. Now click OK to confirm adding Jquery to the project.

8.AddJquery_to_the_Project

 

11.  Now to add log4net to your project, just open the Tools—>Extension Manager..—>Online Gallery—-> Search for log4net. From the result view click install on log4net.

9.InstallLog4net

 

12. After installation confirm adding to the solution.

10.Log4net_is_added

13. Package folder is added out side of the solution folder.

11.PackageFolder_added

 

 

14. Manage the installed projects through NuGet.

13.ManagePackages

 

15.  Click the installed packages tab, now its easy to manage.

14.Installed_package

How to create and configure application pool by script


 

Application pool can be created and configured by command line scripts. Here is a sample showing how to create an Application pool and configure its  idle time out period :

Add_ConfigureAppPool_001

See the effect of the above commands in IIS.

 

Changed_value

2012 in review


The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

600 people reached the top of Mt. Everest in 2012. This blog got about 4,100 views in 2012. If every person who reached the top of Mt. Everest viewed this blog, it would have taken 7 years to get that many views.

Click here to see the complete report.

How to run a console application through ant script


Below is the ant script to run a console application by ant :

<project name=”MyApplication” default=”runmyapplication”>

  <!– Initialization of the project. –>
  <target name=”-init”>
    <!– Load environment variables –>
    <property environment=”env” />

    <!– Define directories in the source repository –>
    <!–The directory of the solution if its in the same directory as ant then only . is enough–>
    <property name=”myapplicationexecutable.dir”                location=”C:\MyApplication\bin” />
    <property name=”msbuild”                location=”${env.windir}/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe” />
    <property name=”msbuild.logger”            value=”” />
    <property name=”myapplilcationexecutable”            location=”${myapplicationexecutable.dir}/myapplication.exe” />
    <property name=”param1″                location=”param1value” />
  </target>

  <!– Run the unit test –>
  <target name=”runmyapplication” depends=”-init”>
    <exec dir=”${myapplicationexecutable.dir}” executable=”${myapplilcationexecutable}” failonerror=”true”>
      <arg line=”${param1}”/>
    </exec>
  </target>
</project>