-2

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!

FakeSaint
  • 492
  • 5
  • 8
  • Maybe this can help? https://stackoverflow.com/questions/559027/cannot-find-microsoft-visualstudio-texttemplating-assembly and this one seems relevant: https://stackoverflow.com/questions/42662011/msbuild-support-for-t4-templates-in-visual-studio-2017-rtm – Gonen I Oct 26 '18 at 20:07
  • Unfortunately they don't really address my question. I'm just trying to figure out why an assembly I have isn't listed anywhere in the microsoft documentation. I found the docs for Microsoft.VisualStudio.TextTemplating.14.0, but my assembly is v15. The entire TextTemplating Namespace is missing from the 2017 SDK docs – FakeSaint Oct 26 '18 at 20:17
  • Oh yes, now I see. Only available in the docs until 2015. They do however, mention it here: https://learn.microsoft.com/en-us/visualstudio/modeling/code-generation-in-a-build-process?view=vs-2017 – Gonen I Oct 26 '18 at 20:23
  • Thanks I appreciate it! Do you happen to know why its not in the docs? Perhaps its just an oversight on Microsoft's part. – FakeSaint Oct 26 '18 at 20:32

1 Answers1

-2

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.

Gonen I
  • 5,576
  • 1
  • 29
  • 60
  • 2
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/21248443) – EJoshuaS - Stand with Ukraine Oct 26 '18 at 21:57
  • Thanks Gonen I appreciate it.I'll accept this answer if no one else knows for sure – FakeSaint Oct 26 '18 at 23:11
  • @EJoshuaS The OP specifically asked for links to documentation. – Gonen I Oct 27 '18 at 10:50