CleanUp mess up with Using with #if #endif

Hi,

We use very often the CleanUp function but we have more and more classes
with #if statement to support both Silverlight and WPF code in same time.
CleanUp don't work properly in this case and we have to change back all
using statements between #if and #endif.
I created a custom CleanUp in which I checked all the options to organize
and reorder the using statements.

ex:
before:
#region Includes
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows;
using System.Windows.Markup;
#if SILVERLIGHT
using TwitterLib.EventsSOAP;
using User=TwitterServiceProxy.User;
using TwitterLib;
#else
using User=GenericLib.User;
using System.Xml;
using System.IO;
#endif
#endregion


after:

#region

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.IO;
using System.Windows;
using System.Windows.Markup;
using System.Xml;
using GenericLib;
#if SILVERLIGHT
using TwitterLib.EventsSOAP;
using User=TwitterServiceProxy.User;
using TwitterLib;
#else

#endif

At this stage, it doesn't compile anymore ... and we have to fix
everything...

Hope you can fix it very soon.

Thanks
-vince

http://www.sobees.com


Please sign in to leave a comment.