Head.SmackOnTable();

Contains Nuts.

Archive for February, 2010

Creating a CI server using CC.Net Part 1

without comments

For the CycleMania project, I previously used TeamCity, but I think it is more geared towards building static projects and running tests rather than deployment, so this time around im going to be using CruiseControl.NET

Note – I am doing this and writing this at the same time :)

To get started, you need to install the following:

  • Subversion for windows, command line, from Collab.NET
  • NAnt, I have version 0.85 installed, and put the path into the PATH environment variable, I am NOT using 0.86beta1 because of this error:
NAnt 0.86 (Build 0.86.2898.0; beta1; 12/8/2007)
Copyright (C) 2001-2007 Gerry Shaw

http://nant.sourceforge.net

BUILD FAILED

Failed to initialize the 'Microsoft .NET Framework 2.0' (net-2.0) target framework.

 Property evaluation failed.
Expression: ${path::combine(sdkInstallRoot, 'bin')}
 ^^^^^^^^^^^^^^

 Property 'sdkInstallRoot' has not been set.

For more information regarding the cause of the build failure, run the build again in debug mode.

Try 'nant -help' for more information

Even though we do NOT need the .net 2.0 SDK! Very poor show indeed.

  • CruiseControl.Net – you probably want to set the admin password to something else from the config file loctated in the webdashboard directory (inside where you installed cc.net), the file is dashboard.config

Once you have the above monkies installed, you want to do a checkout of the CycleMania source code to a directory, like so:


svn co https://cyclemania.svn.codeplex.com/svn/trunk E:\SVN\CycleMania

Replace the E:\SVN\CycleMania with wherever your subversion repository lives.

For sake of argument, I have my build scripts living in E:\SVN\CycleMania-BuildScript, and the file is called CycleMania.build

Once you have done that, go into the build script, and type in nant, and you should get the following:

E:\SVN\CycleMania-BuildScript>nant -buildfile:CycleMania.build
NAnt 0.85 (Build 0.85.2478.0; release; 10/14/2006)
Copyright (C) 2001-2006 Gerry Shaw

http://nant.sourceforge.net

Buildfile: file:///E:/SVN/CycleMania-BuildScript/CycleMania.build
Target framework: Microsoft .NET Framework 2.0
Target(s) specified: build

build:

 [echo] Building Target
 [exec] Starting 'c:\Windows\Microsoft.NET\Framework64\v4.0.30128\MSBuild.exe ( E:\SVN\CycleMania\CycleMania.sln)' in 'E:\SVN\CycleMania-BuildScript'
 [exec] Microsoft (R) Build Engine Version 4.0.30128.1
 [exec] [Microsoft .NET Framework, Version 4.0.30128.1]
 [exec] Copyright (C) Microsoft Corporation 2007. All rights reserved.
 [exec] Build started 2/23/2010 3:47:11 PM.
 [exec] Project "E:\SVN\CycleMania\CycleMania.sln" on node 1 (default targets).
 [exec] ValidateSolutionConfiguration:
 [exec]   Building solution configuration "Debug|Mixed Platforms".
 [exec] Project "E:\SVN\CycleMania\CycleMania.sln" (1) is building "E:\SVN\CycleMania\Cyclemania.Web\Cyclemania.Web.csproj" (2) on node 1 (default targets).

 [exec] E:\SVN\CycleMania\Cyclemania.Web\Cyclemania.Web.csproj(649,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualS
tudio\v10.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exi
sts on disk.
 [exec] Done Building Project "E:\SVN\CycleMania\Cyclemania.Web\Cyclemania.Web.csproj" (default targets) -- FAILED.
 [exec] Done Building Project "E:\SVN\CycleMania\CycleMania.sln" (default targets) -- FAILED.
 [exec] Build FAILED.
 [exec] "E:\SVN\CycleMania\CycleMania.sln" (default target) (1) ->
 [exec] "E:\SVN\CycleMania\Cyclemania.Web\Cyclemania.Web.csproj" (default target) (2) ->
 [exec]   E:\SVN\CycleMania\Cyclemania.Web\Cyclemania.Web.csproj(649,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\Visua
lStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
 [exec]     0 Warning(s)
 [exec]     1 Error(s)
 [exec] Time Elapsed 00:00:05.22

BUILD FAILED

E:\SVN\CycleMania-BuildScript\CycleMania.build(7,4):
External Program Failed: c:\Windows\Microsoft.NET\Framework64\v4.0.30128\MSBuild.exe (return code was 1)

Total time: 12.9 seconds.

HUH?!? What the hell happened there? Well in the infinate wisdom of Microsoft (which I have blogged about before), they did not decide to include the Microsoft.WebApplications.targets file anywhere to be found on the hdd, and you have to dig it out from the vs.net install, or you can find it from this handly link! Unzip this into your Program Files or Program Files (x86) if you are fancy and have a 64bit proc.

Once you have unzipped that lovely glorious file, and run the NAnt script again, you should see a better output, with LOADS of stuff hapenning, and hopefully at the end, these GLORIOUS WORDS:


BUILD SUCCEEDED

Total Time: 11.6 seconds

Note: Your time may vary.

In Part 2, I will describe how to set up your SQL 2008 instance up, user accounts (NOTE, I would do this properly as opposed to the hacky “lets get the site to work” way), and IIS…

Written by Monty

February 24th, 2010 at 1:05 am

Posted in .NET,CycleMania

Tagged with , ,

Slowness with Windows 7

without comments

Well, recently I have been having trouble with my Win7 installation. I was getting very frequent slowdowns (every 2-3 seconds), but only if I used the hdd, if I was playing around with something in memory, then it was perfectly fine. Playing games could get rather frustrating because of the slowdowns, but once everything was loaded into memory, it was ok

After some research, and getting incredibly pissed off with my machine, to the point where I was convinced it was a hardware fault after disabling a bunch of services, updating all the drivers, antivirus, all the extra faff in windows, in one of my moments of desperation before I waved bye bye to my machine, I had a look in Resource Monitor, you know the little button located in the Task Manager’s Performance tab?

Well under there, I noticed that a certain process was hammering the hard disk, wmpnetwk, and whenever it seemed to hit the hard disk, I would get a slow down. After some research on the all mighty tinterweb, its the Windows Media Player Network Sharing Service, basically for streaming your stuff to other pc’s and/or Xbox etc, and from what I read online, that if it comes across a corrupted (or half downloaded .avi’s which I have loads of, after trying to convert a few vid’s for my friends), it tends to hammer the hard drive. Once I disabled this service, my PC was lightning fast!

Written by Monty

February 16th, 2010 at 7:41 pm

Posted in Misc