<?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>Team City &#8211; Cognim &#8211; Internet development</title>
	<atom:link href="https://www.cognim.co.uk/category/team-city/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.cognim.co.uk</link>
	<description>Enterprise system implementation. Making the complex simple</description>
	<lastBuildDate>Thu, 28 Apr 2016 09:21:33 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">91553907</site>	<item>
		<title>Know exactly what you&#8217;re about to deploy with Git, TeamCity and Octopus Deploy</title>
		<link>https://www.cognim.co.uk/know-exactly-what-youre-about-to-deploy-with-git-teamcity-and-octopus/</link>
					<comments>https://www.cognim.co.uk/know-exactly-what-youre-about-to-deploy-with-git-teamcity-and-octopus/#respond</comments>
		
		<dc:creator><![CDATA[Darren Hall]]></dc:creator>
		<pubDate>Mon, 20 Jul 2015 14:14:43 +0000</pubDate>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Octopus Deploy]]></category>
		<category><![CDATA[Team City]]></category>
		<guid isPermaLink="false">http://www.cognim.co.uk/?p=5019</guid>

					<description><![CDATA[In my last post I showed how we can use Git, TeamCity and Octopus Deploy to include the commit id in an Octopus Deploy release, and therefore find out exactly what code is running in your system. In this post I want to show you can use the commit ids to do a diff between [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In my <a href="https://www.cognim.co.uk/know-exactly-what-youve-released-with-git-teamcity-and-octopus/">last post</a> I showed how we can use Git, TeamCity and Octopus Deploy to include the commit id in an Octopus Deploy release, and therefore find out exactly what code is running in your system. In this post I want to show you can use the commit ids to do a diff between what you&#8217;ve already got deployed and what you&#8217;re about to deploy, so you can be exactly sure of what you&#8217;re about to release. </p>
<p>First off you want to get the commit id you currently have deployed and the commit id you want to deploy and copy them to Notepad (or wherever). Next you want to run a diff between the two commits. We currently use BitBucket, so I&#8217;ll show that first, but this also works with GitHub (and it&#8217;s actually a lot easier).</p>
<h2>BitBucket</h2>
<p>Annoyingly, BitBucket doesn&#8217;t officially support diffing between two commits. However, looking at <a href="https://bitbucket.org/site/master/issues/4779/ability-to-diff-between-any-two-commits">this issue</a> it seems that it is unofficially supported. We can diff the two commits using the following url:</p>
<p>https://bitbucket.org/OWNER/PROJECT/branches/compare/COMMIT-CURRENTLY-LIVE..COMMIT-TO-DEPLOY#commits</p>
<p>Of course, you&#8217;ll need to replace OWNER and PROJECT with the correct values and also replace the COMMIT-CURRENTLY-LIVE and COMMIT-TO-DEPLOY with the commit ids taken from the Octopus releases. The commit ids need to be in the specified order, with the earlier commit (the one currently live) first.</p>
<p>Once you&#8217;ve done this you&#8217;ll see a screen with the following:</p>
<p><a href="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/released-p2-21.png?ssl=1"><img data-recalc-dims="1" decoding="async" loading="lazy" src="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/released-p2-21.png?resize=998%2C334&#038;ssl=1" alt="released-p2-2" width="998" height="334" class="alignnone size-full wp-image-5022" srcset="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/released-p2-21.png?w=998&amp;ssl=1 998w, https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/released-p2-21.png?resize=300%2C100&amp;ssl=1 300w" sizes="auto, (max-width: 998px) 100vw, 998px" /></a></p>
<p>This contains every commit between the two versions. Also, see where it says &#8220;Merged in PROJ-99&#8221; in the list of commits? That PROJ-99 refers to the JIRA issue that was created for that particular feature. This means we can also tell you <strong>exactly what features are about to be shipped!</strong> This is fantastic when you go a while between releases, or have many people working on the same project and it becomes difficult to know exactly what was worked on.</p>
<p>You can also see the diff of each file under the &#8220;Diff&#8221; tab:</p>
<p><a href="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/released-p2-1.png?ssl=1"><img data-recalc-dims="1" decoding="async" loading="lazy" src="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/released-p2-1.png?resize=1300%2C744&#038;ssl=1" alt="released-p2-1" width="1300" height="744" class="alignnone size-full wp-image-5021" srcset="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/released-p2-1.png?w=1300&amp;ssl=1 1300w, https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/released-p2-1.png?resize=300%2C172&amp;ssl=1 300w, https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/released-p2-1.png?resize=1024%2C586&amp;ssl=1 1024w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></a></p>
<p>So, we can see every line of code that has changed between the currently live version and the version we are about to deploy. Pretty neat!</p>
<h2>GitHub</h2>
<p>GitHub <strong>do</strong> actually support diffing between commits. The sytnax is pretty much the same:</p>
<p>https://github.com/OWNER>/PROJECT/compare/COMMIT-CURRENTLY-LIVE..COMMIT-TO-DEPLOY</p>
<p>Here&#8217;s what you end up with once you&#8217;ve done that:</p>
<p><a href="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/released-p2-31.png?ssl=1"><img data-recalc-dims="1" decoding="async" loading="lazy" src="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/released-p2-31.png?resize=1136%2C955&#038;ssl=1" alt="released-p2-3" width="1136" height="955" class="alignnone size-full wp-image-5028" srcset="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/released-p2-31.png?w=1136&amp;ssl=1 1136w, https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/released-p2-31.png?resize=300%2C252&amp;ssl=1 300w, https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/released-p2-31.png?resize=1024%2C861&amp;ssl=1 1024w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></a></p>
<p>(Note this is a personal project, so no JIRA issues <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> )</p>
<p>Again, a nice list of commits and the diff between the two versions. </p>
<p>So there you go &#8211; now you can know exactly what, down to every line of code, you&#8217;re about to release.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cognim.co.uk/know-exactly-what-youre-about-to-deploy-with-git-teamcity-and-octopus/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5019</post-id>	</item>
		<item>
		<title>Know exactly what you&#8217;ve deployed with Git, TeamCity and Octopus</title>
		<link>https://www.cognim.co.uk/know-exactly-what-youve-released-with-git-teamcity-and-octopus/</link>
					<comments>https://www.cognim.co.uk/know-exactly-what-youve-released-with-git-teamcity-and-octopus/#comments</comments>
		
		<dc:creator><![CDATA[Darren Hall]]></dc:creator>
		<pubDate>Fri, 17 Jul 2015 09:32:07 +0000</pubDate>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Octopus Deploy]]></category>
		<category><![CDATA[Team City]]></category>
		<guid isPermaLink="false">http://www.cognim.co.uk/?p=4953</guid>

					<description><![CDATA[Having a fully automated build and release process is, in my opinion, one of the best things you can do as a development team. We&#8217;ve spent the last 2 years moving to a fully automated build and release process and it has had an enormous impact on the way we develop and, more importantly, release [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Having a fully automated build and release process is, in my opinion, one of the best things you can do as a development team. We&#8217;ve spent the last 2 years moving to a fully automated build and release process and it has had an enormous impact on the way we develop and, more importantly, release software. Releasing has gone from something we do on average quarterly to something we can do daily if required. I shudder when I think of doing a manual release now &#8211; the time taken, the mistakes when setting up the release (manual backups, spelling errors or wrong values in configs, not remembering to copy all the necessary files or folders, etc&#8230;).</p>
<p>Here I want to demonstrate one fantastic benefit of having an automated release process &#8211; knowing exactly what you&#8217;ve deployed, down to every single line of code.</p>
<p>Here&#8217;s a screenshot of an Octopus release, which shows <strong>exactly what commit this code is running from</strong>:</p>
<p><a href="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-1.png?ssl=1"><img data-recalc-dims="1" decoding="async" loading="lazy" class="alignnone size-full wp-image-4957" src="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-1.png?resize=736%2C764&#038;ssl=1" alt="" width="736" height="764" srcset="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-1.png?w=736&amp;ssl=1 736w, https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-1.png?resize=289%2C300&amp;ssl=1 289w" sizes="auto, (max-width: 736px) 100vw, 736px" /></a></p>
<p>We can see that this release is currently on our test environment by the green tick next to &#8220;Test&#8221; under the &#8220;Lifecycle&#8221; section. The bit in the red box is what we&#8217;re really interested in here. This tells this release is running the code that was checked in with commit id &#8220;ff83e86&#8230;&#8221;. We can take this id and link it back to our VCS (we currently use <a href="https://bitbucket.org/">BitBucket</a>, a VCS based on Git). Here is the exact source code now running in test:</p>
<p><a href="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-5.png?ssl=1"><img data-recalc-dims="1" decoding="async" loading="lazy" class="alignnone size-full wp-image-4979" src="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-5.png?resize=1486%2C450&#038;ssl=1" alt="releasing-blog-5" width="1486" height="450" srcset="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-5.png?w=1486&amp;ssl=1 1486w, https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-5.png?resize=300%2C91&amp;ssl=1 300w, https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-5.png?resize=1024%2C310&amp;ssl=1 1024w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></a></p>
<p>So how do we include the commit in the release? Octopus uses NuGet packages as its deployment mechanism. NuGet packages can contain release notes, and it is these release notes that get displayed in the red box in the image above. We can include a release notes file in the project, use TeamCity to update it with the commit using a straightforward PowerShell script, and include it when building the NuGet package.</p>
<h2>Setting up the files</h2>
<p>There are two files we need: the release notes file and the PowerShell script to update the release notes file.</p>
<p><a href="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-2.png?ssl=1"><img data-recalc-dims="1" decoding="async" loading="lazy" class="alignnone size-full wp-image-4959" src="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-2.png?resize=363%2C216&#038;ssl=1" alt="releasing-blog-2" width="363" height="216" srcset="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-2.png?w=363&amp;ssl=1 363w, https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-2.png?resize=300%2C179&amp;ssl=1 300w" sizes="auto, (max-width: 363px) 100vw, 363px" /></a></p>
<p>Note that here I&#8217;ve included them at the solution level as there&#8217;s only one project we will deploy, however these can be put at a project level if required.</p>
<p>Both the files are simple affairs. Here&#8217;s what each file contains:</p>
<h4>ReleaseNotes.txt</h4>
<p><code>Commit: %commitId%</code></p>
<h4>UpdateReleaseNotes.ps1</h4>
<p><code>Param(<br />
[string]$commitId<br />
)<br />
(Get-Content .\ReleaseNotes.txt) | Foreach-Object {$_ -replace '%commitId%', $commitId} | out-file .\ReleaseNotes.txt<br />
</code></p>
<p>The release notes contains a placeholder for the commit id. The PowerShell script opens the release notes file, replaces the placeholder with a passed in parameter and saves it. This parameter will come from TeamCity.</p>
<h2>Running the PowerShell script</h2>
<p>Next up we need to run this script from our build server, passing in the commit id that triggered the build. In the build configuration, add a build step to run a PowerShell script:</p>
<p><a href="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-3.png?ssl=1"><img data-recalc-dims="1" decoding="async" loading="lazy" class="alignnone size-full wp-image-4960" src="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-3.png?resize=1235%2C739&#038;ssl=1" alt="releasing-blog-3" width="1235" height="739" srcset="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-3.png?w=1235&amp;ssl=1 1235w, https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-3.png?resize=300%2C180&amp;ssl=1 300w, https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-3.png?resize=1024%2C613&amp;ssl=1 1024w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></a><br />
(Note to self: update TeamCity!)</p>
<p>Here we are running the PowerShell script and, in the Script Arguments, passing in one of TeamCitys built-in parameters &#8211; the commit id from our VCS that will be used for the build.</p>
<h2>Adding the release notes to the NuGet package</h2>
<p>Now all that is left is to add the ReleaseNotes.txt to the NuGet package that is built by OctoPack. OctoPack has a number of parameters it accepts, one of which is the location of a release notes file:</p>
<p><a href="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-4.png?ssl=1"><img data-recalc-dims="1" decoding="async" loading="lazy" class="alignnone size-full wp-image-4961" src="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-4.png?resize=844%2C271&#038;ssl=1" alt="releasing-blog-4" width="844" height="271" srcset="https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-4.png?w=844&amp;ssl=1 844w, https://i0.wp.com/www.cognim.co.uk/wp-content/uploads/2015/07/releasing-blog-4.png?resize=300%2C96&amp;ssl=1 300w" sizes="auto, (max-width: 844px) 100vw, 844px" /></a></p>
<p>And we&#8217;re done! Now, whenever we deploy the release using Octopus, we will see the commit that the release was built from.</p>
<p><em>Edit: Erik Eckhard has a great way of achieving the same result without adding a file to your solution in the comments below.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cognim.co.uk/know-exactly-what-youve-released-with-git-teamcity-and-octopus/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4953</post-id>	</item>
		<item>
		<title>Visual Studio SSDT and TeamCity &#8211; Using Publishing Profiles and TeamCity integration</title>
		<link>https://www.cognim.co.uk/ssdt-using-publishing-profiles-and-teamcity-integration/</link>
					<comments>https://www.cognim.co.uk/ssdt-using-publishing-profiles-and-teamcity-integration/#comments</comments>
		
		<dc:creator><![CDATA[Darren Hall]]></dc:creator>
		<pubDate>Fri, 01 Aug 2014 13:02:33 +0000</pubDate>
				<category><![CDATA[SSDT]]></category>
		<category><![CDATA[Team City]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<guid isPermaLink="false">http://makesharp.wordpress.com/?p=48</guid>

					<description><![CDATA[Database DevOps &#8211; SSDT and TeamCity Using Visual Studio and SSDT you can immediately publish a fresh database or update an existing one by simply right clicking the database project and choosing &#8216;Publish&#8217;. This will bring up a dialog that lets you edit the connection string to your database and set various options related to the publish. At [&#8230;]]]></description>
										<content:encoded><![CDATA[<h3>Database DevOps &#8211; SSDT and TeamCity</h3>
<p>Using Visual Studio and SSDT you can immediately publish a fresh database or update an existing one by simply right clicking the database project and choosing &#8216;Publish&#8217;. This will bring up a dialog that lets you edit the connection string to your database and set various options related to the publish.<a href="http://makesharp.files.wordpress.com/2014/08/publish.png"><img data-recalc-dims="1" decoding="async" loading="lazy" class="aligncenter size-medium wp-image-53" src="http://makesharp.files.wordpress.com/2014/08/publish.png?w=300&#038;resize=300%2C152" alt="Publish" width="300" height="152" /></a></p>
<p>At this point you have a choice &#8211; whether to register your published database as a Data Tier Application or not. Please do so.  There are two distinct advantages</p>
<ul>
<li>You can enable database drift detection.</li>
<li>You can query the server to see what version database is published there, when and by whom.</li>
</ul>
<p>Registering a database as a Data-Tier Application stores a copy of the current state of the database schema in system metadata tables as well as associated information relating to the publish itself.  To see quick info you can run</p>
<p style="padding-left: 30px;"><span style="font-family: Consolas;"><span style="color: #0000ff; font-family: Consolas; font-size: small;">select</span> <span style="color: #808080; font-size: small;">*</span> <span style="color: #0000ff; font-size: small;">from</span> <span style="color: #008080; font-family: Consolas; font-size: small;">sysdac_instances</span></span></p>
<p>against the msdb database on the server you published to.</p>
<p>Database drift is a very useful feature that allows you to check whether somebody has directly altered the database in some way since the last publish. I know this is a problem for many small teams &#8211; a query is a little slow so an index is added, a default was applied to a column because an app was throwing exceptions further down the pipeline and it had to be fixed quickly. This allows you to detect that, find the changes and if necessary bring them in to your project or else delete them. I always choose the option to block publish when database has drifted from registered version.</p>
<p>Now that you have selected your server, registered the database as a DTA and prevented drift, save the profile in the form .publish.xml. This isn&#8217;t just so that you can double click the profile to immediately publish (although you can of course) this is so that when TeamCity (you ARE using CI aren&#8217;t you?) builds your SSDT solution you can tell it which profile to use to automatically publish your database.  How good is that?</p>
<p>In the TeamCity build step that actually builds your solution you can select a target of &#8216;Build Publish&#8217; and then in your command line parameters add the following</p>
<p>/p:SqlPublishProfilePath=&lt;profilename&gt; /p:DeployOnBuild=true</p>
<p>Where &lt;profilename&gt; is the full name of your profile e.g. myserver.publish.xml.<a href="http://makesharp.files.wordpress.com/2014/08/build.png"><img data-recalc-dims="1" decoding="async" loading="lazy" class="aligncenter size-medium wp-image-54" src="http://makesharp.files.wordpress.com/2014/08/build.png?w=300&#038;resize=300%2C182" alt="Build" width="300" height="182" /></a></p>
<p>Done!  An easily updated, version controlled database that watches for people messing about with it on the server and lets you know.  What more could you ask for?</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cognim.co.uk/ssdt-using-publishing-profiles-and-teamcity-integration/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">48</post-id>	</item>
		<item>
		<title>Visual Studio SSDT and TeamCity &#8211; What you need to do.</title>
		<link>https://www.cognim.co.uk/ssdt-and-teamcity-what-you-need-to-do/</link>
					<comments>https://www.cognim.co.uk/ssdt-and-teamcity-what-you-need-to-do/#respond</comments>
		
		<dc:creator><![CDATA[Darren Hall]]></dc:creator>
		<pubDate>Mon, 28 Jul 2014 11:44:20 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SSDT]]></category>
		<category><![CDATA[Team City]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<guid isPermaLink="false">http://makesharp.wordpress.com/2014/07/28/ssdt-and-teamcity-what-you-need-to-do/</guid>

					<description><![CDATA[I have just spent the last few days trying to get a SQL Project to build, deploy, run unit tests and create a dacpac on our build server which uses TeamCity. It wasn&#8217;t a simple process and I had to accept a few conditions that I wasn&#8217;t overly keen on but the upshot is that [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I have just spent the last few days trying to get a SQL Project to build, deploy, run unit tests and create a dacpac on our build server which uses TeamCity. It wasn&#8217;t a simple process and I had to accept a few conditions that I wasn&#8217;t overly keen on but the upshot is that it works now and it works well.</p>
<p>Here is the outline of how it all hangs together, I will do a few more detailed posts to follow up.</p>
<p>The solution itself consists of three projects. Two database projects and a unit test project.  They are checked into GIT (using <a href="https://bitbucket.org/">BitBucket</a>) and <a href="http://www.jetbrains.com/teamcity/">TeamCity</a> watches the repository to trigger a build.  The build creates a dacpac for each database, publishes the changes to the appropriate server, runs the unit tests and saves the dacpacs into a nuget package that is <a href="http://confluence.jetbrains.com/display/TCD8/NuGet?_ga=1.7707770.999349697.1405089901">published by TeamCity itself</a>.</p>
<p>Out of the box, TeamCity can handle the build but you need MSTest and SSDT installed on the build server.  That is where your troubles begin.  You can download an MSTest agent as I wrote about <a href="https://www.cognim.co.uk/teamcity-and-msbuild-mstest/">here</a>.  You can even <a href="http://stackoverflow.com/questions/22241295/build-sql-server-data-tools-for-visual-studio-2013-project-on-build-server-wit">install the SSDT tools for VS2012</a> (though that was a bit hit and miss for me). The real problem is that with VS2013 the SSDT tools are integrated and no longer available as a separate download.  In the end I had to settle for installing VS2013 on the build server.  Microsoft allows your developer license to be used on the build server and at least I can easily update the SSDT version &#8211; I&#8217;m not particularly happy about having to do it though.</p>
<p>In order to publish your database to the correct server you just need to include appropriate <a href="http://sqlblog.com/blogs/jamie_thomson/archive/2012/05/09/publish-profile-files-in-sql-server-data-tools-ssdt.aspx">publish profile files </a>and Microsoft have provided the ability in database unit tests to switch config files according to the build server machine name. The publishing part worked fine for me but the config switching seems flaky and if you put a whitespace in the wrong place your config will be ignored.  My workaround here was to resort to <a href="https://www.nuget.org/packages/SlowCheetah/">Slow Cheetah</a> &#8211; a plugin from NuGet that allows config switching for app.config in the same way that you can achieve it with web.config. This works well but remember to restore your nuget packages as the first build step in TeamCity. It&#8217;s not so restrictive as a config that switches based on machine name (we only have a single build server so would be unable to test on multiple platforms).</p>
<p>The result is that on every check in, the dacpacs are built, deployed to a test environment, tested and if they pass, made available via a nuget feed for other projects.</p>
<p>It feels good when it all just starts working!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cognim.co.uk/ssdt-and-teamcity-what-you-need-to-do/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">20</post-id>	</item>
		<item>
		<title>TeamCity and MSBuild / MSTest</title>
		<link>https://www.cognim.co.uk/teamcity-and-msbuild-mstest/</link>
					<comments>https://www.cognim.co.uk/teamcity-and-msbuild-mstest/#comments</comments>
		
		<dc:creator><![CDATA[Darren Hall]]></dc:creator>
		<pubDate>Sat, 26 Jul 2014 10:14:06 +0000</pubDate>
				<category><![CDATA[Team City]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<guid isPermaLink="false">http://makesharp.wordpress.com/?p=10</guid>

					<description><![CDATA[If you want to run MSTest on your TeamCity build server, you don't need a full install of Visual Studio.]]></description>
										<content:encoded><![CDATA[<p>TeamCity comes with MSBuild so that you can build your solutions directly by selecting a runner type of MSBuild in the Build Step.  You can also choose the version of Visual Studio your developers use and since TeamCity 8.1, <a href="http://confluence.jetbrains.com/display/TCD8/MSBuild" target="_blank">Build Tools for 2013 are supported too</a>.</p>
<p>However if you need to run MSTest for your unit tests TeamCity recommends you install the full Visual Studio.  If you already have a licence for this then it is ok to install a second copy for your build server, but what if the build server is at a client premises and they don&#8217;t want to buy a license? I came across<a href="http://stackoverflow.com/questions/6926888/visual-studio-required-to-run-mstest-test-on-team-city-build-server/18092272#18092272" target="_blank"> this stack overflow post </a>that pointed me to an MSTest Agent download for 2010. You can download the Agents for Visual Studio 2013 from <a href="http://www.microsoft.com/en-us/download/details.aspx?id=40750" target="_blank">here</a>. All you need is the executable so don&#8217;t install the agent as a service and you don&#8217;t need the controller.</p>
<p>Hope that helps.</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.cognim.co.uk/teamcity-and-msbuild-mstest/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">10</post-id>	</item>
	</channel>
</rss>
