in

Platinum Bay

Peace, Love and Visual Studio Team System

.NETicated

VsTemplatePaths Part Deux

I recently attended a SharePoint developer training class led by Todd Bleeker, SharePoint MVP.  Todd is a great instructor, and one of his comments during the week seemed to ring true for anyone with experience with SharePoint.  He related SharePoint development to playing Pac-Man.  You eat a dot (develop a little bit), then go test, and repeat this process over and over and over again.  He attributed this in part to a lack of documentation regarding SharePoint extensibility.

I would say that this applies as well to Visual Studio extensibility.  The documentation is lacking at best, and I've spent a lot of time in Google and Reflector recently trying to put the pieces together.  And I've eaten another dot.

The answer to my VsTemplatePaths problem was painfully easy, yet just plain painful to find.  The answer came when I ended up diffing my project with an earlier project that used the Visual Studio Integration Package.  I was missing the following nodes in my project file:

    <TargetRegistryRoot>Software\Microsoft\VisualStudio\8.0Exp</TargetRegistryRoot>
    <VsTemplateLanguage>CSharp</VsTemplateLanguage>

Yup, that was the whole problem, and now my project correctly builds.  An astute reader validated my answer as well, thanks Alex!  He also mentioned that the deployment path gets built from the two variables above.  Diving into Microsoft.VsSDK.Build.Tasks.dll in Reflector, specifically the Execute method in the VsTemplatePaths class, that is in in fact correct.  This results in:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0Exp\VSTemplate\Project\UserFolder

    Path.Combine("C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ProjectTemplatesExp", "CSharp);

 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0Exp\VSTemplate\Item\UserFolder

    Path.Combine("C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ItemTemplatesExp", "CSharp");


Published Aug 29 2007, 10:07 AM by Steve
Filed under:

Comments

No Comments

Leave a Comment

(required )  
(optional )
(required )  
Add

About Steve

Steve Andrews has been working as a developer for more than 8 years. During this time, he has designed and developed applications in such widely varying areas as trust accounting, medical information management, supply chain management, and retail systems. He has firsthand developer experience with a variety of languages, including Java, VB, and .NET. Most recently, he has been immersed in SharePoint. He is currently employed at RDA Corporation in Philadelphia, PA, as a Software Engineer and a team member in the Architectural Guidance evangelism team. Steve is also an MTCS (x2), ICSOO, and .NET fanatic.
Powered by Community Server (Commercial Edition), by Telligent Systems
© Platinum Bay | Some Rights Reserved Creative Commons License

Disclaimer: The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or annonymous comments) - so keep it polite, please.