A friend of me had a little rant while developing an Angular app on a .NET Core backend. Whenever you had to run the npm run E2E command or any other npm or ng command, you had to right click on the folder node in solution explorer, open with file explorere, open cmd and maybe navigate to the right directory (cd ..).
This made me think of another fun little project to work on. Figuring out a way to open the terminal directly in the directory you want, straight from Visual Studio’s solution explorer. Just right click a folder, click ‘Open Terminal’ and there it is.
This is not so hard to do actually. It ensures your transformations are executed when you build your solution, when in some cases you did not click ‘Build > Transform all T4 Templates’ when changes are made to your .tt files.
If one of your projects uses T4 to generate code, and you want it to execute at build time, consider the next steps:
Unload your project
Righ-click on the project in your solution explorer and click ‘unload’.
Open the .csproj of your project
Right-click again and select ‘edit projectname.csproj’
Edit the .csproj file
Add following PropertyGroup at the beginning of your csproj file (for VS2017):