Visual studio (VS) 2022 then execute Text Template (*.tt) not need link assembly EnvDTE to have access to Visual Studio interop. In same time previous Visual studio 2019 and above need this assembly directive. It make use Text Templates more complicate in teams with different VS version and require have two version of each TT file depend on EnvDTE. To cross gap we make bridge provide custom directive command <#@ EnvDTEResolve Processor="EnvDteDirectiveProcessor" #> and 2 Visual studio extensions to make TT files executable for different VS vesrsion.
Usage:
- Replace
<#@ assembly name="EnvDTE" #>with<#@ EnvDTEResolve Processor="EnvDteDirectiveProcessor" #>in each *.tt or *.ttinclude file where need. - Install extension for VS 2017 – VS 2022 or VS 2022 depend on your installed version.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt for more information.
Project Link: https://github.com/your_username/repo_name