Wednesday, August 30, 2006

Visual Studio : The application domain in which the thread was running has been unloaded.

Upgraded to Visual Studio 2005. With a large project, I kept getting this error when building. No clues as to what was wrong or how to fix it.

Googled the message but little joy. Eventually found a link that suggested that virtual memory was the problem so changed my XP virtual memory.

Path is Control Panel / System / Advanced / Performance / Settings / Advanced / Virtual memory and selected "System managed size".

Seems to have fixed the problem.


Monday, August 14, 2006

C# : Visual Studio Express

If you want to take the first steps to getting familiar with C# and Visual Studio, check out these Visual Studio Express downloads.

There is one for:

Web developer
Visual Basic
Visual C#
Visual C++
Visual J#
MSDN Express Library (optional)

And best of all, they are FREE.

Thursday, August 10, 2006

C# : NUnit - integrating with Visual Studio

There are a number of ways of doing this but one of the simplest is to go to the NUnit site, click on "Documentation" then "Current Release" then "Features" then "Visual Studio Support" e.g. something like

Add a custom tool entry specifying the path as described and then run nunit-gui.exe by clicking the NUnit entry which will now be under the "Tools" menu.

If you want to debug using NUnit, the procedure is also described here. Essentially, you first set the breakpoint, run an instance of NUnit as described above and then you click "Tools / Attach to Process" and then select the nunit-gui.exe line in the dropdown. Then re-run NUnit by clicking the "Run" button.

C# : NUnit

NUnit is a very powerful way of testing using extreme programming. Check out:


The simple sample isn't all that clear. If you wanted to test a method Return0 in a class called CSharp1 which looked like:

public int Return0 ()

return 0;


use the following in CSharp1Test:

public void CheckReturn()

CSharp1 cs = new CSharp1 ();

int ret = cs.Return0();

Assert.AreEqual(0, ret, "Should return 0");