Wednesday 04 January 2012 at 12:30 pm
Always keen that our adopted environment shouldn't dictate tooling it was important that we could achieve a good level integration between with testing tools and Team Foundation Server; however as TFS 2010 moved to using web services and XAML build workflow it can look rather challenging.
Interesting note
The snippets below are based around NUnit testing tool but it could be employed just as easily for others that are able to output their results XML in the same format, xUnit being a fine example.
Looking at integration we identified two essential requirements;
- NUnit-Console test runner executes as part of the build workflow
- Test results are published back into TFS 2010 and statistics
Read More
Friday 16 December 2011 at 09:18 am
If like me you don't want to have duplicate copies of your bin dependencies between your libraries/packages folder and "/_bin_deployableAssemblies" you'll want to link them; unfortunately the default Microsoft.WebApplication.targets won't publish them - absurd I know!
Through experimentation I've found the most elegant solution is to have have a custom targets files (checked into source control and branched from a common location) that I import into my web projects. It simply overrides one of the targets in Microsoft.WebApplication.targets and copies linked files to a bin sub-folder before adding them to the CreateItem collection that is later used when building/publishing.
CopyLinkedBinDeployableAssemblies.targets
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="_CopyBinDeployableAssemblies" Condition="Exists('$(MSBuildProjectDirectory)\_bin_deployableAssemblies')">
<Copy Condition=" '%(Content.Link)' != '' " SourceFiles="%(Content.Identity)" DestinationFiles="$(MSBuildProjectDirectory)\bin\%(Content.Link)" />
<CreateItem Include="$(MSBuildProjectDirectory)\bin\_bin_deployableAssemblies\**\*.*" Condition="Exists('$(MSBuildProjectDirectory)\bin\_bin_deployableAssemblies')">
<Output ItemName="_binDeployableAssemblies" TaskParameter="Include" />
</CreateItem>
<CreateItem Include="$(MSBuildProjectDirectory)\_bin_deployableAssemblies\**\*.*" Condition="Exists('$(MSBuildProjectDirectory)\_bin_deployableAssemblies')">
<Output ItemName="_binDeployableAssemblies" TaskParameter="Include" />
</CreateItem>
<Copy SourceFiles="@(_binDeployableAssemblies)" DestinationFolder="$(OutDir)\%(RecursiveDir)" SkipUnchangedFiles="true" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" />
</Target>
</Project>;
Then in my web .csproj project file add an import link to the new targets file;
<Import Project="$(MSBuildProjectDirectory)\..\..\BuildSupport\Targets\CopyLinkedBinDeployableAssemblies.targets" />
Important! Make sure you put this after the Import to Microsoft.WebApplication.targets.
Finally...
There seems to be a myth that _bin_deployableAssemblies is MVC3 only which of course is utter tosh, this works for any project that uses Microsoft.WebApplication.targets; I know this as we use it in our FubuMVC projects to copy Simple.Data MEF dependencies 
Monday 05 December 2011 at 10:00 pm
Just thought I'd drop this quick note should you also find the settings on the Araxis website don't work with your .gitconfig, I went through many attempts but this simple version worked for me.
[merge]
tool = araxis
[mergetool "araxis"]
cmd = araxisgitmerge.exe \"$REMOTE\" \"$BASE\" \"$PWD/LOCAL\" \"$PWD/MERGED\"
…or alternatively…
git config --global merge.tool araxis
git config --global mergetool.araxis.cmd 'araxisgitmerge.exe \"$REMOTE\" \"$BASE\" \"$PWD/LOCAL\" \"$PWD/MERGED\"'
Note: I added the Araxis installation directory to my PATH environment variable so not necessary above.