Goodbye DNJ

Well,after 3 years here its time to say goodbye to DNJ. Im moving to Wordpress and the new link is http://santoshbenjamin.wordpress.com I've had some great conversations here but im getting rather tied down by the poor editing facilities etc as i've said on many an occasion. I've also decided that its time for a change to befit my new status in life as i have explained on the wordpress site. Anyway, im leaving the posts here as an archive (and also because i cant find any tools to move the content across. if you do know of any, do let me know). I will be visiting the aggregate site cos theres still some great content here. Hope to see some of you at my wordpress site. cheers, benjy
with 0 Comments

The Case of the Missing Template Cache

Just a quick note on add-ins and the VS2005 Project Templates Cache. I have a collection of custom solution templates which i have quite happily been using both directly in Visual Studio as well as through add-ins (programmatically accessing the location of the cached template on disk). One thing i just ran into was the issue that when i installed GAT and GAX (Feb 07 CTP), the entire cache disappeared. (it could also have something to do with installing Resharper 3.0 - but i doubt it cos i have come across a couple of posts where people have had all the standard and custom templates disappear after installing the WinFX extensions -at least mine didnt disappear - they just couldnt be accessed programmatically).

Anyway, i tried reinstalling them using the devenv /installvstemplates command but that didnt work either. Those of you who have created add-ins would recall that the cache is in the Environment.SpecialFolders.ApplicationData folder and the installvstemplates command usually rebuilds that folder. When i ran the add-in VS just complained helpfully that "the index did not fall within the range" :-).

It appears that the solution/workaround to this issue is to do the installvstemplates as above, then open VS and add a new project/solution making use of your custom template (but dont do this via the add-in - just use the regular menu options of the IDE). This seems to kick-start VS into life and the ProjectTemplatesCache folder gets rebuilt nicely and the add-in should start to work.

I have no idea why this happened, but if you get stuck with this issue, hopefully the steps above will help you.
with 0 Comments

Backdoors,Hacks and the TD.NET saga

So by now most people would have heard about the ruckus that's going on in the blogosphere regarding Microsoft and Jamie Cansdale's TestDriven.NET tool. In case you haven't heard, the issue, as I read it, is that Jamie found a way to make the TD.NET add-in run inside VS Express and Microsoft sent him a formal letter asking him to stop making this available. The issue Microsoft has is not with TD.NET as an add-in or whether its a free or commercial tool but the fact that it is being used with Express and that's something they don't want to encourage and have said that extensibility is disabled by default in Express.

Predictably, this issue raised a lot of hackles in the community and many people took this as an opportunity to aim more broadsides at Microsoft. There were some good points in some blogs (check out one here and look for some of the posts and comments on Oren Eini's blog here and also Dan Fernandez's blog -one of the posts being this and Jamie himself lists the communications here) but amongst those pearls I was disappointed (but not surprised) to find just loads of vitriol. Some people see it as a hack and some as a legitimate back-door and some say that if there is an API on the machine, they are going to use it and MS cannot stop them. (By that logic, you could be releasing any additions to windows that were unsupported just because the system DLLs are on c:\ drive, and expect MS to sit back and smile indulgently)

Now let me state first of all that I really appreciate Jamie's add-in. I cut my teeth on unit testing and TDD with that tool (nowadays i use JetBrains UnitRun), and it was very useful indeed. I can see how using this in express will open up the world of TDD to hobbyist developers and others who don't use the higher end editions, and this can only be good for the programming community in general. However, i can also see Microsoft's points. I have written a couple of small add-ins for my team and find VS Extensibility quite easy and the possibilities are almost limitless. If MS were to allow Jamie's tool, lots of other tool developers will jump on the bandwagon and write add-ins for Express and pretty soon it will become a little Eclipse-like ecosystem on its own. If that happens, where will that leave VS Standard and higher end editions?  (Yes, there is an argument for supporting unit testing in express and exposing newbie's and non-pro dev's to good programming practices, but how do you draw the line?)

