Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I use msbuild directly, skipping nAnt. You can call it with a build file as a property and specify the target from the command line. Here is a sample soultion.build file:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt; &lt;!-- Import the MSBuild Tasks --&gt; &lt;Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" /&gt; &lt;PropertyGroup&gt; &lt;Configuration Condition=" '$(Configuration)' == '' "&gt;Debug&lt;/Configuration&gt; &lt;ClassLibraryOutputDirectory&gt;bin$(Configuration)&lt;/ClassLibraryOutputDirectory&gt; &lt;ProjectDir&gt;.\&lt;/ProjectDir &gt; &lt;ProjectTestDir&gt;DALTests\&lt;/ProjectTestDir &gt; &lt;ProjectFile&gt;$(ProjectDir)SSN.sln&lt;/ProjectFile &gt; &lt;TestProjectFile&gt;$(ProjectTestDir)DALTests.csproj&lt;/TestProjectFile &gt; &lt;/PropertyGroup&gt; &lt;!-- Build projects by calling the Project files generated by VS --&gt; &lt;Target Name="Build"&gt; &lt;MSBuild Projects="$(ProjectFile)" /&gt; &lt;MSBuild Projects="$(TestProjectFile)" /&gt; &lt;/Target&gt; &lt;!-- Run Unit tests --&gt; &lt;Target Name="Test" DependsOnTargets="Build"&gt; &lt;CreateItem Include="DALTests\Bin\Debug\DALTests.exe"&gt; &lt;Output TaskParameter="Include" ItemName="DALTests" /&gt; &lt;/CreateItem&gt; &lt;NUnit Assemblies="@(DALTests)" ToolPath="D:\Program Files\NUnit 2.4.5\bin" ContinueOnError="false" OutputXmlFile="SoultionTestResults.xml" /&gt; &lt;/Target&gt; &lt;/Project&gt; </code></pre> <p>I call this from a batch file like this: (in the same dir as soultion.build)</p> <pre><code>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe Soultion.Build /Target:Build </code></pre> <p>You will need the MSBuild Community Tasks dll, just google it.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload