0

I need to use TextTransform and I have currently this pre-build Event, which it's working:

"%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\TextTransform.exe" -a !!BuildConfiguration!$(Configuration) "$(ProjectDir)Properties\AssemblyInfo.tt"

But I wanted to replace the \2019\Enterprise\ with variables according to the user version/edition, tried to google and search here but didn't found anything.

Thiago Loureiro
  • 1,041
  • 13
  • 24

1 Answers1

1

Found a solution, in this link have some really useful varaibles:

Link to all Visual Studio $ variables

Then I'm using:

MSBuildStartupDirectory Which is:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE 

Result:

"$(MSBuildStartupDirectory)\TextTransform.exe" -a !!BuildConfiguration!$(Configuration) "$(ProjectDir)Properties\AssemblyInfo.tt"
Thiago Loureiro
  • 1,041
  • 13
  • 24