1

Hello I developed some plugin for Revit, and after build copy required files in some directory via post-build event. It works for some years but today it has some strange behaviour. I use such a script

      IF NOT "$(ConfigurationName)" == "DEV" (      
  MD "$(AppData)/Autodesk/ApplicationPlugins/$(ProjectName).bundle/Contents/$(ProjectName)/Resources/Images"
  copy /Y "$(ProjectDir)PackageContents.xml" "$(AppData)/Autodesk/ApplicationPlugins/$(ProjectName).bundle"
  copy /Y "$(ProjectDir)*.addin" "$(AppData)/Autodesk/ApplicationPlugins/$(ProjectName).bundle/Contents"
  xcopy /Y /E /R "$(ProjectDir)Resources/Images/*.png" "$(AppData)/Autodesk/ApplicationPlugins/$(ProjectName).bundle/Contents/$(ProjectName)/Resources/Images"  

  )

But instead, image files I have this inside Image folder File-Explorer Screenshot

Also, dlls file not copied. I create a new solution, and it has some behaviour again.

If you have any idea please help me.

crank
  • 45
  • 5
  • 1
    I suggest to go to the Tools->Options menu, choose Project&Solutions->Build&Run and then switch to the max verbosity level the MS-Build output. This should give you some insight to the command executed in the post-build event in case of errors. Be prepared to read a lot of stuff in the output window – Steve Aug 19 '20 at 08:57
  • Thank you, i hope it's help me figur out with this! – Кирилл Киселев Aug 19 '20 at 09:19

1 Answers1

-1

A change post script, and now it work, but i don't know why previos have such behaviour

  IF NOT "$(ConfigurationName)" == "DEV" (
  MD "$(AppData)/Autodesk/ApplicationPlugins/$(ProjectName).bundle/Contents/$(ProjectName)"
  MD "$(AppData)/Autodesk/ApplicationPlugins/$(ProjectName).bundle/Contents/$(ProjectName)/Resources/Images"
  
  copy /Y "$(ProjectDir)/PackageContents.xml" "$(AppData)/Autodesk/ApplicationPlugins/$(ProjectName).bundle"
  copy /Y "$(ProjectDir)*.addin" "$(AppData)/Autodesk/ApplicationPlugins/$(ProjectName).bundle/Contents"

  xcopy /Y /E /R "$(ProjectDir)bin/$(Configuration)" "$(AppData)/Autodesk/ApplicationPlugins/$(ProjectName).bundle/Contents/$(ProjectName)"
  xcopy /Y /E /R "$(ProjectDir)Resources/Images" "$(AppData)/Autodesk/ApplicationPlugins/$(ProjectName).bundle/Contents/$(ProjectName)/Resources/Images"
  )