Files
spring-net/build-support/solutions.build.nant
Marko Lahma 0dfc0bc57b SPRNET-1539 upgrade Quartz dependency to 2.2.1, use Spring.Scheduling.Quartz2 as package name
* replace lib dir NHibernate and Quartz dlls with NuGet references
* update examples to prefer NuGet packages
2013-12-23 23:44:50 +02:00

190 lines
7.2 KiB
XML

<?xml version="1.0" ?>
<!--
Rebuilding Solutions using Nant and "solutions.build":
1) Move Spring.Calculator.snk -> $root/Spring.Calculator.snk
2) Create virtual directories in IIS
/Spring.Calculator.2003 -> $root\examples\Spring\Spring.Calculator\src\Spring.Calculator.Web.2003
/SpringAir.2003 -> $root\examples\Spring\SpringAir\src\SpringAir.Web.2003
3) Place solutions.build into $root/Solutions.build
4) execute "nant -f:solutions.build"
5) SpringAir.2003 unfort. doesn't work with this script :-(( - You need to check it manually (I'm working on it...)
-->
<project name="Spring.NET Examples" default="RebuildAllSolutions">
<property name="root.dir" value="${project::get-base-directory()}\.." overwrite="false" />
<!--
Ensure use of 32 bits version of frameworks and IDE to avoid the error
[MSB6003: The specified task executable "ResGen.exe" could not be run...]
on "Win 7 64".
-->
<property name="reg.software.prefix" value="SOFTWARE\Microsoft"/>
<readregistry property="wow6432node" key="SOFTWARE\Wow6432Node\" hive="LocalMachine" failonerror="false"/>
<if test="${property::exists('wow6432node')}">
<property name="reg.software.prefix" value="SOFTWARE\Wow6432Node\Microsoft"/>
</if>
<readregistry property="net35.install.dir" key="${reg.software.prefix}\NET Framework Setup\NDP\v3.5\InstallPath" hive="LocalMachine" failonerror="true"/>
<readregistry property="net40.install.dir" key="${reg.software.prefix}\NET Framework Setup\NDP\v4\Full\InstallPath" hive="LocalMachine" failonerror="true"/>
<property name="msbuild.exe" value="${net40.install.dir}\msbuild.exe"/>
<if test="${file::exists('C:\Program Files (x86)\MSBuild\12.0\Bin\MsBuild.exe')}">
<property name="msbuild.exe" value="C:\Program Files (x86)\MSBuild\12.0\Bin\MsBuild.exe" />
<echo message="Swithing to installed MSBuild at location ${msbuild.exe}" />
</if>
<property name="buildconfiguration" value="Debug" />
<echo message="reg.software.prefix: '${reg.software.prefix}'"/>
<echo message="msbuild.exe: '${msbuild.exe}'"/>
<target name="RebuildAllSolutions" description="Rebuild all Solutions">
<!--
Forcing use of specific SDK to avoid the error "TRK0002: Failed to execute
command ResGen ..." on "Win 7 64".
See: http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/e8c1d26a-5e77-4422-bbc8-f0b7f25702d2/
-->
<call target="RebuildAllSolutions-4.0" />
</target>
<target name="Clean">
<foreach item="Folder" property="dirname">
<in>
<items basedir="${root.dir}">
<include name="examples/**/obj" />
<include name="examples/**/PreCompiledWeb" />
<include name="build/VS.NET.*" />
</items>
</in>
<do>
<delete dir="${dirname}" failonerror="false"/>
<sleep seconds="2"/>
<delete dir="${dirname}" />
</do>
</foreach>
<delete>
<fileset basedir="${root.dir}">
<include name="examples/**/bin/**/*.*" />
<exclude name="examples/**/bin/*.refresh" />
</fileset>
</delete>
</target>
<target name="RebuildAllSolutions-3.5" depends="Clean">
<!-- build "main" solution -->
<property name="solutionfile" value="${root.dir}/Spring.NET.2010.sln" />
<property name="solutionconfiguration" value="${buildconfiguration}" />
<call target="RebuildSolution-3.5" />
<foreach item="File" property="filename">
<in>
<items basedir="${root.dir}">
<include name="examples/Spring/Spring.Data.NHibernate/Spring.Northwind.sln" />
<include name="*.2010.sln" />
<exclude name="examples/Spring/Spring.EmsQuickStart/**/*.sln" unless="${build-ems}"/>
<exclude name="examples/**/Spring.Examples.Pool.2010.sln"/>
</items>
</in>
<do>
<property name="solutionfile" value="${filename}" />
<property name="solutionconfiguration" value="${buildconfiguration}" />
<call target="RebuildSolution-3.5" />
</do>
</foreach>
</target>
<target name="RebuildAllSolutions-4.0" depends="Clean">
<!-- build "main" solution -->
<property name="solutionfile" value="${root.dir}/Spring.NET.2010.sln" />
<property name="solutionconfiguration" value="${buildconfiguration}" />
<call target="RebuildSolution-4.0" />
<foreach item="File" property="filename">
<in>
<items basedir="${root.dir}">
<!-- <include name="examples/Spring/**/*.2005.sln" /> -->
<include name="examples/Spring/**/*.2010.sln" />
<exclude name="Spring.NET.2010.sln"/>
<exclude name="examples/Spring/Spring.EmsQuickStart/**/*.sln" unless="${build-ems}"/>
<exclude name="examples/**/Spring.Examples.Pool.2010.sln"/>
<exclude name="examples/**/Spring.Examples.Pool.2010.sln"/>
</items>
</in>
<do>
<property name="solutionfile" value="${filename}" />
<property name="solutionconfiguration" value="${buildconfiguration}" />
<call target="RebuildSolution-4.0" />
</do>
</foreach>
</target>
<target name="RebuildAllSolutions-4.5" depends="Clean">
<foreach item="File" property="filename">
<in>
<items basedir="${root.dir}">
<!-- <include name="examples/Spring/**/*.2005.sln" /> -->
<include name="examples/Spring/**/Spring.Mvc5QuickStart.sln" />
</items>
</in>
<do>
<property name="solutionfile" value="${filename}" />
<property name="solutionconfiguration" value="${buildconfiguration}" />
<call target="RebuildSolution-4.5" />
</do>
</foreach>
</target>
<target name="RebuildSolution-3.5" description="rebuilds a given VS2008 solution file">
<echo message="Rebuilding .NET 3.5 Solution ${solutionfile}" />
<exec program="${msbuild.exe}">
<arg value="${solutionfile}"/>
<arg line="/nologo" />
<arg line="/verbosity:minimal" />
<arg line="/property:Configuration=${solutionconfiguration}"/>
<!--Specifying mandatory property in SDK 7-->
<arg line='/property:Platform="Any CPU"'/>
</exec>
</target>
<target name="RebuildSolution-4.0" description="rebuilds a given VS2010 solution file">
<echo message="Rebuilding .NET 4.0 Solution ${solutionfile}" />
<exec program="${msbuild.exe}" verbose="true">
<arg value="${solutionfile}"/>
<arg line="/nologo" />
<arg line="/verbosity:minimal" />
<arg line="/property:Configuration=${solutionconfiguration}"/>
<!--Specifying mandatory property in SDK 7-->
<arg line='/property:Platform="Any CPU"'/>
</exec>
</target>
<target name="RebuildSolution-4.5" description="rebuilds a given VS2010 solution file">
<echo message="Rebuilding .NET 4.5 Solution ${solutionfile}" />
<exec program="${msbuild.exe}" verbose="true">
<arg value="${solutionfile}"/>
<arg line="/nologo" />
<arg line="/verbosity:minimal" />
<arg line="/property:Configuration=${solutionconfiguration}"/>
<!--Specifying mandatory property in SDK 7-->
<arg line='/property:Platform="Any CPU"'/>
</exec>
</target>
</project>