Keep your lib folder up to date

February 9, 2009 on 10:22 pm | In NUnit, SVN, DotNet |

I’m keeping all the 3rd party assemblies that I use in my .NET projects in a separate library folder called lib. It is a part of my Subversion repository. In most of my project it is placed in linked repository (with svn:externals property). It lets my check out the whole project on any machine I like and it compiles right away.

But be aware! In such scenario (and, well… in any other scenario as well) you have to keep your lib up to date. Take a look at this nasty bug. I was using the NUnit version 2.4.6.0

Take a look at this test method:

[NUnit.Framework.Test]
public void Test()
{
    System.Text.ASCIIEncoding ASCIIEncoding = new System.Text.ASCIIEncoding();

    string str1 = “abc”;

    byte[] array = ASCIIEncoding.GetBytes(str1.ToCharArray());

    System.Array.Resize<byte>(ref array, 10);

    string str2 = ASCIIEncoding.GetString(array);

    NUnit.Framework.Assert.AreEqual(str1, str2);
}

What would you expect?

image

Fail! Isn’t it?

No! 1 passed, 0 failed, 0 skipped, took 0,54 seconds.

Even NUnit hast bugs to! I’ve updated to the newest version and it works as a charm! So keep you lib folder up to date!

No Comments yet »

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds. Valid XHTML and CSS. ^Top^