0

I tried to transform T4 template. but its get "ErrorGeneratingOutput".

I have created custom host for T4 template transform based on below mention Microsoft document link.

https://github.com/MicrosoftDocs/visualstudio-docs/blob/master/docs/modeling/walkthrough-creating-a-custom-text-template-host.md

I have get below error in host error list. Error : There was a problem getting an AppDomain to run the transformation from the host. The process cannot continue.

Same method I used in console application its working fine. But when use above code/method in Visual Studio extension project its get error.

Note:Issue occurred Visual Studio 2015, 2017

I have searched more link there is no solution. So, please update idea to resolve above reported issue.

Dheepa
  • 1
  • 2
  • Did you try to run Visual studio as as admin? – Risto M Apr 04 '19 at 07:02
  • Hi Dheepa, have you mentioned the warning of the document like this: [!WARNING] If you are writing a Visual Studio extension or package, consider using the text templating service instead of creating your own host. For more information, see [Invoking Text Transformation in a VS Extension](https://github.com/MicrosoftDocs/visualstudio-docs/blob/master/docs/modeling/invoking-text-transformation-in-a-vs-extension.md). – LoLance Apr 05 '19 at 08:40

1 Answers1

0

Please check the warning of the document like below:

[!WARNING] If you are writing a Visual Studio extension or package, consider using the text templating service instead of creating your own host. For more information, see Invoking Text Transformation in a VS Extension.

It seems you use the own host, which is not recommended by the author. Please check the document for text templating service to check if helps.

LoLance
  • 25,666
  • 1
  • 39
  • 73