Search code examples
c#visual-studiot4envdtevisual-studio-sdk

Can't Find Namespace in VS 2017 SDK Docs?


I have the following in a T4 template, (Snippet is from an old tutorial):

<#@ import namespace = "Microsoft.VisualStudio.TextTemplating" #>
<#+
Engine _engine = new Engine();
#>

I can see that the Engine type is part of the Microsoft.VisualStudio.TextTemplating.15.0 Assembly. I'm using VS 2017. When I look through the API's for the Visual Studio 2017 I can't find the namespace...

I did find this: VS 2015 Documentation... Is the Doc for VS2017 not-up to date or am I using something I really shouldn't? Save me from my misery!


Solution

  • Here is a bit about Engine in the 2017 docs. Hope it helps. https://learn.microsoft.com/en-us/visualstudio/modeling/the-text-template-transformation-process?view=vs-2017

    And a more general one here: https://learn.microsoft.com/en-us/visualstudio/modeling/code-generation-and-t4-text-templates?view=vs-2017

    Microsoft did create a 2017 version for the page linking to the APIS https://learn.microsoft.com/en-us/visualstudio/modeling/api-reference-for-t4-text-templates?view=vs-2017 But when you click on one of the APIs they redirect to the 2015 version. Probably just an oversight.