[SOLVED]after build vs post-build event in csproj
I have a .net framework class library project which has no post-build events as part of the csproj yet.
After build I want to run an exe that builds markdown from the built dll. I can do this successful locally with a post-build event on the csproj:
"$(ProjectDir)docgen\MarkdownGenerator.exe" "$(ProjectDir)bin\$(ConfigurationName)\ThreeLib.dll" "$(ProjectDir)docgen\docs"
Appveyor doesn't seem to like these post build events, and fails with an error:
"c:\projects\threelib\src\ThreeLib.csproj" (default target) (1) -> (PostBuildEvent target) -> C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073: The command ""c:\projects\threelib\src\docgen\MarkdownGenerator.exe" "c:\projects\threelib\src\bin\Release\ThreeLib.dll" "c:\projects\threelib\src\docgen\docs"" exited with code 9009. [c:\projects\threelib\src\ThreeLib.csproj]
I don't need it to be in the csproj, I could just add it to appveyor.yml after_build (already doing a nuget pack there) as a ps or a cmd, but need a bit of help with that with regards to paths.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ilya Finkelshte... on 07 Nov, 2017 10:44 PM
Try the following as
after_build
script:Or you can even remove
%APPVEYOR_BUILD_FOLDER%
if you do not change current directory during your build withCD
command or so.If this does not work (or you need to understand why original post-build event did not work) please send us a link to the failed build and build configuration in YAML format.
2 Posted by luis on 09 Nov, 2017 12:42 PM
Thank you for the reply. I was confused about using a prefix for the script. In the end, this worked:
3 Posted by Ilya Finkelshte... on 09 Nov, 2017 05:56 PM
Good, thank you for update!
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:21 AM.