Once I added Fody.Costura to my project, my post build event that was copying the resulting assembly into a different location started failing with access denied message. That makes sense since Costura uses MSBuild to embed the assemblies. Is there a way to force my post builds to execute after Costura is finished? Example of a post build command:
copy /Y "$(TargetPath)" "%ALLUSERSPROFILE%\Autodesk\Revit\Addins\2019\HOK-Addin.bundle\Contents"
Basically the solution to my own question is the following.
What I did, was to replace the standatd Post Build Command that runs Command Line routines, with a MSBuild
Targetand aTask.Giving it flags to run after Build is finished and Fody is done merging assemblies resolves my issue.What also helps is the fact that
Taskshave flags likeContinueOnError="true"that allow the task to keep trying until the file is available (if that was the issue) as opposed to command line utilities that would just fail.Cheers!