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
4
votes
1 answer

How to get different output filename based on x86/x64

I am using VS2013 Express. I have my project setup to build in 32 or 64 bit, but I would like to get the .exe file when built, to include _32 or _64 depending on which platform I build for. Not having any luck in the project properties.
bolwire
  • 87
  • 1
  • 6
4
votes
0 answers

Postbuild event RegServer VisualStudio 2012

Recently I migrated a C++ COM server project from Visual Studio 2008 to Visual Studio 2012. Apparently all went well except the postbuild event, which is "$(TargetPath)" /RegServer to register the COM server EXE. It's giving me the following…
Matz
  • 583
  • 1
  • 6
  • 21
4
votes
3 answers

Where can we open the `Post-build script` box of a build process template?

As guided here, we can add extra script to run along the build process. I can't find where to open this dialog to put my script in the post-build box. Where is it? Update I go for Edit a build definition - Process section and just see the below…
Nam G VU
  • 33,193
  • 69
  • 233
  • 372
4
votes
1 answer

Include files during publish

I want to include some files from different project during publish. So for that in my file :
praks
  • 118
  • 1
  • 7
4
votes
2 answers

The command xcopy ... exited with code 9009 in Visual Studio

When I build my solution with 10 Projects I get Build failures for 7 projects. All 10 Projects have post-build events. Even those who build use an xcopy command. I say this because my colleague was the opinion VS 2012 and xcopy is not that…
HelloWorld
  • 4,671
  • 12
  • 46
  • 78
4
votes
0 answers

Using a referenced project's TargetPath in a post-build task

Using Visual Studio 2010, I need to have a C# project run a post-build event and reference the outputs of several assemblies built by other dependent projects. In WiX projects, I can use macros from other referenced projects in the solution to get…
4
votes
0 answers

Alternative to Pre/Post Build Events in Visual Studio

The Pre/Post Build Events in Visual Studio has bugged me for a few years, but I just haven't got around to research a better alternative. The thing that I want to achieve is pretty much the same as I get with Post Build Events: I call a piece of…
Adrian Rosca
  • 6,922
  • 9
  • 40
  • 57
4
votes
3 answers

Set post build action for all projects in a solution

is there any way of setting and/or changing the post build event/action for all projects in an entire solution? I have some solutions with up to 50 projects in it which all need the same post build action except for 2 projects. When I have a new…
4
votes
1 answer

How to checkout-copy-checkin a file in TFS using Post-build event?

I have a Project holding server controls. Whenever I make changes to it I want to be able to Build in Release mode and have the output DLL (and its documentation Xml file) copied to a folder in Team Foundation Server. I have come out with a…
alonso.torres
  • 1,199
  • 2
  • 12
  • 26
4
votes
1 answer

Visual Studio Post-Build events calling batch files with arguments that have spaces

Anybody know how to do this? I have a .bat script that I'd like to be able to use both from the command line as well as a post-build script in Visual Studio. The script takes arguments, some of which can contain spaces. The path to the .bat script…
4
votes
1 answer

Powershell script in Visual Studio 2010 Post-Build Step

I have a powershell script that works wonderfully from the powershell shell and from a cmd window, and now I am trying to launch it from a post-build step in Visual Studio. After several different variations of trying to get this to lunch and run…
Hoobajoob
  • 2,748
  • 3
  • 28
  • 33
4
votes
3 answers

How can I stop Microsoft.Sharepoint.Sandbox.dll from being copied into my bin folder?

I have a utils class library project that includes some Sharepoint functionality. The project references Microsoft.Sharepoint.dll (copy local is set to false). We have many other projects that reference our utils dll and whenever we build them…
woggles
  • 7,444
  • 12
  • 70
  • 130
4
votes
1 answer

Visual Studio post publish/or build solution ZIP

Is there a way to automatically Zip/archive the entire solution after I right click on the project file and click "Publish"? I've ran into some issue trying to revert to previous versions of my application because I forgot to check everything in…
PercivalMcGullicuddy
  • 5,263
  • 9
  • 46
  • 65
4
votes
1 answer

Visual Studio 2008 - Build Event: How to use Variable (set tmp="abc" and %abc%)?

When creating a Post-Build event in VS2008, I want to check if the target for an xcopy operation is not readonly. I found some code ( http://forums.techguy.org/dos-other/842311-solved-checking-if-file-folder.html ) that makes use of a temporary…
4
votes
3 answers

Is there a way to delete an output file in a post-build event

I'm trying to run a post-build batch file on a .NET build that encrypts an output file, deletes the original and then renames the encrypted version to the original output filename. i.e.: Build A, then in post-build: Encrypt A->B, DEL /F A, RENAME B…