<?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>Nicolas is blogging &#187; Visual Studio</title>
	<atom:link href="http://blog.mastertheteam.net/tag/visual-studio/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mastertheteam.net</link>
	<description>Jand writes about team development and Microsoft.NET</description>
	<lastBuildDate>Fri, 24 Jul 2009 14:19:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Share ConnectionStrings between projects for each developer differently</title>
		<link>http://blog.mastertheteam.net/2008/10/share-connectionstrings-between-projects-for-each-developer-differently/</link>
		<comments>http://blog.mastertheteam.net/2008/10/share-connectionstrings-between-projects-for-each-developer-differently/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 09:24:54 +0000</pubDate>
		<dc:creator>Nicolas Mueggler</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.mastertheteam.net/?p=33</guid>
		<description><![CDATA[Share ConnectionStrings
A customer of mine have a Visual Studio C# solution with more than one project which uses the same ConnectionString. So how can you define your ConnectionString(s) once and share them between projects?
This is how my sample solution looks like. The &#8220;Console&#8221; and &#8220;ServerConsole&#8221; projects should use the same ConnectionStrings.

I created a XML file ]]></description>
			<content:encoded><![CDATA[<p><strong>Share ConnectionStrings</strong></p>
<p>A customer of mine have a Visual Studio C# solution with more than one project which uses the same ConnectionString. So how can you define your ConnectionString(s) once and share them between projects?<br />
This is how my sample solution looks like. The &#8220;Console&#8221; and &#8220;ServerConsole&#8221; projects should use the same ConnectionStrings.</p>
<p><a href="http://blog.trivadis.com/blogs/nicolasmueggler/WindowsLiveWriter/ShareConnectionStringsbetweenprojectsfor_1121/image_2.png"><img style="border-width: 0px;" src="http://blog.trivadis.com/blogs/nicolasmueggler/WindowsLiveWriter/ShareConnectionStringsbetweenprojectsfor_1121/image_thumb.png" border="0" alt="image" width="244" height="116" /></a></p>
<p>I created a XML file called &#8220;connections.config&#8221; in the solution root folder and added it to the solution via the &#8220;Add Existing Item&#8221; dialog. This file contains all my ConnectionStrings I need.</p>
<p>Content of connections.config:</p>
<div class="csharpcode">
<pre class="alt"><span class="lnum">   1:  </span>&lt;?xml version=<span class="str">"1.0"</span> encoding=<span class="str">"utf-8"</span>?&gt;</pre>
<pre><span class="lnum">   2:  </span>&lt;connectionStrings&gt;</pre>
<pre class="alt"><span class="lnum">   3:  </span>  &lt;add name=<span class="str">"DefaultDatabase"</span></pre>
<pre><span class="lnum">   4:  </span>   providerName=<span class="str">"System.Data.SqlClient"</span></pre>
<pre class="alt"><span class="lnum">   5:  </span>   connectionString=<span class="str">"Data Source=.\SQLEXPRESS;
             Initial Catalog=ShareConnection;
             Integrated Security=True"</span> /&gt;</pre>
<pre><span class="lnum">   6:  </span>&lt;/connectionStrings&gt;</pre>
</div>
<p>After that, I add the file to all projects, which are needing the same connections. You need to add the file as &#8220;Add As Link&#8221; to ensure using the file in the shared location.</p>
<p><a href="http://blog.trivadis.com/blogs/nicolasmueggler/WindowsLiveWriter/ShareConnectionStringsbetweenprojectsfor_1121/image_6.png"><img style="width: 568px; height: 389px; border-width: 0px;" src="http://blog.trivadis.com/blogs/nicolasmueggler/WindowsLiveWriter/ShareConnectionStringsbetweenprojectsfor_1121/image_thumb_2.png" border="0" alt="image" width="644" height="463" /></a></p>
<p>Now you see the file in your project with a little arrow on the left bottom (linked file).</p>
<p><a href="http://blog.trivadis.com/blogs/nicolasmueggler/WindowsLiveWriter/ShareConnectionStringsbetweenprojectsfor_1121/image_4.png"><img style="border-width: 0px;" src="http://blog.trivadis.com/blogs/nicolasmueggler/WindowsLiveWriter/ShareConnectionStringsbetweenprojectsfor_1121/image_thumb_1.png" border="0" alt="image" width="241" height="103" /></a></p>
<p>To ensure the file is copied to the build output directory, you need to modify the &#8220;Copy to Output Directory&#8221; setting of the linked file to &#8220;Copy Always&#8221;.</p>
<p><a href="http://blog.trivadis.com/blogs/nicolasmueggler/WindowsLiveWriter/ShareConnectionStringsbetweenprojectsfor_1121/image_8.png"><img style="border-width: 0px;" src="http://blog.trivadis.com/blogs/nicolasmueggler/WindowsLiveWriter/ShareConnectionStringsbetweenprojectsfor_1121/image_thumb_3.png" border="0" alt="image" width="244" height="165" /></a></p>
<p>Now write the following &#8220;connectionStrings&#8221; section in the &#8220;App.config&#8221; of your projects:</p>
<div class="csharpcode">
<pre class="alt"><span class="lnum">   1:  </span>&lt;?xml version=<span class="str">"1.0"</span> encoding=<span class="str">"utf-8"</span> ?&gt;</pre>
<pre><span class="lnum">   2:  </span>&lt;configuration&gt;</pre>
<pre class="alt"><span class="lnum">   3:  </span>  &lt;appSettings&gt;</pre>
<pre><span class="lnum">   4:  </span>    &lt;add key=<span class="str">"SpecificProjSetting"</span> <span class="kwrd">value</span>=<span class="str">"SomeValue"</span> /&gt;</pre>
<pre class="alt"><span class="lnum">   5:  </span>  &lt;/appSettings&gt;</pre>
<pre><span class="lnum">   6:  </span>  &lt;connectionStrings configSource=<span class="str">"connections.config"</span> /&gt;</pre>
<pre class="alt"><span class="lnum">   7:  </span>&lt;/configuration&gt;</pre>
</div>
<p>And that&#8217;s all. If you now write your code, you always get the shared ConnectionString e.g.:</p>
<div class="csharpcode">
<pre class="alt"><span class="lnum">   1:  </span><span class="kwrd">public</span> <span class="kwrd">string</span> GetDbConnection()</pre>
<pre><span class="lnum">   2:  </span>{</pre>
<pre class="alt"><span class="lnum">   3:  </span>    <span class="kwrd">return</span> ConfigurationManager.ConnectionStrings[<span class="str">"DefaultDatabase"</span>].ConnectionString;</pre>
<pre><span class="lnum">   4:  </span>}</pre>
</div>
<p><strong>Individual ConnectionStrings for each developer</strong></p>
<p>My second requirements, enabling each developer to have his own ConnectionStrings (they have different Instance-Names), needs only a small addition.</p>
<p>In addition to the &#8220;connections.config&#8221; file which is under Source Control, each developer can create his own file at the same place with the convention &#8220;connections.config.{COMPUTERNAME}&#8221; which will not be checked in. In my example my computer&#8217;s name is &#8220;NIM-50&#8243;, so the file is named as &#8220;connections.config.NIM-50&#8243;.</p>
<p>Edit now each project&#8217;s (Pre-Build/Post/Build) property in the &#8220;Build Events&#8221; tab with the following command lines.</p>
<p>Pre-build event command line:<br />
<em>if exist $(TargetDir)connections.config del $(TargetDir)connections.config</em></p>
<p>Post-build event command line:<br />
<em>if exist $(SolutionDir)connections.config.$(COMPUTERNAME) copy $(SolutionDir)connections.config.$(COMPUTERNAME) $(TargetDir)connections.config</em></p>
<p>The &#8220;Pre-Build&#8221; checks if a &#8220;connections.config&#8221; allready exists in the drop location and deletes it. If the &#8220;Pre-Build&#8221; wouldn&#8217;t be run, then the old (existing) file will not be overwritten!<br />
The &#8220;Post-Build&#8221; checks if a specific developer configuration is found and copy/rename it to the drop location. If no one exists, the standard shared config will be used as defined in the project&#8217;s include.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mastertheteam.net/2008/10/share-connectionstrings-between-projects-for-each-developer-differently/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Licensing needs for Team Build Server</title>
		<link>http://blog.mastertheteam.net/2008/10/licensing-needs-for-team-build-server/</link>
		<comments>http://blog.mastertheteam.net/2008/10/licensing-needs-for-team-build-server/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 08:56:36 +0000</pubDate>
		<dc:creator>Nicolas Mueggler</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[Licensing]]></category>
		<category><![CDATA[Team Build]]></category>
		<category><![CDATA[Team Foundation Server]]></category>
		<category><![CDATA[Team System]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.mastertheteam.net/?p=18</guid>
		<description><![CDATA[I decided to write a short post about licensing of Team Build Server environments because I was asked several times in the past. There&#8217;s a good chapter in the Team System Licensing Guide which explains it in detail.
If you want to run Static Code Analysis or automated Tests you need to install Visual Studio Team ]]></description>
			<content:encoded><![CDATA[<p>I decided to write a short post about licensing of Team Build Server environments because I was asked several times in the past. There&#8217;s a good chapter in the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=1FA86E00-F0A3-4290-9DA9-6E0378A3A3C5&amp;displaylang=en" target="_blank">Team System Licensing Guide</a> which explains it in detail.</p>
<p>If you want to run Static Code Analysis or automated Tests you need to install Visual Studio Team System on the build server. For this Team System installation you don&#8217;t need any additional licenses as far as your developers have an appropriate license to do the specific task (extract from Licensing Guide):</p>
<table border="0" cellspacing="2" cellpadding="2">
<tbody>
<tr>
<td><strong>Team Member Actions</strong></td>
<td><strong>Licensing Implications</strong></td>
</tr>
<tr>
<td>Developer checks-in source code.</td>
<td>Team Foundation Sever CAL required.</td>
</tr>
<tr>
<td>Developer defines a team build type to include any of:<br />
- Unit Testing<br />
- Code Coverage<br />
- Code Analysis</td>
<td>Team Edition for Developers or Team Suite is required.</td>
</tr>
<tr>
<td>Tester defines a team build type to include any of:<br />
- Generic Testing<br />
- Web Testing<br />
- Load Testing<br />
- Manual Testing</td>
<td>Team Edition for Testers or Team Suite is required.</td>
</tr>
<tr>
<td>Team member initiates a build.</td>
<td>Team Foundation Sever CAL required.</td>
</tr>
</tbody>
</table>
<p>Conclusion:<br />
If you (=developer) only have a Developer Edition installed and queue a new Team Build, you don&#8217;t need any additional licenses. Only if you want to modify or create such a build definition.</p>
<p>The build server do not need any licenses (included in Team Foundation License), only the developers who working on it!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mastertheteam.net/2008/10/licensing-needs-for-team-build-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing SQL Server 2005 after Visual Studio 2008</title>
		<link>http://blog.mastertheteam.net/2008/09/installing-sql-server-2005-after-visual-studio-2008/</link>
		<comments>http://blog.mastertheteam.net/2008/09/installing-sql-server-2005-after-visual-studio-2008/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 21:01:52 +0000</pubDate>
		<dc:creator>Nicolas Mueggler</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.mastertheteam.net/index.php/2008/09/installing-sql-server-2005-after-visual-studio-2008/</guid>
		<description><![CDATA[Recently, I was installing Visual Studio 2008 on a fresh Windows Vista installation with standard options (including SQL Express Edition).
SQL Server 2005 wasn&#8217;t installed before but that&#8217;s what I did as next. Because I want to administrate my DB&#8217;s with the management studio I checked the &#8220;client tools&#8221; option in the setup.
So after installing everything, ]]></description>
			<content:encoded><![CDATA[<p>Recently, I was installing Visual Studio 2008 on a fresh Windows Vista installation with standard options (including SQL Express Edition).<br />
SQL Server 2005 wasn&#8217;t installed before but that&#8217;s what I did as next. Because I want to administrate my DB&#8217;s with the management studio I checked the &#8220;client tools&#8221; option in the setup.</p>
<p>So after installing everything, the setup shut a message that the client tools couldn&#8217;t be installed, because there&#8217;s an older version already installed.</p>
<blockquote><p>Name: Microsoft SQL Server 2005 Tools Express Edition<br />
Reason: Your upgrade is blocked. For more information about upgrade support, see the &#8220;Version and Edition Upgrades&#8221; and &#8220;Hardware and Software Requirements&#8221; topics in SQL Server 2005 Setup Help or SQL Server 2005 Books Online.</p>
<p>Build version check:<br />
Your upgrade is blocked because the existing component is a later version than the version you are trying to upgrade to. To modify an existing SQL Server component, go to Add or Remove Programs in Control Panel, select the component you would like to modify, and then click Change/Remove.</p></blockquote>
<p>The client tools which were installed by the Visual Studio blocking the setup tool to install the management studio etc. After some research in Google, I found the solution for this problem on the <a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=770816&amp;SiteID=1" target="_blank">MSDN forums</a>.</p>
<p>You need to start the setup from the command line with the parameter &#8220;SKUUPGRADE=1&#8243; to force installing the newer versions of the client tools:</p>
<p>cmd&gt;setup.exe SKUUPGRADE=1</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mastertheteam.net/2008/09/installing-sql-server-2005-after-visual-studio-2008/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
