Monday, January 12, 2009

In an earlier post we mentioned that it is relatively easy to get the current Blueprints bits running on the Visual Studio 2010 CTP by modifying the .MSI in Orcas. At that time we forgot to mention that we need a few extra steps to really get things going with Blueprints in Visual Studio 2010.

When trying to build a Blueprint solution in Visual Studio 2010 we will notice the following error in the error window.

Error

As we can see, the build task ‘BASM’ is failing to retrieve the correct path. This task is implemented in the ‘Microsoft.SoftwareFactories.Blueprints.Builds.Tasks.dll’ that can be found in ‘..\Program Files\MSBuild\Microsoft\Blueprints\2.0’. It turns out that the execute method of this tasks looks for a (hardcoded) ‘String Value’ called ‘Blueprints’ under the ‘HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\MSBuild\SafeImports’ tree. Because we replaced all ‘9.0’ in ‘10.0’ in the Blueprints .MSI to get it to install on Visual Studio 2010 this value doesn’t exist under ‘9.0’ anymore (but does under ‘10.0’).

To fix this we can either make sure to skip this particular replacement when modifying the .MSI in Orcas or manually add the Blueprints ‘String Value’ under the ‘HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\MSBuild\SafeImports’ and give it the value ‘C:\Program Files\MSBuild\Microsoft\Blueprints\2.0\Microsoft.SoftwareFactories.Blueprints.targets’.

Another issue occurs when debugging our Blueprint in Visual Studio 2010. Currently, there is no property page implemented for the Blueprint project type (.bpproj) and therefore starting up Visual Studio 2008 is hardcoded in the Blueprints core. To get around this we can add an empty C# ‘Class Library’ project to our solution, set this project as the ‘StartUp’ project and make this project startup Visual Studio 2010 (property page) when debugging. Although this solution does work it makes the Visual Studio instances in my Virtual PC image VERY slow (don’t know why). Another option, that does work for me, is to leave the Blueprint project as the ‘StartUp’ project, let it start up a Visual Studio 2008 instance, (and simple ignore it) manually start another Visual Studio 2010 instance and attach this instance to the debugging process of the Visual Studio instance we started the debug session in.

Now everything is in place to *really* start developing Blueprints for Visual Studio 2010 CTP!

Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):