Keep your lib folder up to date

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
Take a look at this test method:

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?
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!

Leave a Reply

Your email address will not be published. Required fields are marked *