Setup SVN on Local Network

Subversioning
plays a very vital role for Developers. It keeps track of changes in a file over
time. It maintains the history of all the changes. This way you do not end up
with millions of copies of project that you cannot make heads or tails out of.  With a version control system, every time you
commit a set of changes you write a comment describing what you did. Then you
can look over the log to see what was changed when and by whom. You can easily
look at the differences between versions and easily roll back changes if you
need to. You also always have easy remote access to the current version of your
project without having to remember which file name you used for it: you simply
do an update of your working directory, or checkout the head version. For more
information regarding version control please refer: http://en.wikipedia.org/wiki/Revision_control
While working
on SVN, a question arrived in my mind that is there any way to setup SVN in
local network. Yes [Where there is will there is way] it’s possible. If you
have any project and your team is working on local network, then you can setup
svn on local network, it becomes easier for a team to work. It basically can be
very much useful for the collegians. Collegians must use this approach in all
projects. We can setup SVN on local machine connected in a network and that
will act as a SVN server for other team mates.

Prerequisites
Tortoise SVN (Subversion client) and
Ankh SVN (Subversion plugins for Visual Studio)

Note: we
already have created a visual studio solution.
Let’s have a
step by step look on how to setup SVN in local.

1)   
Create a folder where repository will
reside. I have created a folder name Repository Demo where my solution’s repository
will be saved when I check In.
2)   
Add project solution in Repository
Browse
the repository.
Our next step
is to add our solution to the SVN Repository we just created. We will add the
solution/project files under the trunk folder.
Add the
solution to repository directory.
You will see
that your solution is now added in repository once you add solution folder in
repository.
Provide the
network access rights for repository directory to be accessible by network
users. I am giving the Everyone access rights so now anyone having access to my
machine in network will be able to get the solution via this Repository.
3) Now we can
provide repository access to anyone in your network. Example: file://Nikki-PC/Repository
Demo/trunk
OR
Happy sub-versioning.
J
Share

Read More

Quick way to deploy web application to multiple environment.

Hello Folks. It’s
really interesting to know about MSBuild. Recently while working on one project
we found that deploying Project Files on multiple environment consumes lot of
time. So we thought to take the help of MSBuild and deploy project files on live
Server(s) automatically.
What is MSBuild?
MSBuild is Microsoft
Build Engine for Visual Studio. MSBuild is completely transparent with regards
to how to process and build software developed in Visual Studio.
Why MSBuild?

Initially from Visual
studio we do publish via Publish Profile(s). MSBuild uses that publish profile
and does deployment without the help of visual studio. It can reduce deployment
time up to 70%.

This is the basic Dev
environment which I have created to demonstrate you on Automatic Build.
Developer can publish files to staging as well production Environments.
How MSBuild?
MSBuild command needs
few command line options mainly MSBuild.exe, Visual Studio Project Solution
File (.sln), and Publish Profile.
First of all you need
to get the path of MSBuild.exe in my case it is located at C:WindowsMicrosoft.NETFramework64v4.0.30319msbuild.exe
Create a new File and enter
the below two MSBuild Commands. (Note: You need to change the path according to your project solution directory.)
“C:WindowsMicrosoft.NETFramework64v4.0.30319msbuild.exe”
“C:UsersnpunjabiDocumentsVisual Studio
2013ProjectsDeveloperEnvironmentDeveloperEnvironment.sln”
/p:DeployOnBuild=true /p:PublishProfile”C:UsersnpunjabiDocumentsVisual
Studio 2013ProjectsDeveloperEnvironment\DeveloperEnvironmentPropertiesPublishProfilesStaging.pubxml”
“C:WindowsMicrosoft.NETFramework64v4.0.30319msbuild.exe”
“C:UsersnpunjabiDocumentsVisual Studio
2013ProjectsDeveloperEnvironmentDeveloperEnvironment.sln”
/p:DeployOnBuild=true /p:PublishProfile”C:UsersnpunjabiDocumentsVisual
Studio 2013ProjectsDeveloperEnvironment\DeveloperEnvironmentPropertiesPublishProfilesProduction.pubxml”
/p:DeployOnBuild=true –
This will build the solution before deployment and will throw an error if build
fails before it deploys the files.
Save this file with
any name and provide extension as “.bat”.
Open Command Prompt
in Administrator Mode and execute the MSBuild (.bat) file.
Note: If you are using
SVN then before deployment you can also write the SVN Command which will update
the solution. After that MSBuild.exe will build the code and then publish.
Please download this file for
more user friendly deployment file which will prompt the user for deployment
whether to start deployment or not on particular servers. Thanks to Kiran Sir (http://kiranpatils.wordpress.com/) for helping me in creating deployment file.
To know more about Web Deploy : Click Here

If you have better
idea do share with us.

Share

Read More