Welcome Guest! To enable all features please Login or Register.



#1 Posted : Friday, August 30, 2013 4:29:01 PM(UTC)
Rank: Newbie

Groups: Member
Joined: 8/29/2013(UTC)
Posts: 2
United Kingdom
Location: uk


I'm having problems getting the Visual Studio Code Model walker example to work.

I found this article: http://t4-editor.tangibl...el-with-t4-template.html

which is perfect for what I need, but I'm struggling to get it running.

I downloaded version 2.2.1, installed to VS 2012 (update 3), opened the Template Gallery, added "Walking the Visual Studio Code Model" to the solution (I checked the 'All Files' checkbox). However when I save the 'WalkCodeModel.tt' file I get an error:

Error 5 Compiling transformation: 'Microsoft.VisualStudio.TextTemplatingC1EC01BB6897AE1C2E345646AEEEA0E76499EC4B4E3A465517D2F04EE76CB652F5DEC76A1169AD4A670DEF3F7F06C369C76031E5AD8E56A311E39F1346DA8778.GeneratedTextTransformation.AutomationHelper' does not contain a definition for 'GetAllCodeElementsOfType' and no extension method 'GetAllCodeElementsOfType' accepting a first argument of type 'Microsoft.VisualStudio.TextTemplatingC1EC01BB6897AE1C2E345646AEEEA0E76499EC4B4E3A465517D2F04EE76CB652F5DEC76A1169AD4A670DEF3F7F06C369C76031E5AD8E56A311E39F1346DA8778.GeneratedTextTransformation.AutomationHelper' could be found (are you missing a using directive or an assembly reference?)

What do I do?? I would have expected all the necessary references to be setup as the template came straight from the gallery.


#2 Posted : Friday, August 30, 2013 8:32:12 PM(UTC)
Rank: Newbie

Groups: Member
Joined: 8/30/2013(UTC)
Posts: 1
United States
Location: Cleveland

I too am finding this same issue. Is it a problem with the latest version of 2013?

tangible | Nico
#3 Posted : Monday, September 2, 2013 10:39:58 AM(UTC)
tangible | Nico
Rank: Administration

Groups: Administration
Joined: 10/8/2012(UTC)
Posts: 29
Location: Stuttgart

Was thanked: 1 time(s) in 1 post(s)
Hey folks,

thank you for reporting this error here. The compilation error results from a refactoring in the Visual Studio Automation Helper. All methods regarding the code model have been moved into the VisualStudioHelper.CodeModel object but the "Walking the code model" example had not been updated yet. Please accept our apologies for this inconvenience.

The template has been updated now, so you might want to update your local copy. Otherwise please apply the following change to the "WalkCodeModel.tt" at line 29 and add the "CodeModel" Property in the foreach-loop:

foreach(EnvDTE.CodeNamespace codeNs in VisualStudioHelper.CodeModel.GetAllCodeElementsOfType(project.CodeModel.CodeElements, EnvDTE.vsCMElement.vsCMElementNamespace, true))


Edited by user Monday, September 2, 2013 10:40:40 AM(UTC)  | Reason: Not specified

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF | YAF © 2003-2022, Yet Another Forum.NET
This page was generated in 0.138 seconds.

Authorization on the site

For an authorized user opens up new possibilities