VSTO & .NET & Excel

February 17, 2007

The Orca Tool – A MSI Creator and Package Viewer

Filed under: .NET & Excel, VSTO & Excel — Dennis M Wallentin @ 4:39 pm

Microsoft’s SDKs (Software Development Kits) are shipped with many tools that target various areas. These tools bring additional value to the developers. Many of these tools are unfortunately not known by developers and it’s more of coincidences that we discover them via forums and blogposts.

I recently spent time to investigate how we can identify the ComponentIDs for prerequisites like the PIAs and VSTO runtime for Excel 2007 VSTO’s solutions.

The reason for it is that Microsoft has not yet updated their article “Deploying Visual Studio 2005 Tools for Office Solutions Using Windows Installer: Walkthroughs (Part 2 of 2)” for Office 2007.

I finally managed to locate the tool Orca, which is defined as:
“… is a database table editor for creating and editing Windows Installer packages and merge modules. The tool provides a graphical interface for validation, highlighting the particular entries where validation errors or warnings occur – Source.”

It’s part of the Windows SDK Components for Windows Installer Developers but since this SDK is rather large to download and install You can download only the Orca Tool from here.

Just to make sure that I was on the right track I viewed the Office 2003 PIA’s MSI file,  the VSTO’s MSI file and compared the ComponentIDs with the ones in Microsoft’s article. The output was the following:

compid.png

The above confirmed that the Orca tool views the correct ComponentIDs in the prerequisites’s MSI files.

In order to retrieve the ComponentID for Excel 2007 PIA I did the following:

  1. Downloaded Office 2007 redistributable PIA.
  2. Extracted the MSI file (and also the other files part of the exe file) with Winzip.
  3. Opened the MSI file in Orca.
  4. Located the Component Table “Component” and the entry “Global_Pia_Excel”.
  5. And finally I got hold on the wanted value:
    {1ABEAF09-435F-47D6-9FEB-0AD05D4EF3EA}.

The mentioned VSTO ComponentID in the above table is also valid for the latest version included in the VSTO 2005 SE runtime.

Equipped with the Orca Tool we can create correct launch conditions and get a better understanding about how MSI files are created and maintained.

In my next coming blogpost I will continue the series for Creating and Deploying VSTO COM Add-ins.

Update:
The following blogpost gives access to the latest available version of Orca – UACL Compliant
You can also read Microsoft’s knowledge base : How to use the Orca database editor to edit Windows Installer files.

Kind regards,
Dennis

February 10, 2007

Books on VSTO

Filed under: VSTO Books — Dennis M Wallentin @ 3:24 pm

The present VSTO books 

I thought that we this week would take a break from the (“never ending”) VSTO case and instead review a list of available books on VSTO. If I had missed any book on the subject please let me know about it.

VSTO itself can be viewed as a wide and technical complex area. Not only because it target nearly all the softwares in the Office suite but it also target the server side Office solutions. Since it operates on the .NET platform we have the whole .NET environment to consider and we should not forget the deployment aspect of VSTO.

As we already know, the Office suite is also a huge area to cover. So when putting VSTO together with the Office suite (that is 2003 and 2007) we realize that it’s at the same time both a complex and huge area to cover.

Looking on the targeting groups of developers it exist two major groups that per se are interested in the field of VSTO and Office:

  • Office developers who need to know more about using .NET & VSTO together with their developing platform(s) like Excel or/and Word or/and Outlook.
    This group of developers knows well the software’s object models in the Office suite but usually very little when it comes to .NET platform in general and VSTO in particular.
  • Corporate developers who need to know more about using the tools included in the Office suite together with .NET & VSTO.
    This group of developers know well .NET platform and do understand the basic underlying technical premises for VSTO. But at the same time they lack knowledge about the software’s objectmodels in the Office suite and also how to fully leverage the Office suite’s components.

The above summarize “what” and “who” when it comes to the framework for reviewing the available VSTO books.

People who know me also know that I prefer books that cover small and specific areas.

Title: Microsoft .NET Development for Microsoft Office
Author: Andrew Whitechapel (Microsoft Corp)
Publishing year: 2005

This book has a strong focus on COM Add-ins and VSTO. It provides deep technical information and it does assume that the readers knows .NET and are experienced programmers. VSTO is covered in three chapters and it gives an excellent description of VSTO’s load sequence. It uses C# examples for Excel and Word but does not explicit trying to cover the object models. Deployment is discussed but not in detailed.

The present edition of the book is targeting Visual Studio.NET 2003 and version 97 to 2003 of the Office suite.

In view of “what” and also “who” the book does not really fit in in the above general classification scheme.

If You, like me, is interesting in “plumbing” and to get a deeper understanding of the technical framework then this book is highly recommended. I like the strong focus and also the technical level. If You’re interested then it should be possible to buy an used copy of it.

I hope that Andrew Whitechapel will find the time to update the book so it cover VSTO 2005, VSTO 2005 SE (or even better version 3.0!) and also Office 2007. 

Title: Professional Excel Development
Authors: Stephen Bullen, Rob Bovey and John Green
Publishing year: 2005

I have previously made a review of it which is available at VBAExpress but not explicit about the VSTO chapter.

The VSTO chapter is very good and it explicit targeting the Excel developers. It discusses managed workbooks and managed COM add-ins which also include the shortcoming with version 1.0 of VSTO.

The book is per se not about VSTO and therefore VSTO is only covered in one chapter. On the other hand this is the best available introduction to managed workbooks.

Title: Visual Studio Tools for Office (Using Visual Basic 2005 with Excel, Word, Outlook, and InfoPath)
Authors: Eric Carter and Eric Lippert (Microsoft)
Publishing year: 2006

This book explicit target corporate developers and it’s also trying to cover all the mentioned programs named in the title. The outcome of it is rather good but it does not offer any possibilities to dig deeper into the central subjects.

The book gives a good introduction to security (one chapter) and deployment (one chapter) but does not explicit discuss any troubleshooting. It also discusses managed COM Add-ins but only in terms of Outlook add-ins as the VSTO 2005 SE was not available when the book was written. The Server side of VSTO is also introduced in one chapter. For obvious reason the book does not cover Office 2007.

If we have basic knowledge of .NET platform and also have basic knowledge of all the softwares in the Office suite then this book is of high interest.

In my opinion this is the best VSTO book available although it does not gives an introduction to .NET platform and more or less only discuss event programming.

Title: Professional VSTO 2005
Author: Alvin Bruney (MVP ASP.NET)
Publishing year: 2006

In general this book gives hands on examples for working with VSTO and with Excel, Word and Outlook. Most examples are targeting Excel and it offer both VB.NET and C# code for all the examples. This is only the second book which discuss the shortcoming of VSTO compared with VBA. 

I find it extremely remarkable that a VSTO book can both avoid discussing security and also deployment in more detail. I also find the coding technique to be of low standard.

All in all, don’t buy this book.

Title: VSTO for Mere Mortals
Authors: Mathleen McGrath and Paul Stubbs (Microsoft Corp)
Publishing year: 2007

This book explicit targets the group of Office developers and the softwares Excel, Word and Outlook. It gives a light weighted introduction to the .NET platform and it also gives a light weighted introduction to VSTO. All the examples are light weighted and it appears that it there exist no issues at all. The discussions about security and deployment are also light weighted and apparently there exist no problems in these two fields. The discussion about the server side of VSTO is also light weighted.

The book is the latest available and was written during the time when VSTO 2005 SE was shipped and also when Office 2007 was shipped. I expected that the book would give us more about managed COM Add-ins and about VSTO & Office 2007 but unfortunately not. Instead we are offered a light weighted chapter about Office 2007.

If You want a well written light weighted book about VSTO and find review questions that end each chapter to be of high interest then this book is for You.

I find it disappointing that the two authors, who claim to have been real world VBA developers before they joined Microsoft, present and discuss VSTO in terms of what it can do instead of how to apply it in real world developing.

Final words

From a strictly professional point of view I really like VSTO. The more I work with VSTO the more I also realize its great potential. However, we still face big issues when it comes to the areas of security and deployment. It also needs some additional versions before its bullet proof and fully developed, i e ready for real world developing.

The books on VSTO are mainly written by co-workers at Microsoft and I have the impression that the books, in the first place, are used as marketing channels for VSTO.

If Microsoft wants the Office developers to port themselves to VSTO then it’s a must that all books written by Microsoft explicit help the Office developers in terms of real world developing.

In general I find the ” VSTO and Office” approach to be too wide as it don’t provide the readers with a depth and with a focus on specific issues for the individual softwares, i e troubleshootings.  

I hope that the well known book authors of Excel, Word and Outlook will include chapters about VSTO with real world aspects in their upcoming books. In that way VSTO will get a better platform to be reviewed from and the book buyers can get knowledge and solutions to add to their development knowledge toolbox.Kind regards,
Dennis

Create a free website or blog at WordPress.com.