“Best Practices” change from version 1.1 to 2.0 Beta 1 – level 200

For those of you who use FxCop, beware of version 2.0.  Actually, look forward to version 2.0 and jump for joy, but it would benefit you to learn about version 2.0 now so that you can prepare to move to the next version.  I’ve migrated some v1.1 code I wrote last year to v2.0 Beta 1.  I had run FxCop on my assembly last year, and I decided to follow all the Microsoft Recommended conventions.  That included NOT using the default overload of the .ToString() method.  Instead, I was supposed to use the overload that specifies an IFormatProvider, so for most of my code, I used ToString(CultureInfo.InvariantCulture), and now in VS 2005 Beta 1, I am getting warnings:

Warning 3  ‘System.Enum.ToString(System.IFormatProvider)’ is obsolete: ‘The provider argument is not used. Please use ToString().’ C:. . .Visual StudioProjects. . File.cs 617 64   

I thought it was a pain to specify CultureInfo.InvariantCulture for every call, but I went along with it.  I guess the MS people decided to agree with me.  🙂

I’m actually glad about this change.  Seems like most v2.0 changes are for the better. . . . but I still take issue with not having a concrete assembly in web site projects – we need a way to configure what the dynamically compiled assembly will be called.