Revert some nuget changes

This commit is contained in:
Dean Ellis 2018-02-21 13:24:20 +00:00
parent 4bb70efa50
commit 61c12dfee4
2 changed files with 23 additions and 7 deletions

View file

@ -3,8 +3,19 @@
<description>Default Ion Automated Build script</description>
<property name="os" value="${operating-system::get-platform(environment::get-operating-system())}" />
<target name="build" description="Build Nuget Templates">
<exec program="msbuild" commandline=" MonoGame.Templates.csproj /t:Clean /p:Configuration=Release" />
<exec program="msbuild" commandline=" MonoGame.Templates.csproj /t:Build /p:Configuration=Release" />
<target name="checkos" description="check the operating system">
<property name="os" value="${operating-system::get-platform(environment::get-operating-system())}"/>
<if test="${os == 'Unix'}">
<if test="${directory::exists('/Applications') and directory::exists('/Library')}">
<property name="os" value="MacOS"/>
</if>
</if>
<echo message="Detected : ${os}"/>
</target>
<target name="build" description="Build Nuget Templates" depends="checkos">
<if test="${os == 'MacOS'}">
<exec program="msbuild" commandline=" MonoGame.Templates.csproj /t:Clean /p:Configuration=Release" />
<exec program="msbuild" commandline=" MonoGame.Templates.csproj /t:Build /p:Configuration=Release" />
</if>
</target>
</project>

View file

@ -6,7 +6,6 @@
<property name="os" value="${operating-system::get-platform(environment::get-operating-system())}" />
<property name="msbuild12dir" value="C:\Program Files (x86)\MSBuild\12.0\Bin" />
<property name="msbuild14dir" value="C:\Program Files (x86)\MSBuild\14.0\Bin" />
<property name="msbuild15dir" value="C:\Program Files (x86)\MSBuild\15.0\Bin" />
<!-- Helper default target. -->
<target name="build"
@ -174,9 +173,15 @@
<if test="${file::exists('c:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\Microsoft.Windows.UI.Xaml.CSharp.targets')}">
<exec program="Protobuild" commandline="-generate WindowsUniversal" />
<exec program="${msbuild15dir}\msbuild.exe " commandline='MonoGame.Framework.WindowsUniversal.sln /t:Restore /p:Configuration=Release /p:Platform="Any CPU"' />
<exec program="${msbuild15dir}\msbuild.exe " commandline='MonoGame.Framework.WindowsUniversal.sln /t:Clean /p:Configuration=Release /p:Platform="Any CPU"' />
<exec program="${msbuild15dir}\msbuild.exe " commandline='MonoGame.Framework.WindowsUniversal.sln /t:Build /p:Configuration=Release /p:Platform="Any CPU"' />
<!--
Currently MSBuild doesn't restore the nuget packages like buiding from the
IDE does. So we have to do it ourselves using the recommended work around.
-->
<exec program="${nuget3path}\nuget.exe " commandline='restore MonoGame.Framework\MonoGame.Framework.WindowsUniversal.project.json -NonInteractive' />
<exec program="${nuget3path}\nuget.exe " commandline='restore MonoGame.Framework\MonoGame.Framework.Net.WindowsUniversal.project.json -NonInteractive' />
<exec program="${msbuild14dir}\msbuild.exe " commandline='MonoGame.Framework.WindowsUniversal.sln /t:Clean /p:Configuration=Release /p:Platform="Any CPU"' />
<exec program="${msbuild14dir}\msbuild.exe " commandline='MonoGame.Framework.WindowsUniversal.sln /t:Build /p:Configuration=Release /p:Platform="Any CPU"' />
</if>
</if>