steinard
03-16-2007, 09:43 PM
Hi!
Since I'm using enterprise services as well as remoting and WS, I need to have signed debug assemblies so that I have the possibility to step into the code on the remote server (by attaching the debugger to the process).
Therefore it would be really great if this buildtarget could be inserted into Spring.Net's build script:
<target name="signed-debug-net-2.0" description="Builds and signes DLLs and provides PDBs for debugging for .NET Framework 2.0 version"
depends="set-net-2.0-runtime-configuration, check-spring-basedir, clean-current-bin-dir, TestInit">
<property name="temp.build.skip" value="false"/>
<call target="copyDebugKeys"/>
<if test="${not temp.build.skip}">
<property name="lib.dir"
value="${spring.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}"/>
<call target="copylibs"/>
<nant buildfile="src/Spring/Spring.Core/Spring.Core.build" target="build"/>
<nant buildfile="src/Spring/Spring.Aop/Spring.Aop.build" target="build" if="${build-aop}"/>
<nant buildfile="src/Spring/Spring.Web/Spring.Web.build" target="build" if="${build-web}"/>
<nant buildfile="src/Spring/Spring.Data/Spring.Data.build" target="build" if="${build-data}"/>
<nant buildfile="src/Spring/Spring.Services/Spring.Services.build" target="build" if="${build-services}"/>
<nant buildfile="src/Spring/Spring.Testing/Spring.Testing.build" target="build" if="${build-testing}"/>
<!-- has dependencies on sandbox Spring.Threading....
<nant buildfile="src/Spring/Spring.Services/Spring.Services.WindowsService.Common.build" target="build"
if="${build-winservices}"/>
<nant buildfile="src/Spring/Spring.Services/Spring.Services.WindowsService.Process.build" target="build"
if="${build-winservices}"/>
<nant buildfile="src/Spring/Spring.Services/Spring.Services.WindowsService.Gui.build" target="build"
if="${build-winservices}"/>
<nant buildfile="src/Spring/Spring.Services/Spring.Services.WindowsService.Installer.build" target="build"
if="${build-winservices}"/>
-->
<nant buildfile="examples/Spring/Spring.Examples.build" target="build">
<!-- over ride setting -->
<properties>
<!-- TODO some compile errors... ignore for now. -->
<property name="build-web" value="false"/>
</properties>
</nant>
<nant buildfile="sandbox/Spring.Sandbox.build" target="build" if="${build-sandbox}">
<!-- over ride setting -->
<properties>
<!-- TODO some compile errors... ignore for now. -->
<property name="build-data" value="false"/>
<property name="nowarn.numbers" value="${nowarn.numbers},0419"/>
</properties>
</nant>
<nant buildfile="test/Spring/Spring.Core.Tests/Spring.Core.Tests.build" target="test"/>
<nant buildfile="test/Spring/Spring.Aop.Tests/Spring.Aop.Tests.build" target="test" if="${build-aop}"/>
<nant buildfile="test/Spring/Spring.Data.Tests/Spring.Data.Tests.build" target="test" if="${build-data}"/>
<nant buildfile="test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.build" target="test" if="${build-data}"/>
<nant buildfile="test/Spring/Spring.Services.Tests/Spring.Services.Tests.build" target="test" if="${build-services}"/>
<nant buildfile="test/Spring/Spring.Web.Tests/Spring.Web.Tests.build" target="test" if="${build-web}"/>
<nant buildfile="sandbox/Spring.Sandbox.build" target="test" if="${build-sandbox}">
<!-- over ride setting -->
<properties>
<!-- TODO some compile errors... ignore for now. -->
<property name="build-data" value="false"/>
<property name="nowarn.numbers.test" value="${nowarn.numbers.test},1718"/>
</properties>
</nant>
</if>
</target>
<target name="copyDebugKeys">
<if test="${current.build.config.debug}">
<if test="${not file::exists(spring.basedir + '/Spring.Net.snk')}">
<if test="${property::exists('project.build.package') and project.build.package}">
<fail message="Key file not found."/>
</if>
<if test="${not(property::exists('project.build.package') and project.build.package)}">
<echo message="Key file not found. You can generate a key file by running 'sn -k Spring.Net.snk'."/>
<echo message="The generated key file should be stored in the Spring.Net base directory."/>
<echo message="The release build will be skipped."/>
<property name="temp.build.skip" value="true"/>
</if>
</if>
<if test="${file::exists(spring.basedir + '/Spring.Net.snk')}">
<!-- copy the Spring key file to the location where the compiler expects it to be -->
<copy file="Spring.Net.snk" todir="${current.bin.dir}"/>
<copy file="Spring.Net.snk" todir="sandbox"/>
</if>
<!-- for release on .NET 2.0 need to provide keyfile argument to compiler -->
<if test="${net-2.0}">
<property name="compiler.args" value="/keyfile:..\..\..\Spring.Net.snk"/>
</if>
</if>
</target>
I hope this is possible because it would really save me some time. If you would like to refactor the target's, then thats fine by me as long as I get signed dll's and pdb files in one go.
Cheers,
Steinar.
Since I'm using enterprise services as well as remoting and WS, I need to have signed debug assemblies so that I have the possibility to step into the code on the remote server (by attaching the debugger to the process).
Therefore it would be really great if this buildtarget could be inserted into Spring.Net's build script:
<target name="signed-debug-net-2.0" description="Builds and signes DLLs and provides PDBs for debugging for .NET Framework 2.0 version"
depends="set-net-2.0-runtime-configuration, check-spring-basedir, clean-current-bin-dir, TestInit">
<property name="temp.build.skip" value="false"/>
<call target="copyDebugKeys"/>
<if test="${not temp.build.skip}">
<property name="lib.dir"
value="${spring.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}"/>
<call target="copylibs"/>
<nant buildfile="src/Spring/Spring.Core/Spring.Core.build" target="build"/>
<nant buildfile="src/Spring/Spring.Aop/Spring.Aop.build" target="build" if="${build-aop}"/>
<nant buildfile="src/Spring/Spring.Web/Spring.Web.build" target="build" if="${build-web}"/>
<nant buildfile="src/Spring/Spring.Data/Spring.Data.build" target="build" if="${build-data}"/>
<nant buildfile="src/Spring/Spring.Services/Spring.Services.build" target="build" if="${build-services}"/>
<nant buildfile="src/Spring/Spring.Testing/Spring.Testing.build" target="build" if="${build-testing}"/>
<!-- has dependencies on sandbox Spring.Threading....
<nant buildfile="src/Spring/Spring.Services/Spring.Services.WindowsService.Common.build" target="build"
if="${build-winservices}"/>
<nant buildfile="src/Spring/Spring.Services/Spring.Services.WindowsService.Process.build" target="build"
if="${build-winservices}"/>
<nant buildfile="src/Spring/Spring.Services/Spring.Services.WindowsService.Gui.build" target="build"
if="${build-winservices}"/>
<nant buildfile="src/Spring/Spring.Services/Spring.Services.WindowsService.Installer.build" target="build"
if="${build-winservices}"/>
-->
<nant buildfile="examples/Spring/Spring.Examples.build" target="build">
<!-- over ride setting -->
<properties>
<!-- TODO some compile errors... ignore for now. -->
<property name="build-web" value="false"/>
</properties>
</nant>
<nant buildfile="sandbox/Spring.Sandbox.build" target="build" if="${build-sandbox}">
<!-- over ride setting -->
<properties>
<!-- TODO some compile errors... ignore for now. -->
<property name="build-data" value="false"/>
<property name="nowarn.numbers" value="${nowarn.numbers},0419"/>
</properties>
</nant>
<nant buildfile="test/Spring/Spring.Core.Tests/Spring.Core.Tests.build" target="test"/>
<nant buildfile="test/Spring/Spring.Aop.Tests/Spring.Aop.Tests.build" target="test" if="${build-aop}"/>
<nant buildfile="test/Spring/Spring.Data.Tests/Spring.Data.Tests.build" target="test" if="${build-data}"/>
<nant buildfile="test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.build" target="test" if="${build-data}"/>
<nant buildfile="test/Spring/Spring.Services.Tests/Spring.Services.Tests.build" target="test" if="${build-services}"/>
<nant buildfile="test/Spring/Spring.Web.Tests/Spring.Web.Tests.build" target="test" if="${build-web}"/>
<nant buildfile="sandbox/Spring.Sandbox.build" target="test" if="${build-sandbox}">
<!-- over ride setting -->
<properties>
<!-- TODO some compile errors... ignore for now. -->
<property name="build-data" value="false"/>
<property name="nowarn.numbers.test" value="${nowarn.numbers.test},1718"/>
</properties>
</nant>
</if>
</target>
<target name="copyDebugKeys">
<if test="${current.build.config.debug}">
<if test="${not file::exists(spring.basedir + '/Spring.Net.snk')}">
<if test="${property::exists('project.build.package') and project.build.package}">
<fail message="Key file not found."/>
</if>
<if test="${not(property::exists('project.build.package') and project.build.package)}">
<echo message="Key file not found. You can generate a key file by running 'sn -k Spring.Net.snk'."/>
<echo message="The generated key file should be stored in the Spring.Net base directory."/>
<echo message="The release build will be skipped."/>
<property name="temp.build.skip" value="true"/>
</if>
</if>
<if test="${file::exists(spring.basedir + '/Spring.Net.snk')}">
<!-- copy the Spring key file to the location where the compiler expects it to be -->
<copy file="Spring.Net.snk" todir="${current.bin.dir}"/>
<copy file="Spring.Net.snk" todir="sandbox"/>
</if>
<!-- for release on .NET 2.0 need to provide keyfile argument to compiler -->
<if test="${net-2.0}">
<property name="compiler.args" value="/keyfile:..\..\..\Spring.Net.snk"/>
</if>
</if>
</target>
I hope this is possible because it would really save me some time. If you would like to refactor the target's, then thats fine by me as long as I get signed dll's and pdb files in one go.
Cheers,
Steinar.