<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Trevor Power &#187; Visual Studio Express</title>
	<atom:link href="http://blog.trevorpower.com/index.php/tag/visual-studio-express/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.trevorpower.com</link>
	<description>Software development and other thoughts</description>
	<lastBuildDate>Fri, 20 Aug 2010 07:33:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Handling multiple Web.config files in Visual Studio</title>
		<link>http://blog.trevorpower.com/index.php/handling-multiple-web-config-files-in-visual-studio/</link>
		<comments>http://blog.trevorpower.com/index.php/handling-multiple-web-config-files-in-visual-studio/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 14:31:00 +0000</pubDate>
		<dc:creator>trevorpower</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[ASP.Net MVC]]></category>
		<category><![CDATA[MSBuild]]></category>
		<category><![CDATA[Visual Studio Express]]></category>

		<guid isPermaLink="false">http://trevorpower.com/blog/?p=30</guid>
		<description><![CDATA[I use different settings for my application when it is running on the live server and when it is running on my development machine. To manage this I name my config files using the target name like so:

Web.Debug.config
Web.Release.config

Adding the following to the project file will cause MSBuild to automatically copy the correct file to &#8216;Web.config&#8217; [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.trevorpower.com%2Findex.php%2Fhandling-multiple-web-config-files-in-visual-studio%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.trevorpower.com%2Findex.php%2Fhandling-multiple-web-config-files-in-visual-studio%2F" height="61" width="51" /></a></div><p><a href="http://3.bp.blogspot.com/_Y2LJ3akQL0w/SaG1az00IsI/AAAAAAAAAEs/QODStwcEuUc/s1600-h/ScreenShot.png"><img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 194px; height: 130px;" src="http://3.bp.blogspot.com/_Y2LJ3akQL0w/SaG1az00IsI/AAAAAAAAAEs/QODStwcEuUc/s400/ScreenShot.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5305721308212110018" /></a>I use different settings for my application when it is running on the live server and when it is running on my development machine. To manage this I name my config files using the target name like so:
<ul>
<li>Web.Debug.config</li>
<li>Web.Release.config</li>
</ul>
<p>Adding the following to the project file will cause <a href="http://msdn.microsoft.com/en-us/library/wea2sca5.aspx">MSBuild</a> to automatically copy the correct file to &#8216;Web.config&#8217; when you build the project in Visual Studio. In my case the &#8216;BeforeBuild&#8217; target was already in the project file but commented out, I just needed to add the copy task and related items.</p>
<pre name="code" class="xml:nocontrols:nogutter" cols="80" rows="10">
&lt;Target Name="BeforeBuild">
   &lt;ItemGroup>
   &lt;ConfigSourceFiles Include="Web.$(Configuration).config" />
   &lt;ConfigDestinationFiles Include="Web.config" />
   &lt;/ItemGroup>
   &lt;Copy
      SourceFiles="@(ConfigSourceFiles)"
      DestinationFiles="@(ConfigDestinationFiles)"
   />
&lt;/Target>
</pre>
<p>So I select the right target from the toolbar and build/publish and the correct settings are used.</p>
<p>Where possible, to avoid duplicating settings, I create separate config files and point the main config files at it using the configSource attribute. For example the page settings for debug and release are the same so my pages element in both files look like this:</p>
<pre name="code" class="xml:nocontrols:nogutter" cols="80" rows="10">
   &lt;pages configSource="Configuration\System.Web\pages.config" />
</pre>
<p>Before implementing this I was manually changing or copying the config files before deploying to my server, so I hope this will help someone else save a bit of time.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.trevorpower.com/index.php/handling-multiple-web-config-files-in-visual-studio/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Source control for Visual Studio Express</title>
		<link>http://blog.trevorpower.com/index.php/source-control-for-visual-studio-express/</link>
		<comments>http://blog.trevorpower.com/index.php/source-control-for-visual-studio-express/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 19:15:00 +0000</pubDate>
		<dc:creator>trevorpower</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Source Control]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[TortoiseSVN]]></category>
		<category><![CDATA[Visual Studio Express]]></category>

		<guid isPermaLink="false">http://trevorpower.com/blog/?p=19</guid>
		<description><![CDATA[I use Visual Studio full time in work so it is an obvious choice as an IDE at home as well. As none of my hobby projects are revenue generating and are quite small, the Express (free) editions of Visual Studio are another obvious choice. I have been using the Web Developer, C#, SQL versions of [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.trevorpower.com%2Findex.php%2Fsource-control-for-visual-studio-express%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.trevorpower.com%2Findex.php%2Fsource-control-for-visual-studio-express%2F" height="61" width="51" /></a></div><div>I use Visual Studio full time in work so it is an obvious choice as an IDE at home as well. As none of my hobby projects are revenue generating and are quite small, the <a href="http://www.microsoft.com/express/">Express</a> (free) editions of Visual Studio are another obvious choice. I have been using the Web Developer, C#, SQL versions of Visual Studio Express and find them sufficient for my small to medium projects.</div>
<div></div>
<div>The express editions are very limiting when it comes to plugins and extensions so a lot of the tools and extras that I am used to are not available. However the only thing I ever really miss is source control. Every experienced developer knows how important it is to have their source code under some sort of source control. For now I am the only developer, but I still like to know what I have changed and be able to revert files back to a previous state. The other thing you take for granted when you have source control (in normal multi developer environment) is the automatic backup and duplication of code on to another machine (which is usually backed up off site).</div>
<div></div>
<div>In the past I have used Visual Source Safe, Perforce and Team Systems and first looked at these as a solution. Of the three, only <a href="http://www.perforce.com/perforce/evaldemo.html">Perforce offers a free license </a>(for two users). I installed the Perforce server and the P4V client (which I had used before). So I added my source code directory and started coding. The P4V client was a bit awkward to use and it didn&#8217;t pick up file changes automatically. It was technically usable, but I ended up not using it properly, just doing an arbitrary weekly check-in.</div>
<div></div>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Y2LJ3akQL0w/SRH_RAu75eI/AAAAAAAAABw/A5zgR8cSjA0/s1600-h/ScreenShot.jpg"><img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 400px; height: 343px;" src="http://3.bp.blogspot.com/_Y2LJ3akQL0w/SRH_RAu75eI/AAAAAAAAABw/A5zgR8cSjA0/s400/ScreenShot.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5265270107092542946" /></a>
<div>Now I had some form of basic revision history and rollback facilities but I was not happy with my back up system, which was to backup every thing onto a CD <span class="Apple-style-span" style="font-style: italic;">tomorrow</span>. The simple solution for this is a third party to host my source control database. There are a few websites that provided this service for free but most are only available for Open Source projects. A few commercial services do offer a limited service for free and I went with <a href="http://unfuddle.com/">Unfuddle</a> who provide free Subversion hosting (size limited). So I signed up, created a repository and tried a few clients.</div>
<div></div>
<div>The minute I started using the <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a> client I was very impressed. It has all the functions you would expect from a version control system (see screenshot), but as part of your normal file explorer. It picked up changes in files automatically and was a pleasure to use. Straight away I started doing more regular change related submits. And now I have peace of mind that my source code is backed up off site.</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.trevorpower.com/index.php/source-control-for-visual-studio-express/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
