Questions tagged [post-build-event]

An event to run scripts, macros or other custom actions after compilation.

Build events can be used to run scripts, macros, or other custom actions as a part of the compilation process.

Post-build events occur after compilation. These actions (if specified) are executed just after compilation.

How to specify build event - MSDN

511 questions
2
votes
1 answer

How to abort or fail a Visual Studio build if a postbuild event runs a program that returns an error

Can the build of a Visual Studio solution with many projects be aborted if a postbuild event for one project return some error code back to Visual Studio? How?
Johann Gerell
  • 24,991
  • 10
  • 72
  • 122
2
votes
2 answers

PostBuildEvent in WindowsInstaller project returns error code '1'

I have a Windows Installer (VS 2008) project and I want to create a very simple post build event, which just opens the target folder, with the installer selected. So I've typed the following in the PostBuildEvent field: explorer.exe /select,…
2
votes
2 answers

Afterthought seems not working, simple code

I wrote simple piece of code to get involved into Afterthought, but it doesn't work and I've got no idea why. A huge part of it is taken from other SO question: How to implement simple Property Ammendment with Afterthought. using System; using…
lukiasz
  • 97
  • 1
  • 4
2
votes
1 answer

Where should code signing be placed in the build/publish process?

I've only recently come into the pleasure of being able to sign executables. Now I'm trying to establish a proper place in our build/publish process where assemblies should be signed. My first instinct was to sign as early as possible (in a…
2
votes
1 answer

How to add a post build event to llvm using cmake

I want to add a post build event to llvm's clang using cmake, but i just can't figure out where. The event should occur after every build of clang, without considering changes.
marius c
  • 153
  • 1
  • 1
  • 4
2
votes
2 answers

Correct syntax to copy and overwrite a file in a post build event

What is the best way to copy and always overwrite a file to the target directory in a postbuild event in VS2010 running on windows 7. At the moment I am using robocopy $(SolutionDir) $(TargetDir) "Morning Report Template.xlsm" I have also tried…
Dan
  • 45,079
  • 17
  • 88
  • 157
2
votes
2 answers

Visual Studio Installer > PostBuildEvent error code '1'

I'm trying to run a .js file with PostBuildEvent in Visual Studio 2010 and fail when i build the solution with the error code Error 2 'PostBuildEvent' failed with error code '1' 'Error no especificado' I already check the names of the files,…
MarcoM
  • 92
  • 1
  • 10
1
vote
2 answers

Use external EXE as startup project

I have a solution which contains a few projects and an external exe. When I build, I want to copy the exe to my build folder, as well as build the projects and copy my dlls to the build folder. Is there any way to run this external exe as my…
steve
  • 223
  • 1
  • 4
  • 15
1
vote
1 answer

Is there post-build event in IntelliJ IDEA?

Is there post-build event in IntelliJ IDEA (11 in my case) ? Oddly I couldn't find it via googling. I want to perform binary enhancement for my OpenJPA entities before it builds output artifact.
expert
  • 29,290
  • 30
  • 110
  • 214
1
vote
2 answers

Stopping Post Build events on project when building directly from MSBuild

I have a project which has some post build events that do some copying around for other projects. I unfortunately cannot change that, and have been asked to write a build script for use on a CI server. Problem is that the post build steps run off…
Grofit
  • 17,693
  • 24
  • 96
  • 176
1
vote
2 answers

protect exe through dotfuscator in vs2008 by post build option

I am new to Dotfuscator. I want to protect my .exe file through dotfuscator in visual studio2008 using post build option.But I am unable to do this ok,I am using the command in post build option like "dotfuscator …
jiten
  • 5,128
  • 4
  • 44
  • 73
1
vote
2 answers

Fail on Post-Build event?

Is there a way to force the build to fail given certain conditions in the post-build event? The package I'm working with runs jslint and a few other solutions all together on post-build, I would like Visual Studio to fail if jslint produces an…
anjunatl
  • 1,027
  • 2
  • 11
  • 24
1
vote
1 answer

Post-build event copy not working

I have a post-build event to copy a .dll from one project to another on successful build using the following command: copy $(TargetPath) ....\MainProject\bin This works fine on my local machine, but it appears to be failing on the build server…
Matt
  • 19
  • 3
1
vote
1 answer

Post-Build Event, Copy command not correct?

I am trying to do the following: set strSolutionDir= "$(SolutionDir).." SET SeaProjectPATH= %strSolutionDir%\$(ProjectName)\bin SET SeaMainMenuPATH= %strSolutionDir%\seamainmenu\bin COPY /Y %SeaProjectPATH%\$(ProjectName).dll …
Alexander
  • 69
  • 7
1
vote
1 answer

Visual Studio 2019 Windows SDK executable path macro has multiple paths

I'm trying to use $(WindowsSDK_ExecutablePath_x64) in my C++ project post build events to copy some files. However, it contains two paths instead of one. I can't seem to be able to find how to use the first path (not the .Net one): C:\Program Files…
rashmatash
  • 1,699
  • 13
  • 23