@wowrs1608 If it's in Post-built event then you can remove that and add below code. and remove anything in Pre-Built event.
REM - Set up the environment.
call "%VS150COMNTOOLS%\VsDevCmd"
REM - Embed the manifest into the dll.
mt.exe -manifest "$(ProjectDir)$(TargetName).X.manifest" -outputresource:"$(TargetPath)";#2
REM - Copy the .addin file and the ButtonResources folder into the result folder.
XCopy "$(ProjectDir)Autodesk.$(TargetName).Inventor.addin" "$(TargetDir)" /y
XCopy "$(ProjectDir)ButtonResources" "$(TargetDir)ButtonResources" /y /r /i /s /f
REM - Delete the pdb file because it doesn't need to be delivered.
DEL "$(TargetDir)$(TargetName).pdb"
REM - Delete the existing add-in folder.
rmdir /q /s "C:\ProgramData\Autodesk\Inventor Addins\$(TargetName)"
REM - Copy the folder to the Inventor Addins folder so Inventor will see it and run it.
XCopy "$(TargetDir)*" "%appdata%\Autodesk\ApplicationPlugins\$(TargetName)\" /y /r /i /s /f
Accept this as a solution.
Regards,
Jatin Devaiya
If a response answers your question, please use ACCEPT SOLUTION to assist other users later.
Also be generous with Likes! Thank you and enjoy!