Sunday, 10 February 2013

XBuild now working with 4.11.3

OK, I got xbuild working now.

However, this is an early version, and you will need to compile twice. This is owing to circular references, which I have not yet sorted out. The easiest way to compile branch 4.11.3 is to use commit #b71c7eb with:

cd build
../tools/mono/ClearLeftOverFiles (if needed)
source ~/mono_dev-env (remember to switch to mono dev environment >= 2.11)
xbuild Build.mono.proj /p:Configuration=Debug

This will create a copy of the web application under the usual location _BuildOutputs/WebApp/. You can then run the web app with:

cd _BuildOutputs/WebApp
source ~/mono_dev-env (remember to switch to mono dev environment >= 2.11)
MONO_OPTIONS="--debug" xsp4

Of course, you will immediately get an error: System.InvalidOperationExceptionThe Type Umbraco.Web.CacheHelperExtensions+CacheHelperApplicationEventListener already exists in the collection. I will deal with this in next week's post. But for anybody who wants to get a head start, here is a neat trick, which I recently learned:

source ~/mono_dev-env (remember to switch to mono dev environment >= 2.11)
# open the umbraco solution in monodevelop
MONO_OPTIONS="--debug" MONODEVELOP_SDB_TEST="true" monodevelop &
# in monodevelop: Run > Run With > Custom Command Mono Soft Debugger > Listen
cd _BuildOutputs/WebApp
MONO_OPTIONS="--debug --debugger-agent=transport=dt_socket,address=" xsp4

Using the above, you can step through and debug the project code. This is the equivalent of attaching to a process in Visual Studio.

Happy computing...

No comments:

Post a Comment

Note: only a member of this blog may post a comment.