简体   繁体   中英

Post-build event in VS has ceased to work correctly

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.

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"
  )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM