c# - The same build event on different version Visual Studio -
i checked out project tfs, created colleague on visual studio 2013. project have build event event in calling .exe path "c:\program files (x86)\microsoft visual studio 14.0\common7\ide"
however, working @ visual studio 2017 (not install visual studio 2013), path of .exe has changed other path. need change path in build command line. when submit code tfs, code not used others in visual studi 2013.
so question how can use same build event on different version visual studio? in advance.
the same build event on different version visual studio
if understand correct, not want switch , forth path of called .exe when use build event on different versions of vs. right?
just hans said, can not use same build event on different version visual studio, provide workaround, can check if want:
you can use the property of "visualstudioversion" in build event choose different path of .exe. in visual studio 2013, value of visualstudioversion 12.0. in visual studio 2017, the value 15.0. detail build event should below:
if "$(visualstudioversion)" == "12.0" (cell yourexepath="thepathofexeinvs2013\your.exe") if "$(visualstudioversion)" == "15.0" (cell yourexepath="thepathofexeinvs2017\your.exe") since not give detailed path of exe, created test sample below script:
if "$(visualstudioversion)" == "12.0" (echo "this command line come vs 2013!") if "$(visualstudioversion)" == "15.0" (echo "this command line come vs 2017!") it works fine in visual studio 2017 , 2013:


Comments
Post a Comment