Visar inlägg med etikett OpenSource. Visa alla inlägg
Visar inlägg med etikett OpenSource. Visa alla inlägg

torsdag, september 03, 2009

I made my first real Git commit's and push tonight. And I made it as a contribution to Git#. I had a great time, making a test fixture of 5 tests pass.

lördag, maj 17, 2008

NUnit runners with memory leak, and the solution

I found amazingly few references to people having problem with the NUnit test runners. We came to a point where the the NUnit test runners consumed over one gigabyte of memory and the same tests run from Resharpers test runner from inside Visual Studio would only consume about 250 megabyte of memory. I also found that the memory was not released between assemblies if you run a NUnit project file with multiple assemblies.

The problem was that a reference to each TestFixture decorated class was kept in the result even if it was unnecessary. Or to be more specific, the Fixture part of the result released it's reference to the tested Fixture class after TestFixtureTearDown, but the TestMethod in the result kept a reference to the very same Fixture...To find out about this I used a nice memory profiler, SciTech's .NET Memory Profiler

I posted a patch to the NUnit project on SourceForge. With this patch the nunit-console test runner use about the same amount of memory as the Resharper one, and I suppose this would be the case for the GUI one too, since this was a change in the core.

onsdag, november 07, 2007

Switch between VS 2005 and VS 2008

I have made two small scripts that make it possible to develop using Visual Studio 2008 Beta 2 in a group using Visual Studio 2005.
And I'm sure these scrips could be very usefull if you want to make some other batch search replace on some files.

Surely my scrips don't cover all solution files but I'm sure you could modify them to cover your solutions.
As a base I use RxFind a regular expression search and replace, command line tool I found at CodePlex. To make it more usefull for this case I made a couple of small modifications.
I added the possiblity to take the search and replace expressions from an input file. This makes it easier to handle line breaks and "-characters in the expressions. When you avoid a few of the escape characters, it is much easier to read.

Use it like this.
  • Modify the file name and path in the first rows of the batch files.
  • Open your Visual Studio 2005 solution that should be under version control., in Visual Studio 2008 (Beta 2)
  • Let the conversion wizard do it's job.
  • Let your version control system show which files where modified
  • Try to run: "first time to2005.bat"
  • In the ideal world the solution should now not contain any modifications and it should be possible to open it in VS 2005 like before.
  • Run to2008.bat, it should now be possible to open the solution in VS 2008.
  • Run to2005.bat, if there are some modifications you want to commit, do so.
Runing this back and forth, I found a few small changes that I wanted to do in the project files. Changes that should be there in both the 2005 and the 2008 version of the files.

* If my script and your modifications work you should be able to work like this, using subversion/cvs terminology:

10 Checkout
15 run to2008.bat
20 Use the project in VS 2008
30 Make updates and so on
40 Run to2005.bat build and run the tests (I do this from the command line)
50 commit
60 Goto 15 ;o)

BTW The script are made for C# but could probably be modified for VB very easily, if there are some real VB-hacker out there...
If you have spaces in your solution file name or in the path where you put your tool, you would have to add a few "" in the batch file, but since i didn't need it. I leave it as an exercise for the reader.
One of the benefits I get out of this is that I can avoid conflicts between my favorite VS add in for C++(Visual Assist) which I use in VS 2005 and my favorite/current VS add in for C# (ReSharper) that I use in VS 2008.

Download scripts

Download updated source for RxFind

söndag, maj 06, 2007

Mono - Silverlight

I have signed up to two Google groups and one mail list today, with the intent to join the development of a Mono version of Silverlight with the cool name: Moonlight.

For a "Windows developer" like myself it would feel much more familiar to start develop a web application using what I call Silverlight .NET (Silverlight 1.1 Alpha with a CLR), than to use the more traditional web application frameworks. It's more or less just like building a WPF application. You even have isolated storage.

Why should I contribute to the Moonlight development:
  • I really like the WPF design,
  • The world needs Silverlight for Linux.
  • I am curios to, how the collaboration in such an ambitious open source project as Mono works.
  • What better way to really learn the fundamentals of WPF?
BTW: I just love one idea from the Silverlight team, which would also be great in Compact Framework: Pay for play: They build a small core, with everything unnecessary stripped out, and if you miss something, you should be able to add it, and pay the price. So you don't have to yell out: WHY DID THEY STRIPP THAT OUT!