Thursday, January 28, 2010

Fix "The project type not supported by this installation" blah blah blah after resetsettings command

Is your visual studio settings are messed up? You can reset your visual studio settings by starting it from visual studio command prompt:

devenv.exe /resetsettings

But often, WCF related stuff doesn't work after above command. When you open the WCF porject in your Visual Studio, you may get this error:
"The project type not supported by this installation" blah blah blah..

If you are the one who has done so, close the Visual Studio and run this command from visual studio command prompt:

devenv /ResetSkipPkgs

It should reset (i.e. remove in our case) the checks that should be skiped in order to open newer WCF project into your relatively older visual studio.

Thursday, January 21, 2010

.NET Namespace Naming Convention with Team Name in it

I hated naming conventions from collage time and nothing is much different today. Saying that, I also must accept that I secretly liked Microsoft's guidelines about naming conventions as it gives more freedom and meaningful restrictions than others (specially Sun Java). Let's leave other naming conventions and concentrate on namespace's maming convention of your assembly and classes.

Why namespace naming is important?
A namespace gives first hand impression on what the class and its method must be doing. With that, a class should get a unique identification based on its namespace. Carelessly crafted names are misleading advertisement which repulses intended audience or create confusion.

How Microsoft Tells us to name a namespace?
is what Namespace Naming Guidelines tells. Example being Microsoft.Build.Tasks

Is it long enough?
Organizations, with help of smart programmers, are now taking little more effort to refactor the code to extract common code which can be reused across teams. It is not impossible (infact it's more frequent) to have multiple implementation approach of a 'similar' feature by different team. For example team 'TreamA' and 'TeamB' in organization 'MyOrg' might have taken differnt approach to develop a media content viewer optimized for their own scenarios. If the organization want to share these media viewers across many teams to use, 'unique identification' functionality of namespace stands violated as media viewer class from both the team will look like,
This would not have occured if the namespace of viewers were named "MyOrg.Media.TreamA.Viewer" and "MyOrg.Media.TreamB.Viewer" beforehand.

I believe we should giving implementing team name in name as ending part of namespace. So my format would be