Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I used the following bat file to build WP7 code (+ant automation on top of it). It may be helpful for you.</p> <p><strong>build.bat</strong></p> <pre><code>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe build.xml /t:BuildAndCopy /p:Revision=123 </code></pre> <p>where <strong>build.xml</strong> is something like (build itself goes under BuildAll target)</p> <pre><code>&lt;Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt; &lt;Import Project="C:\Program Files (x86)\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/&gt; &lt;PropertyGroup&gt; &lt;Major&gt;1&lt;/Major&gt; &lt;Minor&gt;0&lt;/Minor&gt; &lt;Build&gt;0&lt;/Build&gt; &lt;Revision&gt;x&lt;/Revision&gt; &lt;OutputPath&gt;Build\&lt;/OutputPath&gt; &lt;OutputPathDebug&gt;..\Build\Debug\&lt;/OutputPathDebug&gt; &lt;OutputPathRelease&gt;..\Build\&lt;/OutputPathRelease&gt; &lt;/PropertyGroup&gt; &lt;Target Name="BuildAll" DependsOnTargets="Clean; Version"&gt; &lt;msbuild Projects="SomeApp.sln" Properties="Configuration=Release;OutputPath=$(OutputPathRelease)"/&gt; &lt;msbuild Projects="SomeApp.sln" Properties="Configuration=Debug;OutputPath=$(OutputPathDebug)"/&gt; &lt;/Target&gt; &lt;Target Name="Clean"&gt; &lt;RemoveDir Directories="$(OutputPath)" Condition="Exists('$(OutputPath)')"/&gt; &lt;MakeDir Directories="$(OutputPath)" Condition="!Exists('$(OutputPath)')"/&gt; &lt;/Target&gt; &lt;Target Name="Version"&gt; &lt;Message Text="Version: $(Major).$(Minor).$(Build).$(Revision)"/&gt; &lt;XmlUpdate Namespace="" XmlFileName="WindowsPhone\Properties\WMAppManifest.xml" XPath="//App[@Version]//@Version" Value="$(Major).$(Minor).$(Build).$(Revision)"/&gt; &lt;/Target&gt; &lt;ItemGroup&gt; &lt;AppFiles Include="$(OutputPath)\**\*.xap"/&gt; &lt;/ItemGroup&gt; &lt;Target Name="BuildAndCopy" DependsOnTargets="BuildAll"&gt; &lt;Copy SourceFiles="@(AppFiles)" DestinationFiles="@(AppFiles-&gt;'\\fs\Public\projects\mobile\SomeAppWP\$(Major).$(Minor).$(Build).$(Revision)\%(RecursiveDir)%(Filename)%(Extension)')" /&gt; &lt;Copy SourceFiles="@(AppFiles)" DestinationFiles="@(AppFiles-&gt;'\\fs\Public\projects\mobile\SomeAppWP\latest\%(RecursiveDir)%(Filename)%(Extension)')" /&gt; &lt;/Target&gt; &lt;/Project&gt; </code></pre>
 

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