Skip to content

Instantly share code, notes, and snippets.

@numa08
Created October 4, 2012 11:50
Show Gist options
  • Save numa08/3833135 to your computer and use it in GitHub Desktop.
Save numa08/3833135 to your computer and use it in GitHub Desktop.
MsBuild TaSk
<?xml version="1.0" encoding="utf-8" ?>
<Project DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
<UsingTask TaskName="MyMsBuildTask.RunWP7UnitTestsInEmulator"
AssemblyFile="MyMsBuildTask.dll"/>
<PropertyGroup>
<SourceFilesPath>$(MSBuildProjectDirectory)</SourceFilesPath>
</PropertyGroup>
<ItemGroup>
<SolutionItemsToBuild Include="$(SourceFilesPath)\**\*.sln" />
</ItemGroup>
<Target Name="Build">
<MSBuild Projects="%(SolutionItemsToBuild.Identity)" Targets="Build"/>
</Target>
<Target Name="Test" DependsOnTargets="Build">
<RunWP7UnitTestsInEmulator NumberOfMilliSecondsToProcess="50000"
PathToUnitTestXapFile="$(SourceFilesPath)\(your test project).xap"
ProductGuid="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" />
</Target>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment