Updates: Device Blogger and VSIP in VS 2005

Last weekend I started playing around with my “Device Blogger” project again – no I have not forgotten about it, just a little busy lately trying to get Beta 1 shipped. I also had a few problems with the project; there were a few bugs in the PD5 build of VS that was keeping me from testing out my project. I now have Beta 1 installed on my home computer, which has a fix for the bug, and I should be able to get something posted by this weekend.


I have also been spending a lot of time lately working on my IL Editor and Project samples for the next edition of our book. With the Beta 1 version of VS and the IAs from the VSIP SDK, I have now been able to convert my project package to C#. It has not gone as easily as converting the IL Editor to managed, but it has not been too painful. The first problem is the mass of code necessary to convert from C++ to C#. Project implementations are much larger than language services, so that means I need to convert more code. There are also some places where migrating C++ code to C# just does not work, an example of this is with VSITEMIDs. A VSITEMID is a token that you use to keep track of an item within a project. With C++ code, you allocate a data structure that holds information such as the path to the item, any children it may have, etc. When VS asks for the VSITEMID of that data structure, you cast the pointer into a VSITEMID (which is a typedef for a long) and pass that around. But with a language such as C#, you do not have the ability to cast a data structure into a VSITEMID. This was solved with a class that keeps track of a unique number that identifies the node. I am thinking of putting out a binary build of the project to let people play around with it and send feedback, weed out any bugs, etc. I will let you know once I get something stable enough to send out.

Comments (3)

  1. Thierry says:

    Hi Craig,

    We met last year, in March, at a VSIP dev camp in Redmond (I also ate the best chicken wings ever, there :). I am glad to see that more and more examples of C#-based VS extensions will see the light. I am looking forward to seeing your custom project package in action.

    We have done almost the same thing (a custom project package) but for VS2003. Everything is in managed code (except a small C++ wrapper to workaround an invalid cast that happens inside VS itself).

    We have also added a few more features compared to MyC, like folders or References. I don’t know how far you will go with your own project package but if you implement References – I will be very interested in knowing how you have actually done that.

    Personally, I have been working quite a long time trying to figure out how DLLs are propagated accross C# project output folders, without success. In fact, I still don’t know how that is supposed to work. I mean, what do we have to implement in order:

    1. find and copy the appropriate built items of a C# project that a custom project package is referencing (including the dependencies of this C# project). Do we have to scan the solution by ourselves???

    2. make sure that a C# project that references a custom project package copies everything properly in its output folder (the key output of the custom project package but also the dependencies, that’s to say the needed DLLs coming from the References of the customer project package).

    This is still mysterious to me though it looks like an important feature for people that want to create a custom project package for a custom language that targets .NET.

  2. Craig Skibo says:

    I am not sure where you ate your wings, but the best I have ever had was back in my home town: http://www.quakersteakandlube.com.

    As for output groups, dependencies, etc. that is what I am trying to get working right now myself. I got a project to project reference to show up properly in the references for a C# project, but I have not tried it yet to make sure it works. I still do not have output groups working correctly for setup projects. I am trying to track this down and get it working, so as soon as I get it fixed I will make a post.

Skip to main content