-
Notifications
You must be signed in to change notification settings - Fork 1
/
How to build.txt
159 lines (95 loc) · 5.25 KB
/
How to build.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
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/