===This guide is deprecated=== Where to start the build? ========================= Use the build.cmd script, which drives default.build NAnt script, in the root directory. It compiles everything in the right order, copies dependencies and so on. It is necessary to build the trunk in this way before attempting to load any solutions in your IDE for the first time, otherwise the Visual Studio projects will have assembly reference problems: Simply type > build This will create a Release build of the project, without running the tests/hitting databases or accessing the GAC. Specifying additional parameters to the build ============================================= When specifying additonal parameters be careful to check if your system is configured to allow the tests to pass; please study this entire file carefully. Running the database tests ========================== If you have MS SQL Server installed (default instance) just create two databases: - test - test2 If not, and you want to run the database tests, you must set the connection string, dialect and driver through NAnt defines. Otherwise you can disable the tests (see below). The basic NHibernate settings can be set as NAnt arguments: - ar.dialect sets the NHibernate dialect > -D:ar.dialect=NHibernate.Dialect.MsSql2000Dialect - ar.connection.driver_class sets the driver > -D:ar.connection.driver_class=NHibernate.Driver.SqlClientDriver - ar.connection.connection_string{1,2} set the connection strings for the test and test2 databases > -D:ar.connection.connection_string.1="Data Source=.;Initial Catalog=test;Integrated Security=SSPI;" > -D:ar.connection.connection_string.2="Data Source=.;Initial Catalog=test2;Integrated Security=SSPI;" Skipping the databases tests ============================ If you want to run all tests except the database tests type > build -D:nhibernate.test=false -D:activerecord.test=false Running MonoRail's tests ======================== The user account running the tests must be allowed to add and remove assemblies from the GAC. For instance, the administrator account has these privileges. Skipping MonoRail's tests ========================= If you want to run all tests except the MonoRail tests type > build -D:monorail.test=false Possible problem with .NET 3.5 ============================== if you get the following error: "The SDK for the 'net-3.5' framework is not available or not configured." then you probably need to fix the sdkInstallRoot in your nant.exe.config file to point to the correct location in the registry See the following article for more info: http://www.timbarcz.com/blog/NantSetupForVisualStudio2008AndNet35.aspx Possible problem with WCF facility build ======================================== If you bump into the following message "System.ServiceModel.CommunicationException : The TransportManager failed to listen on the supplied URI using the NetTcpPortSharing service: failed to start the service because it is disabled. An administrator can enable it by running 'sc.exe config NetTcpPortSharing start= demand' Run the following from the command line: > sc.exe config NetTcpPortSharing start= demand MSDTC ===== The Distributed Transaction Coordinator (msdtc) is required for some of the tests. If the service is not running by default on your machine, you'd need to start it to make tests pass so, simply start it before running the build, and stop it afterwards: > net start msdtc > build ... > net stop msdtc Build options ============= Build option selectors ------------------------ Selectors are pseudo-targets, used to configure some part of the build. They need to be put before real build targets. debug: "build debug build" will build the project in debug configuration" release: "build release rebuild" will rebuild the entire project in release configuration quick: "build quick build" will run the build without tests and generally will try to skip as much as possible to speed up the build. Running the tests ------------------- It's strongly advised to use the supplied build.cmd script, as this will use the NUnit from SharedLibs\build\NUnit, a version that's known to be working our tests. Building without running the tests ------------------- > build -D:common.testrunner.enabled=false or > build quick build Compiling a version not strongly signed --------------------------------------- > build -D:sign=false Allowing partial trust ---------------------- > build -D:assembly.allow-partially-trusted-callers=true Building the Castle MSI installer ---------------------- > build installer You need to have installed the tools following for running this task: - Sandcastle http://www.microsoft.com/downloads/details.aspx?FamilyId=E82EA71D-DA89-42EE-A715-696E3A4873B2&displaylang=en - Sandcastle Help File Builder http://www.codeplex.com/SHFB - HTML Help 1.x compiler http://www.microsoft.com/downloads/details.aspx?familyid=00535334-c8a6-452f-9aa0-d597d16580cc&displaylang=en - WiX v3. http://wix.sourceforge.net/downloadv3.html More questions? =============== Please direct more questions to our devel mailing list or our forum at http://www.castleproject.org/