2

if not exist %UserProfile%\Documents\"Visual Studio 2015"\Templates\ItemTemplates\Regra.zip (
    xcopy %cd:bin\Debug=Artefatos\Regra.zip% %UserProfile%\Documents\"Visual Studio 2015"\Templates\ItemTemplates\
)

The code above is a command line which is executed when build a project. It installs a template I've made for Visual Studio C# and it only installs if not installed yet. This code is working perfectly, but it don't update the template, it means if I make any change on the template it will continue installing only for who have not installed yet. I've tried do it checking the file hash, but unsuccessfully. Could someone help me with this question?

RLT
  • 31
  • 5
  • 2
    why not always copy? copying is cheap – pm100 Nov 10 '17 at 17:08
  • 1
    Visual Studio only install when open, it means I need to restart to really install, the command just copy to the folder where VS looks. I can't always copy because I build the project all the time, for each test I need to do I need to build, sometimes more than 1 time in 1 minute, I really can't always copy the file. – RLT Nov 10 '17 at 17:19

0 Answers0