<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results for 'app:weblogs' matching tag 'Technical Tips'</title><link>http://msmvps.com/search/SearchResults.aspx?q=app:weblogs&amp;tag=Technical+Tips&amp;orTags=0&amp;o=DateDescending</link><description>Search results for 'app:weblogs' matching tag 'Technical Tips'</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Experiences upgrading our TFS2012RC to RTM</title><link>http://msmvps.com/blogs/richardfennell/archive/2012/08/20/experiences-upgrading-our-tfs2012rc-to-rtm.aspx</link><pubDate>Mon, 20 Aug 2012 05:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1815307</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;We have just completed the upgraded of our TFS2012 server from RC to RTM. All went smoothly, just a few comments worth mentioning&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The install of TFS2012 (after the removal of the RC) required three reboots, 2 for C++ components and one for .NET 4.5. So&amp;nbsp; if seeing reboots don&amp;rsquo;t worry too much.&lt;/li&gt;
&lt;li&gt;When running the upgrade wizard we got a verify warning over port 443 already being used (we had manually configured via IIS manager for our server to use 8080 and 443). We ignored this warning. However after the upgrade wizard had completed, with no errors, we found that the new web server could not start. Turns out it it had been left bound as HTTP to Port 443, so it was very confused. We just deleted this binding and re-added HTTP on 8080 and HTTPS on 433 with our wildcard certificate and it was fine. So in hindsight we should have headed the warning and removed our custom bindings.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So now off to the long job of upgrading build box, test controller and the rest.&lt;/p&gt;</description></item><item><title>Experiences upgrading our TFS2012RC to RTM</title><link>http://msmvps.com/blogs/rfennell/archive/2012/08/20/experiences-upgrading-our-tfs2012rc-to-rtm.aspx</link><pubDate>Mon, 20 Aug 2012 05:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1815306</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;We have just completed the upgraded of our TFS2012 server from RC to RTM. All went smoothly, just a few comments worth mentioning&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The install of TFS2012 (after the removal of the RC) required three reboots, 2 for C++ components and one for .NET 4.5. So&amp;nbsp; if seeing reboots don&amp;rsquo;t worry too much.&lt;/li&gt;
&lt;li&gt;When running the upgrade wizard we got a verify warning over port 443 already being used (we had manually configured via IIS manager for our server to use 8080 and 443). We ignored this warning. However after the upgrade wizard had completed, with no errors, we found that the new web server could not start. Turns out it it had been left bound as HTTP to Port 443, so it was very confused. We just deleted this binding and re-added HTTP on 8080 and HTTPS on 433 with our wildcard certificate and it was fine. So in hindsight we should have headed the warning and removed our custom bindings.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So now off to the long job of upgrading build box, test controller and the rest.&lt;/p&gt;</description></item><item><title>Moving podcast subscriptions with Zune</title><link>http://msmvps.com/blogs/richardfennell/archive/2012/08/16/moving-podcast-subscriptions-with-zune.aspx</link><pubDate>Thu, 16 Aug 2012 05:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1815181</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;If like me you listen to many podcasts, then swapping the PC your Phone7 syncs to collect the podcasta is a real pain. The problem being as far as I can see Zune has no podcast subscription export/import, so you are left with a lot of copy typing to re-enter them.&lt;/p&gt;  &lt;p&gt;Whilst rebuilding my PC with Windows 8 today I have at least found a work around&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;On your old Pc open you ‘c:\user\[user]\My Podcasts’ folder (shown in Windows Explorer as the ‘Podcast’ folder). &lt;/li&gt;    &lt;li&gt;You will see a folder for each podcast you are subscribed to &lt;/li&gt;    &lt;li&gt;Copy the whole folder to the same location on your new PC (I did via a USB drive as I was reformatting the disk on the same PC) &lt;/li&gt;    &lt;li&gt;Install Zune on the new PC &lt;/li&gt;    &lt;li&gt;Open Zune and look in the Collection&amp;gt;Podcasts, you should see all your podcast – but your are not subscribed yet &lt;/li&gt;    &lt;li&gt;In Zune, highlight and select all podcasts &lt;/li&gt;    &lt;li&gt;Right click and you should see&amp;#160; a Subscribe option, select it. &lt;/li&gt;    &lt;li&gt;Zune now sorts itself out re-subscribing and checking for new programmes &lt;/li&gt;    &lt;li&gt;It gets a bit confused over what you have watched so might pull them down again. Also you might want to alter subscription settings for specific podcasts as it will default back to just 3 programmes. &lt;/li&gt;    &lt;li&gt;When you are happy with your settings just drag the podcasts onto your newly resync’d mobile device to finish the job.&lt;/li&gt;    &lt;li&gt;You might need to look at the podcasts that are on the device as seems it does not removed one previously there via Zune (again it seems unsure of what you have listened too)&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Not perfect but better than trying to removed load of site URLs&lt;/p&gt;</description></item><item><title>Moving podcast subscriptions with Zune</title><link>http://msmvps.com/blogs/rfennell/archive/2012/08/16/moving-podcast-subscriptions-with-zune.aspx</link><pubDate>Thu, 16 Aug 2012 05:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1815179</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;If like me you listen to many podcasts, then swapping the PC your Phone7 syncs to collect the podcasta is a real pain. The problem being as far as I can see Zune has no podcast subscription export/import, so you are left with a lot of copy typing to re-enter them.&lt;/p&gt;  &lt;p&gt;Whilst rebuilding my PC with Windows 8 today I have at least found a work around&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;On your old Pc open you ‘c:\user\[user]\My Podcasts’ folder (shown in Windows Explorer as the ‘Podcast’ folder). &lt;/li&gt;    &lt;li&gt;You will see a folder for each podcast you are subscribed to &lt;/li&gt;    &lt;li&gt;Copy the whole folder to the same location on your new PC (I did via a USB drive as I was reformatting the disk on the same PC) &lt;/li&gt;    &lt;li&gt;Install Zune on the new PC &lt;/li&gt;    &lt;li&gt;Open Zune and look in the Collection&amp;gt;Podcasts, you should see all your podcast – but your are not subscribed yet &lt;/li&gt;    &lt;li&gt;In Zune, highlight and select all podcasts &lt;/li&gt;    &lt;li&gt;Right click and you should see&amp;#160; a Subscribe option, select it. &lt;/li&gt;    &lt;li&gt;Zune now sorts itself out re-subscribing and checking for new programmes &lt;/li&gt;    &lt;li&gt;It gets a bit confused over what you have watched so might pull them down again. Also you might want to alter subscription settings for specific podcasts as it will default back to just 3 programmes. &lt;/li&gt;    &lt;li&gt;When you are happy with your settings just drag the podcasts onto your newly resync’d mobile device to finish the job.&lt;/li&gt;    &lt;li&gt;You might need to look at the podcasts that are on the device as seems it does not removed one previously there via Zune (again it seems unsure of what you have listened too)&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Not perfect but better than trying to removed load of site URLs&lt;/p&gt;</description></item><item><title>TF900546 error on a TFS 2012 build</title><link>http://msmvps.com/blogs/richardfennell/archive/2012/08/09/tf900546-error-on-a-tfs-2012-build.aspx</link><pubDate>Thu, 09 Aug 2012 05:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1814932</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;Whilst moving over to our new TFS 2012 installation I got the following error when a build tried to run tests&lt;/p&gt;  &lt;p&gt;&lt;em&gt;TF900546: An unexpected error occurred while running the RunTests activity: &amp;#39;Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.&amp;#39;.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;This was a new one on me, and nothing of much use on the web other than a &lt;a href="http://msdn.microsoft.com/en-us/library/tfs/microsoft.teamfoundation.build.workflow.activities.activitiesresources.unexpectedagiletestplatformexception(v=vs.110).aspx"&gt;basic MSDN page&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Turns out the immediate fix is to just restart the build controller. Initially I did this after switching to the default build process template, and setting it to NOT load any custom activities, but I seems a simple restart would have been enough as once I re-enabled all custom activities it still worked.&lt;/p&gt;  &lt;p&gt;As to the root cause I have no idea, one to keep an eye on, especially as I am currently on the RC, lets see what the RTM build does.&lt;/p&gt;</description></item><item><title>TF900546 error on a TFS 2012 build</title><link>http://msmvps.com/blogs/rfennell/archive/2012/08/09/tf900546-error-on-a-tfs-2012-build.aspx</link><pubDate>Thu, 09 Aug 2012 05:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1814931</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;Whilst moving over to our new TFS 2012 installation I got the following error when a build tried to run tests&lt;/p&gt;  &lt;p&gt;&lt;em&gt;TF900546: An unexpected error occurred while running the RunTests activity: &amp;#39;Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.&amp;#39;.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;This was a new one on me, and nothing of much use on the web other than a &lt;a href="http://msdn.microsoft.com/en-us/library/tfs/microsoft.teamfoundation.build.workflow.activities.activitiesresources.unexpectedagiletestplatformexception(v=vs.110).aspx"&gt;basic MSDN page&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Turns out the immediate fix is to just restart the build controller. Initially I did this after switching to the default build process template, and setting it to NOT load any custom activities, but I seems a simple restart would have been enough as once I re-enabled all custom activities it still worked.&lt;/p&gt;  &lt;p&gt;As to the root cause I have no idea, one to keep an eye on, especially as I am currently on the RC, lets see what the RTM build does.&lt;/p&gt;</description></item><item><title>Using an internal Nuget server to manage the Typemock assembly references.</title><link>http://msmvps.com/blogs/richardfennell/archive/2012/08/06/using-an-internal-nuget-server-to-manage-the-typemock-assembly-references.aspx</link><pubDate>Mon, 06 Aug 2012 05:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1814822</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;In &lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/post/2012/08/04/Getting-Typemock-Isolator-running-within-a-TFS-2012-build.aspx"&gt;my last post&lt;/a&gt; I discussed the process I needed to go through to get &lt;a href="http://www.typemock.com"&gt;Typemock Isolator&lt;/a&gt; running under TFS 2012. In this process I used the Auto Deploy feature of Isolator. However this raised the&amp;#160; question of how to manage the references within projects. You cannot just assume the Typemock assemblies are in the GAC, they are not on the build box using auto deploy. You could get all projects to reference the auto deployment location in source control. However, if you use build process templates across projects it might be you do not want to have production code referencing build tools in the build process are directly.&lt;/p&gt;  &lt;p&gt;For most issues of this nature we now use &lt;a href="http://nuget.codeplex.com/"&gt;Nuget&lt;/a&gt;. At Black Marble we make use of the public Nuget repository for tools such as XUnit, SpecFlow etc. but we also have an internal Nuget repository for our own cross project code libraries. This includes licensing modules, utility and data loggers etc.&lt;/p&gt;  &lt;p&gt;It struck me after writing the last post that the best way to manage my Typemock references was with a Nuget package, obviously not a public one, this would be for Typemock to produce. So I create one to place on our internal Nuget server that just contained the two DLLs I needed to reference (I could include more but we usually only need the core and act assert arrange assemblies).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_61.png"&gt;&lt;img title="image" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;display:inline;" border="0" alt="image" src="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_thumb_61.png" width="507" height="339" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;IT IS IMPORANT TO NOTE that using a Nuget package here in no way alters the Typemock licensing. Your developers still each need a license, they also need to install Typemock Isolator, to be able to run the tests and your build box needs to use auto deployment. All using Nuget means is that you are now managing references in the same way for Typemock as any other Nuget managed set of assemblies. You are internally consistent, which I like.&lt;/p&gt;  &lt;p&gt;So in theory as new versions of Typemock are released I can update my internal Nuget package allowing projects to use the version they require. It will be interesting to see how well this works in practice.&lt;/p&gt;</description></item><item><title>Getting Typemock Isolator running within a TFS 2012 build</title><link>http://msmvps.com/blogs/richardfennell/archive/2012/08/04/getting-typemock-isolator-running-within-a-tfs-2012-build.aspx</link><pubDate>Sat, 04 Aug 2012 05:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1814763</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;I have &lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/post/2010/03/08/lessons-learnt-building-a-custom-activity-to-run-typemock-isolator-in-vs2010-team-build.aspx"&gt;posted in the past about getting Typemock Isolator to function within the TFS build process&lt;/a&gt;. In &lt;a href="http://docs.typemock.com/Isolator/##typemock.chm/Documentation/MSBuild.html"&gt;TFS 2008 it was easy&lt;/a&gt;, you just ran a couple of MSBUILD tasks that started/stopped the Typemock Isolator inception process (the bit that does the magic other mocking frameworks cannot do). However with TFS 2010’s move to a windows workflow based build model it became more difficult. This was due to the parallel processing nature of the 2010 build process, running a single task to enable interception cannot be guaranteed to occur in the correct thread (or maybe even on the correct build agent). So &lt;a href="http://www.typemock.com/files/Addons/VS2010%20TypemockBuildActivity%201.0.0.0.zip"&gt;I wrote wrapper build activity for MStest to get around this problem&lt;/a&gt;. Howerver, with the release of &lt;a href="http://docs.typemock.com/Isolator/##typemock.chm/Documentation/TFSBuild.html"&gt;Typemock Isolator 6.2 direct support for TFS 2010 was added&lt;/a&gt; and these TFS build activities have been refined in later releases. In the current beta (7.0.8) you get a pre-created TFS build process template to get you going and some great auto deploy features, but more of that later.&lt;/p&gt;  &lt;p&gt;The problem was I wanted to put Isolator based tests within a TFS 2012 build process. I &lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/post/2012/06/23/Why-Typemock-Isolator-does-not-work-on-TFS-2012-Build-and-what-you-can-do-about-it.aspx"&gt;posted before about my initial thoughts on the problem&lt;/a&gt;. The main problem is that TFS build activities have to be built against the correct version of the TFS API assemblies (this is the reason the &lt;a href="http://tfsbuildextensions.codeplex.com/"&gt;community custom activities&lt;/a&gt; have two sets of DLLs in the release ZIP file). So out the box you can’t use the &lt;strong&gt;Typemock.TFS2010.DLL&lt;/strong&gt; with TFS 2012 as it is built against the 2010 API.&lt;/p&gt;  &lt;p&gt;Also you cannot just use the Typemock provided sample build process template. This is built against 2010 too, so full of 2010 activities which all fail.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What I tried that did not work (so don’t waste your time)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;So I took a copy of the default TFS 2012 build process template and followed the process to add the &lt;strong&gt;Typemock.TFS2010.DLL&lt;/strong&gt; containing the Typemock activities to the Visual Studio 2012 toolbox (&lt;a href="http://tfsbuildextensions.codeplex.com/wikipage?title=How%20to%20integrate%20the%20extensions%20into%20a%20build%20template&amp;amp;referringTitle=Documentation"&gt;the community activity documentation provides a good overview of this strangely complex process &lt;/a&gt; also see the &lt;a href="http://vsarbuildguide.codeplex.com/"&gt;ALM Rangers guidance&lt;/a&gt;). I then added the &lt;strong&gt;TypemockRegister&lt;/strong&gt; and &lt;strong&gt;TypemockStart&lt;/strong&gt; activities at the start of the testing block. For initial tests I did not both adding the &lt;strong&gt;TypemockStop&lt;/strong&gt; activity&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_56.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_thumb_56.png" width="658" height="298" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I then made sure that&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Typemock was installed on the build agent PC&lt;/li&gt;    &lt;li&gt;The &lt;strong&gt;Typemock.TFS2010.dll&lt;/strong&gt; was in the correct &lt;strong&gt;CustomActivities&lt;/strong&gt; folder in source control&lt;/li&gt;    &lt;li&gt;The build controller was set to load activities from the &lt;strong&gt;CustomActivities&lt;/strong&gt; folder. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;However, when I tried to queue this build I got an error&amp;#160; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Exception Message: Object reference not set to an instance of an object. (type NullReferenceException)      &lt;br /&gt;Exception Stack Trace:&amp;#160;&amp;#160;&amp;#160; at TypeMock.CLI.Common.TypeMockRegisterInfo.Execute()&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_57.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_thumb_57.png" width="664" height="364" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The issue was that though Typemock was installed, the required DLLs could not be found. Checking in a bit more detailed (by running the build with diagnostic level of logging and using &lt;a href="http://msdn.microsoft.com/en-us/library/e74a18c4.aspx"&gt;Fuslogvw&lt;/a&gt;) I saw it was trying load the wrong versions of DLLs as expected. So the first thing I tried to use was binding redirection (&lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/post/2009/05/29/addressing-binding-issues-with-with-ivonna-2-0-0-using-lt-dependentassembly-gt-in-web-config.aspx"&gt;a technique I used before with similar Typemock&lt;/a&gt;). This in effect told the Typemock activity to use the 2012 DLLs when it asks for the 2010 ones. This is done by using an XML config file &lt;strong&gt;(Typemock.TFS2010.DLL.config)&lt;/strong&gt;&amp;#160; in the same folder as the DLL file.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;lt;configuration&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;runtime&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;assemblyBinding xmlns=&amp;quot;urn:schemas-microsoft-com:asm.v1&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;dependentAssembly&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;assemblyIdentity name=&amp;quot;Microsoft.TeamFoundation.Build.Workflow&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; publicKeyToken=&amp;quot;b03f5f7f11d50a3a&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; culture=&amp;quot;neutral&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;bindingRedirect oldVersion=&amp;quot;10.0.0.0&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; newVersion=&amp;quot;11.0.0.0&amp;quot;/&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/dependentAssembly&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;dependentAssembly&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;assemblyIdentity name=&amp;quot;Microsoft.TeamFoundation.Build.Client&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; publicKeyToken=&amp;quot;b03f5f7f11d50a3a&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; culture=&amp;quot;neutral&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;bindingRedirect oldVersion=&amp;quot;10.0.0.0&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; newVersion=&amp;quot;11.0.0.0&amp;quot;/&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/dependentAssembly&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;publisherPolicy apply=&amp;quot;no&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/assemblyBinding&amp;gt;bu       &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;/runtime&amp;gt;       &lt;br /&gt;&amp;lt;/configuration&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I first tried to add this file to the &lt;strong&gt;CustomActivities&lt;/strong&gt; source control folder, where the custom activities are loaded from by the build agent, but that did not work. I could only get it to work if I put both the DLL and the config files in the&amp;#160; &lt;strong&gt;C:\Program Files\Microsoft team Foundation Server 1.0\Tools&lt;/strong&gt; folder on the build agent. This is not a way I like to work, too messy having to fiddle with the build agent file system.&lt;/p&gt;  &lt;p&gt;Once this setting was made I tried a build again and got the build process to load, but the &lt;strong&gt;TypemockRegister&lt;/strong&gt; activity failed as the &lt;strong&gt;Typemock&lt;/strong&gt; settings argument was not set. Strangely Typemock have chosen to pass in their parameters as a complex type (of the type&lt;strong&gt; TypemockSettings&lt;/strong&gt;) as opposed to four strings. Also you would expect this argument to be passed directly into their custom activities by getting activity properties to argument values, but this is not how it is done. The Typemock activities know to look directly for an argument called &lt;strong&gt;Typemock&lt;/strong&gt;. This does make adding the activities easier, but not obvious if you are not expecting it. So I added this argument to the build definition in Visual Studio 2012 and checked it in, but when I tried to set the argument value for a specific build it gave the error that the DLL containing the type &lt;strong&gt;Typemock.TFS2010.TypemockSettings&lt;/strong&gt; could not be loaded, again the TFS 2010/2012 API issue, this time within Visual&amp;#160; Studio 2012&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=clip_image002_2.jpg"&gt;&lt;img title="clip_image002" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="clip_image002" src="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=clip_image002_thumb_2.jpg" width="844" height="176" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;At this point I gave up on binding redirection, I had wasted a lot more time than this post makes it sound. So I removed all the work I had previously done and thought again. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What did work&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I decided that the only sensible option was to recreate the functionality of the Typemock activity against the 2012 API. So I used &lt;a href="http://www.telerik.com/products/decompiler.aspx"&gt;Telerik JustDecompile&lt;/a&gt; to open up the &lt;strong&gt;Typemock.Tfs2010.dll&lt;/strong&gt; assembly and had a look inside. In Visual Studio 2012 I then created a new C# class library project called &lt;strong&gt;Typemock.BM.TFS20102&lt;/strong&gt; targeting .NET 4. I then basically cut and pasted the classes read from JustDecompile into classes of the same name in the new project. I then added references to the TFS 2012 API assemblies and any other assemblies needed and compiled the project. The one class I had problems with the &lt;strong&gt;TypemockStart&lt;/strong&gt;, specifically the unpacking of the properties in the &lt;strong&gt;InternalExecute&lt;/strong&gt; method. The reflected code by JustDecompile was full of what looked to be duplicated array copying which did not compile. So I simplified this to map the properties to the right names.&lt;/p&gt;  &lt;p&gt;You can &lt;a&gt;download a copy of my Typemock.BM.TFS2012.Dll from here&lt;/a&gt;, so you don’t have to go through the process yourself.&lt;/p&gt;  &lt;p&gt;I now had a TFS 2012 custom build activity. I took this new activity and put it the &lt;strong&gt;CustomActivities&lt;/strong&gt; folder. Next I took an unedited version of the default 2012 build process template and added these new &lt;strong&gt;Typemockregister&lt;/strong&gt;, &lt;strong&gt;TypemockStart &lt;/strong&gt;(at the start of the test block) and &lt;strong&gt;TypemockStop&lt;/strong&gt; (at the end of the test block) activities as well as a Typemock argument (of &lt;strong&gt;TypemockSettings&lt;/strong&gt; type). I checked this new template into TFS, and then created a build setting the Typemock argument settings.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_58.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_thumb_58.png" width="856" height="423" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now at this point it is worth mentioning the nice feature of AutoDeploy. This allows you to use Typemock without having it installed on the build agent, thus making build agent management easier. You copy the &lt;strong&gt;AutoDeploy&lt;/strong&gt; folder from the Typemock installation folder into source control (though a rename might be sensible so you remember it is for Typemock auto deployment and not anything else). You can then set the four argument properties&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The location of the auto deployment folder in source control&lt;/li&gt;    &lt;li&gt;A switch to enable auto deployment&lt;/li&gt;    &lt;li&gt;Your Typemock license settings. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;By using the auto deployment feature I was able to uninstall Typemock on the build agent.&lt;/p&gt;  &lt;p&gt;So I tried a build using these setting, all the build activities loaded Ok and the &lt;strong&gt;TypemockSettings&lt;/strong&gt; was read, but my project compile failed. As I had uninstalled Typemock on my build agent all the references to Typemock assemblies in the GAC failed. These references were fine on a development PC which had Typemock installed not on the build agent which did not.&lt;/p&gt;  &lt;p&gt;So I needed to point the references in my project to another location. Typemock have thought of this too and provide a tools to remap the references that you can find on the Typemock menu&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_59.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_thumb_59.png" width="386" height="265" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can use this tool, or do it manually. &lt;/p&gt;  &lt;p&gt;You could re-point the references to the same location you used for the AutoDeploy feature. However I prefer to keep my project references separate to my infrastructure (build activities etc.) as I use the same build templates cross project. For our projects we arrange source control so we have the structure in the general form (ignoring branch for simplicity)&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;/$     &lt;br /&gt;A team project      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; BuildProcessTemplate       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CustomActivities       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; AutoDeploy       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; MyProject-1       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Src&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Solution1A.sln      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Lib&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Nuget packages]       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; AutoDeploy       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; other assemblies       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; MyProject-2       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Src&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Solution2a.sln      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Lib&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Nuget packages]       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; AutoDeploy       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; other assemblies&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I make sure we put all assemblies referenced in the lib folder, including those from Nuget using a nuget.config file in the src folder with the SLN file e.g.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;lt;settings&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;repositoryPath&amp;gt;..\Lib\&amp;lt;/repositoryPath&amp;gt;       &lt;br /&gt;&amp;lt;/settings&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This structure might not be to your taste, but I like it as it means all projects are independent, and so is the build process. The downside is you have to manage the references for the projects and build separately, but I see this as good practice. You probably don’t share want to reference and Nuget packages between separate projects/solutions.&lt;/p&gt;  &lt;p&gt;So now we have a 2012 build process that can start Typemock Isolator, and a sample project that contains Typemock based tests, some using MSTest and some using XUnit (remember Visual Studio 2012 support multiple unit testing frameworks not just MSTest, &lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/post/2012/03/27/Unit-testing-in-VS11Beta-and-getting-your-tests-to-run-on-the-new-TFSPreview-build-service.aspx"&gt;see here on how to set this up for TFS build&lt;/a&gt;). When the build is run I can see all my unit tests pass to Typemock isolator must be starting correctly&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_60.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_thumb_60.png" width="865" height="603" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;So for me this is a reasonable work around until Typemock ship a TFS 2012 specific version. &lt;a&gt;Hope this file saves you some time if you use Typemock and TFS 2012&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Getting Typemock Isolator running within a TFS 2012 build</title><link>http://msmvps.com/blogs/rfennell/archive/2012/08/04/getting-typemock-isolator-running-within-a-tfs-2012-build.aspx</link><pubDate>Sat, 04 Aug 2012 05:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1814762</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;I have &lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/post/2010/03/08/lessons-learnt-building-a-custom-activity-to-run-typemock-isolator-in-vs2010-team-build.aspx"&gt;posted in the past about getting Typemock Isolator to function within the TFS build process&lt;/a&gt;. In &lt;a href="http://docs.typemock.com/Isolator/##typemock.chm/Documentation/MSBuild.html"&gt;TFS 2008 it was easy&lt;/a&gt;, you just ran a couple of MSBUILD tasks that started/stopped the Typemock Isolator inception process (the bit that does the magic other mocking frameworks cannot do). However with TFS 2010’s move to a windows workflow based build model it became more difficult. This was due to the parallel processing nature of the 2010 build process, running a single task to enable interception cannot be guaranteed to occur in the correct thread (or maybe even on the correct build agent). So &lt;a href="http://www.typemock.com/files/Addons/VS2010%20TypemockBuildActivity%201.0.0.0.zip"&gt;I wrote wrapper build activity for MStest to get around this problem&lt;/a&gt;. Howerver, with the release of &lt;a href="http://docs.typemock.com/Isolator/##typemock.chm/Documentation/TFSBuild.html"&gt;Typemock Isolator 6.2 direct support for TFS 2010 was added&lt;/a&gt; and these TFS build activities have been refined in later releases. In the current beta (7.0.8) you get a pre-created TFS build process template to get you going and some great auto deploy features, but more of that later.&lt;/p&gt;  &lt;p&gt;The problem was I wanted to put Isolator based tests within a TFS 2012 build process. I &lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/post/2012/06/23/Why-Typemock-Isolator-does-not-work-on-TFS-2012-Build-and-what-you-can-do-about-it.aspx"&gt;posted before about my initial thoughts on the problem&lt;/a&gt;. The main problem is that TFS build activities have to be built against the correct version of the TFS API assemblies (this is the reason the &lt;a href="http://tfsbuildextensions.codeplex.com/"&gt;community custom activities&lt;/a&gt; have two sets of DLLs in the release ZIP file). So out the box you can’t use the &lt;strong&gt;Typemock.TFS2010.DLL&lt;/strong&gt; with TFS 2012 as it is built against the 2010 API.&lt;/p&gt;  &lt;p&gt;Also you cannot just use the Typemock provided sample build process template. This is built against 2010 too, so full of 2010 activities which all fail.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What I tried that did not work (so don’t waste your time)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;So I took a copy of the default TFS 2012 build process template and followed the process to add the &lt;strong&gt;Typemock.TFS2010.DLL&lt;/strong&gt; containing the Typemock activities to the Visual Studio 2012 toolbox (&lt;a href="http://tfsbuildextensions.codeplex.com/wikipage?title=How%20to%20integrate%20the%20extensions%20into%20a%20build%20template&amp;amp;referringTitle=Documentation"&gt;the community activity documentation provides a good overview of this strangely complex process &lt;/a&gt; also see the &lt;a href="http://vsarbuildguide.codeplex.com/"&gt;ALM Rangers guidance&lt;/a&gt;). I then added the &lt;strong&gt;TypemockRegister&lt;/strong&gt; and &lt;strong&gt;TypemockStart&lt;/strong&gt; activities at the start of the testing block. For initial tests I did not both adding the &lt;strong&gt;TypemockStop&lt;/strong&gt; activity&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_56.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_thumb_56.png" width="658" height="298" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I then made sure that&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Typemock was installed on the build agent PC&lt;/li&gt;    &lt;li&gt;The &lt;strong&gt;Typemock.TFS2010.dll&lt;/strong&gt; was in the correct &lt;strong&gt;CustomActivities&lt;/strong&gt; folder in source control&lt;/li&gt;    &lt;li&gt;The build controller was set to load activities from the &lt;strong&gt;CustomActivities&lt;/strong&gt; folder. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;However, when I tried to queue this build I got an error&amp;#160; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Exception Message: Object reference not set to an instance of an object. (type NullReferenceException)      &lt;br /&gt;Exception Stack Trace:&amp;#160;&amp;#160;&amp;#160; at TypeMock.CLI.Common.TypeMockRegisterInfo.Execute()&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_57.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_thumb_57.png" width="664" height="364" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The issue was that though Typemock was installed, the required DLLs could not be found. Checking in a bit more detailed (by running the build with diagnostic level of logging and using &lt;a href="http://msdn.microsoft.com/en-us/library/e74a18c4.aspx"&gt;Fuslogvw&lt;/a&gt;) I saw it was trying load the wrong versions of DLLs as expected. So the first thing I tried to use was binding redirection (&lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/post/2009/05/29/addressing-binding-issues-with-with-ivonna-2-0-0-using-lt-dependentassembly-gt-in-web-config.aspx"&gt;a technique I used before with similar Typemock&lt;/a&gt;). This in effect told the Typemock activity to use the 2012 DLLs when it asks for the 2010 ones. This is done by using an XML config file &lt;strong&gt;(Typemock.TFS2010.DLL.config)&lt;/strong&gt;&amp;#160; in the same folder as the DLL file.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;lt;configuration&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;runtime&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;assemblyBinding xmlns=&amp;quot;urn:schemas-microsoft-com:asm.v1&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;dependentAssembly&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;assemblyIdentity name=&amp;quot;Microsoft.TeamFoundation.Build.Workflow&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; publicKeyToken=&amp;quot;b03f5f7f11d50a3a&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; culture=&amp;quot;neutral&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;bindingRedirect oldVersion=&amp;quot;10.0.0.0&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; newVersion=&amp;quot;11.0.0.0&amp;quot;/&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/dependentAssembly&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;dependentAssembly&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;assemblyIdentity name=&amp;quot;Microsoft.TeamFoundation.Build.Client&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; publicKeyToken=&amp;quot;b03f5f7f11d50a3a&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; culture=&amp;quot;neutral&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;bindingRedirect oldVersion=&amp;quot;10.0.0.0&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; newVersion=&amp;quot;11.0.0.0&amp;quot;/&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/dependentAssembly&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;publisherPolicy apply=&amp;quot;no&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/assemblyBinding&amp;gt;bu       &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;/runtime&amp;gt;       &lt;br /&gt;&amp;lt;/configuration&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I first tried to add this file to the &lt;strong&gt;CustomActivities&lt;/strong&gt; source control folder, where the custom activities are loaded from by the build agent, but that did not work. I could only get it to work if I put both the DLL and the config files in the&amp;#160; &lt;strong&gt;C:\Program Files\Microsoft team Foundation Server 1.0\Tools&lt;/strong&gt; folder on the build agent. This is not a way I like to work, too messy having to fiddle with the build agent file system.&lt;/p&gt;  &lt;p&gt;Once this setting was made I tried a build again and got the build process to load, but the &lt;strong&gt;TypemockRegister&lt;/strong&gt; activity failed as the &lt;strong&gt;Typemock&lt;/strong&gt; settings argument was not set. Strangely Typemock have chosen to pass in their parameters as a complex type (of the type&lt;strong&gt; TypemockSettings&lt;/strong&gt;) as opposed to four strings. Also you would expect this argument to be passed directly into their custom activities by getting activity properties to argument values, but this is not how it is done. The Typemock activities know to look directly for an argument called &lt;strong&gt;Typemock&lt;/strong&gt;. This does make adding the activities easier, but not obvious if you are not expecting it. So I added this argument to the build definition in Visual Studio 2012 and checked it in, but when I tried to set the argument value for a specific build it gave the error that the DLL containing the type &lt;strong&gt;Typemock.TFS2010.TypemockSettings&lt;/strong&gt; could not be loaded, again the TFS 2010/2012 API issue, this time within Visual&amp;#160; Studio 2012&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=clip_image002_2.jpg"&gt;&lt;img title="clip_image002" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="clip_image002" src="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=clip_image002_thumb_2.jpg" width="844" height="176" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;At this point I gave up on binding redirection, I had wasted a lot more time than this post makes it sound. So I removed all the work I had previously done and thought again. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What did work&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I decided that the only sensible option was to recreate the functionality of the Typemock activity against the 2012 API. So I used &lt;a href="http://www.telerik.com/products/decompiler.aspx"&gt;Telerik JustDecompile&lt;/a&gt; to open up the &lt;strong&gt;Typemock.Tfs2010.dll&lt;/strong&gt; assembly and had a look inside. In Visual Studio 2012 I then created a new C# class library project called &lt;strong&gt;Typemock.BM.TFS20102&lt;/strong&gt; targeting .NET 4. I then basically cut and pasted the classes read from JustDecompile into classes of the same name in the new project. I then added references to the TFS 2012 API assemblies and any other assemblies needed and compiled the project. The one class I had problems with the &lt;strong&gt;TypemockStart&lt;/strong&gt;, specifically the unpacking of the properties in the &lt;strong&gt;InternalExecute&lt;/strong&gt; method. The reflected code by JustDecompile was full of what looked to be duplicated array copying which did not compile. So I simplified this to map the properties to the right names.&lt;/p&gt;  &lt;p&gt;You can &lt;a&gt;download a copy of my Typemock.BM.TFS2012.Dll from here&lt;/a&gt;, so you don’t have to go through the process yourself.&lt;/p&gt;  &lt;p&gt;I now had a TFS 2012 custom build activity. I took this new activity and put it the &lt;strong&gt;CustomActivities&lt;/strong&gt; folder. Next I took an unedited version of the default 2012 build process template and added these new &lt;strong&gt;Typemockregister&lt;/strong&gt;, &lt;strong&gt;TypemockStart &lt;/strong&gt;(at the start of the test block) and &lt;strong&gt;TypemockStop&lt;/strong&gt; (at the end of the test block) activities as well as a Typemock argument (of &lt;strong&gt;TypemockSettings&lt;/strong&gt; type). I checked this new template into TFS, and then created a build setting the Typemock argument settings.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_58.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_thumb_58.png" width="856" height="423" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now at this point it is worth mentioning the nice feature of AutoDeploy. This allows you to use Typemock without having it installed on the build agent, thus making build agent management easier. You copy the &lt;strong&gt;AutoDeploy&lt;/strong&gt; folder from the Typemock installation folder into source control (though a rename might be sensible so you remember it is for Typemock auto deployment and not anything else). You can then set the four argument properties&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The location of the auto deployment folder in source control&lt;/li&gt;    &lt;li&gt;A switch to enable auto deployment&lt;/li&gt;    &lt;li&gt;Your Typemock license settings. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;By using the auto deployment feature I was able to uninstall Typemock on the build agent.&lt;/p&gt;  &lt;p&gt;So I tried a build using these setting, all the build activities loaded Ok and the &lt;strong&gt;TypemockSettings&lt;/strong&gt; was read, but my project compile failed. As I had uninstalled Typemock on my build agent all the references to Typemock assemblies in the GAC failed. These references were fine on a development PC which had Typemock installed not on the build agent which did not.&lt;/p&gt;  &lt;p&gt;So I needed to point the references in my project to another location. Typemock have thought of this too and provide a tools to remap the references that you can find on the Typemock menu&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_59.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_thumb_59.png" width="386" height="265" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can use this tool, or do it manually. &lt;/p&gt;  &lt;p&gt;You could re-point the references to the same location you used for the AutoDeploy feature. However I prefer to keep my project references separate to my infrastructure (build activities etc.) as I use the same build templates cross project. For our projects we arrange source control so we have the structure in the general form (ignoring branch for simplicity)&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;/$     &lt;br /&gt;A team project      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; BuildProcessTemplate       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CustomActivities       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; AutoDeploy       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; MyProject-1       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Src&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Solution1A.sln      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Lib&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Nuget packages]       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; AutoDeploy       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; other assemblies       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; MyProject-2       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Src&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Solution2a.sln      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Lib&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [Nuget packages]       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; AutoDeploy       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; other assemblies&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I make sure we put all assemblies referenced in the lib folder, including those from Nuget using a nuget.config file in the src folder with the SLN file e.g.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;lt;settings&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;repositoryPath&amp;gt;..\Lib\&amp;lt;/repositoryPath&amp;gt;       &lt;br /&gt;&amp;lt;/settings&amp;gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This structure might not be to your taste, but I like it as it means all projects are independent, and so is the build process. The downside is you have to manage the references for the projects and build separately, but I see this as good practice. You probably don’t share want to reference and Nuget packages between separate projects/solutions.&lt;/p&gt;  &lt;p&gt;So now we have a 2012 build process that can start Typemock Isolator, and a sample project that contains Typemock based tests, some using MSTest and some using XUnit (remember Visual Studio 2012 support multiple unit testing frameworks not just MSTest, &lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/post/2012/03/27/Unit-testing-in-VS11Beta-and-getting-your-tests-to-run-on-the-new-TFSPreview-build-service.aspx"&gt;see here on how to set this up for TFS build&lt;/a&gt;). When the build is run I can see all my unit tests pass to Typemock isolator must be starting correctly&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_60.png"&gt;&lt;img title="image" style="border-left-width:0px;border-right-width:0px;border-bottom-width:0px;display:inline;border-top-width:0px;" border="0" alt="image" src="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_thumb_60.png" width="865" height="603" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;So for me this is a reasonable work around until Typemock ship a TFS 2012 specific version. &lt;a&gt;Hope this file saves you some time if you use Typemock and TFS 2012&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Two problems editing TFS2012 build workflows with the same solution</title><link>http://msmvps.com/blogs/richardfennell/archive/2012/07/30/two-problems-editing-tfs2012-build-workflows-with-the-same-solution.aspx</link><pubDate>Mon, 30 Jul 2012 05:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1813916</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;Whilst moving over to our new TFS2012 system I have been editing build templates, pulling the best bits from the selection of templates we used in 2010 into one master build process to be used for most future projects. Doing this I have hit a couple of problems, turns out the cure is the same for both&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Problem 1 : When adding custom activities to the toolbox Visual Studio crashes&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://tfsbuildextensions.codeplex.com/wikipage?title=How%20to%20integrate%20the%20extensions%20into%20a%20build%20template&amp;amp;referringTitle=Documentation"&gt;See the community activities documentation for the process to add a items to the toolbox&lt;/a&gt;, when you get to step to browse for the custom assembly you get a crash.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=clip_image002_1.jpg"&gt;&lt;img title="clip_image002" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;display:inline;" border="0" alt="clip_image002" src="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=clip_image002_thumb_1.jpg" width="466" height="335" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Problem 2: When editing a process template in any way the process is corrupted and the build fails&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;When the build runs you get the error (amongst others)&lt;/p&gt;  &lt;p&gt;&lt;em&gt;The build process failed validation. Details:      &lt;br /&gt;Validation Error: The private implementation of activity &amp;#39;1: DynamicActivity&amp;#39; has the following validation error:&amp;#160;&amp;#160; Compiler error(s) encountered processing expression &amp;quot;BuildDetail.BuildNumber&amp;quot;.      &lt;br /&gt;Type &amp;#39;IBuildDetail&amp;#39; is not defined.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_55.png"&gt;&lt;img title="image" style="border-top:0px;border-right:0px;border-bottom:0px;border-left:0px;display:inline;" border="0" alt="image" src="http://blogs.blackmarble.co.uk/blogs/rfennell/image.axd?picture=image_thumb_55.png" width="624" height="291" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The Solution&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Turns out the issue that caused both these problems was that the Visual Studio class library project I was using to host the XAML workflow for editing was targeting .NET 4.5, the default for VS2012. I changed the project to target .NET 4.0, rolled back the XAML file back to an unedited version and reapplied my changes and all was OK.&lt;/p&gt;  &lt;p&gt;Yes I know it is strange, as you never build the containing project, but the targeted .NET version is passed around VS for building lists and the like, hence the problem.&lt;/p&gt;</description></item></channel></rss>