Rajesh kumar’s Blog

If you have knowledge, let others light their candles at it.

Archive for August, 2009

Remove unused namespaces from Visual Studio

Posted by Rajesh Kumar on August 12, 2009

When we add any new class file, Visual Studio 2008 by default adds few namespaces depending on the project type. But, in real time – we will not be using one or all of the namespaces.

At the same time, most of us know only few namespace of the objects that we are going to use. So, it is a bit difficult to identify and remove the namespace. So, how can we make the code clean?

Fortunately, Visual Studio allows to Sort, Remove and Remove & Sort unused namespaces. The following pictures shows you how the class file looks like before and after removing the unused namespaces:

Default Class Structure

Default Class StructureContext menu in Visual Studio

 

Context menu in Visual Studio

Context menu in Visual Studio

Class structure after Removing and Sorting unused namespaces

Class structure after Removing and Sorting unused namespaces

This is a very cool and useful feature 🙂

Advertisements

Posted in .Net, Visual Studio | 2 Comments »

Single Sign On – Test Sites added

Posted by Rajesh Kumar on August 10, 2009

To make the development and testing easy, I added 3 web sites to the SingleSingleOnResearch as given below:

1) SingleSignOn.Administration (this site is going to have all administrative interfaces in the future)

2) FirstWebSite and

3) SecondWebSite

All the above 3 sites will have the Login page and then allows you to browse to rest of the two sites without re-login. So, please try and let me know your comments and suggestions.

Source Code at: http://sso.codeplex.com

Posted in Single Sign On, WCF | Leave a Comment »