This is just plain business considerations folks. Microsoft is not running a charity. Sure, there are good groups in MS like PAG who want to make things easier for architects and developers and are producing a ton of free stuff that helps us get better at what we do (yeah, so some people don't like the patterns and the wizards, but there's a rather large part of the .net world that does), but MS is first and foremost a business and profit is primary and there's nothing wrong with that. How will they sell Visual Studio commercial editions if Express could be used to do everything that, say, Team System does? Of course, not all third party add-ins are going to be free and ISV's are bound to continue the tradition of having some free editions and some paid for 'rich functionality' editions, but there are some top notch developers in the open source community who could whistle up some free add-ins that trump the commercial ones. So where will that leave MS? What about all the hard work the IDE team is putting into Orcas and Rosario and whatever comes after? Does it have to be free? (Okay, so I benefit from a corporate MSDN subscription and should i ever have to pay for the tool myself then shelling out for VS,especially some features of VSTS,  would burn a rather large hole in my pocket, but that's another story).

Express is Microsoft's entry point into the non-pro developer world. They could have engineered a completely new locked down product where there were no DLLs in the GAC or anything for people to tap into, but perhaps that would have cost more than just stripping out some functionality and making a "lite" edition like Express is. As someone pointed out (cant remember where), this could well result in MS pulling the express line completely and that wouldn't be good at all.

Anyway, that's my two cents worth (and no, I'm not getting paid to write this !!). In summary I'd say to these parties , "Jamie, well done with TD.NET and well done on getting a huge groundswell of support especially from some of the more articulate developers around", "Microsoft, there are folks who understand your position, but it could be made a bit more clear without bringing in lawyers against well meaning developers" and to the general community "Folks, there's always a wide audience for well written comments no matter whose side they are on. Make a clear stand and stop the sniping and broadsides just because MS is a huge,obvious target.".

Ciao!!

 

with 0 Comments

VS Team Architect - Class Libraries on the AD at last

I guess no one can ever say that the VS dev team isnt responsive.. after all the posts in various forums about the lack of support for class libraries on the AD surface, this has now been made available. Unfortunately its only available on Orcas Beta 1 (as a Power Toy) . Check out the post and screenshot at : http://blogs.msdn.com/vsarch/.  Apparently Orcas has some underlying infrastructure that allows it to support such out of band developments so this wont work on VS2005 which is a pity, but if we have waited so long, its only another few months to wait for the final orcas release with all these goodies.

Another really good thing is that Steve Cook and Gareth Jones et al have published a new book on Domain Specific Development with VS. It should be available now on Amazon (the link is too long to paste here- check it out).
with 0 Comments

Biztalk Solution Templates-2 : ApplySettings AddIn

In my previous post i had outlined my first attempt at creating solution templates using the Visual Studio vstemplates technique. I have now gone one step further and built an add-in that allows the user to apply solution wide settings to all the projects. The settings that can be specified are as follows

  • RootNamespace : Namespace prefix upto and not including the solution. This usually follows the format Company.Product. ProductGroup. (e.g) Microsoft.IntegrationPlatform.Services.
  • Solution Name: Taken from the active solution, but can be changed to anything needed - for example CustomerService. The reason this is provided is because some teams like to keep the entire namespace in the solution name but while generating assemblies, the prefixes could be superfluous
  • SolutionNamespace: Namespace comprising the rootnamespace and the solution. (e.g) Microsoft.IntegrationPlatform.Services.CustomerService where CustomerService is the functionality provided by the components of the solution.
  • Application Name: This is the Biztalk application name to be applied to the biztalk projects. Sometimes this is the same as the solution name but need not necessarily be so.
  • Key File: This allows the user to select an existing key file or to create a key file and have it applied to all the projects including the non biztalk projects (which is needed to allow them to be GACed). 

Acknowledgements
The strong naming functionality is borrowed from the work done by Jon Flanders and Carlos Medina . In Jons tool you can generate and apply a strong name to a biztalk project on the fly and with Carlos' enhancements,you can generate and apply the strong name to all projects, or if you already have a strong named project you can copy those settings across to other projects. You can also apply the ApplicationName to the active configuration.

In this tool, the extra functionality is that you can
(1) apply the application Name to ALL configurations - deployment/development/debug/release etc (i usually add in the debug and release configurations to my biztalk projects to make it easy for my automa