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
3 answers

How to Improve this Visual Studio Post-Build Event that is using ajaxmin.exe

I am currently using Visual Studio 2010 post-build event to minify my JavaScript files. The problem is every time I add a new JavaScript file I have to update the post build event. What I want to do is make the script a bit more…
sgmeyer
  • 645
  • 5
  • 21
2
votes
3 answers

Build FAILED for Notepad++ with message PostBuildEvent: The system cannot find the file specified

I get a build failure due to a post build event failure when building Notepad++ in VS 2010. Here's the message from Output window: PostBuildEvent: The system cannot find the file specified. The system cannot find the file specified. The…
2
votes
3 answers

Post-Build Event Works With one Project But Not the Other

I have 2 projects for which I am trying to create a generic Post-Build event batch file. Here is the command in Visual Studio: Post-Build event if $(ConfigurationName) == Release ("$(ProjectDir)PostBuildRelease.bat" "$(TargetDir)" @(VersionNumber)…
Bassie
  • 9,529
  • 8
  • 68
  • 159
2
votes
0 answers

Build Event Error (LARGEADDRESSAWARE) and (VS120COMNTOOLS, Xcopy)

I'm using VS2013 (c# project), and in thePost Build Event I have the following command Xcopy "$(SolutionDir)Lib" "$(SolutionDir)Exe_path\Lib\" /s /e /y call "$(VS120COMNTOOLS)..\tools\vsvars32.bat" editbin /largeaddressaware…
Hazem Abdullah
  • 1,837
  • 4
  • 23
  • 41
2
votes
4 answers

VS2008 post-build event batch file

I'm trying to execute a batch file to move a bunch of files around after a build so I've created a post-build event that looks like this: $(ProjectDir)CopyPlugins.bat $(ConfigurationName) The problem is that when Visual Studio tries to run the…
kdmurray
  • 2,988
  • 3
  • 32
  • 47
2
votes
2 answers

Jenkins: How to execute powershell script after successful build

I want to execute a powershell script (PS) upon successful build in Jenkins. This PS script basically deploys the application to web server. I see there are two plugins available Hudson Post Build Task and PostBuildScript Plugin to run post…
LP13
  • 30,567
  • 53
  • 217
  • 400
2
votes
1 answer

Apply stash with untracked files already committed

I've been asked to write a script to run in post-build events in Visual Studio that will respond to an output-updating build by committing all changes, including new (untracked) files, to a local "autocommit" branch. The idea is to help the lazy…
talrnu
  • 213
  • 1
  • 10
2
votes
2 answers

Unable to execute a .bat file in post build event command line

My post build command is call "$(ProjectDir)MyFile.bat" And getting build error: Error 1 The command "call C:\MyProject\MyFile.bat" exited with code 1. C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets …
Neo
  • 15,491
  • 59
  • 215
  • 405
2
votes
1 answer

Run command on local build, but not TFS build

My post-build event is: "$(DevEnvDir)TF.exe" checkout "$(TargetPath)" This checks out the target build assembly file. This is what I want, and it works great in VS. On the build server, $(DevEnvDir) is equal to *Undefined*. So, I modified my…
qJake
  • 16,821
  • 17
  • 83
  • 135
2
votes
2 answers

Visual Studio - Post-build event to merge .cs files

My target environment only accepts .cs files and complies them at run time. My project has gui.cs and 4 other class files. Its about 9000 lines of code. Is there a way to have all 5 files merged into 1 cs file as a post build event?
Patrick
  • 351
  • 1
  • 6
  • 20
2
votes
3 answers

How to execute a program on PostBuild event in parallel?

I managed to set the compiler to execute another program when the project is built/ran with the following directive in project options: call program.exe param1 param2 The problem is that the compiler executes "program.exe" and waits for it to…
Ivan Prodanov
  • 34,634
  • 78
  • 176
  • 248
2
votes
2 answers

How to create more Macros in C# Post build step

I have an Visual Studio 2012 Solution that includes both C# and C++ projects. I want to create a postbuild step and I notice that the C++ projects have much more macros than the C# projects. I need to get the WindowsSDKDir which is available in the…
Harry Boy
  • 4,159
  • 17
  • 71
  • 122
2
votes
2 answers

how to set multiple options in post build action -> Build other projects in jenkins?

In above jenkins plugin i have set downstream project to job3 only if build succeeds but at the same time if build fails i want also redirect/downstream other project i.e job4. can anyone please let me know how to do this? is there any other…
sandip divekar
  • 1,628
  • 5
  • 22
  • 40
2
votes
1 answer

How can I find executables installed by NuGet packages?

My project needs to be packaged as a zip file for deployment. I want to create this zip file in a post build step. To achieve this I have installed a 7-Zip command line package via NuGet. This package provides an executable which I want to call in…
Chris
  • 6,914
  • 5
  • 54
  • 80
2
votes
1 answer

How to add a build time to a file archive as a post-build macro?

I want to pack the project into a zip-file and have the build date time (or the current date time) as part of the zip-filename. $(TargetDir)\7za.exe a release.zip * So it would be nice to incorporate the date into the release.zip, something like…
Ashley Simpson
  • 383
  • 1
  • 6
  • 16