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
9
votes
2 answers

Escaping $ dollar sign in CMake

I'm trying to run a post build command in CMake 3.1.1 via: ADD_CUSTOM_COMMAND( TARGET mytarget POST_BUILD COMMAND for i in `ls *` \; do echo \$i \; done \; However, the $i variable is evaluated to nothing although I escape the dollar…
Vyacheslav
  • 1,186
  • 2
  • 15
  • 29
9
votes
2 answers

In Visual Studio 2013, how do I minify Javascript and CSS in the post-build step

In Visual Studio 2013, how do I minify Javascript and CSS in the post-build step? I'd like to have every single css and js file compress into a .min.js, or .min.css in the same folder. I don't want to check in the minified files, but rather just…
9
votes
4 answers

Is there a way to make user specific pre/post build events in Visual Studio projects?

I'm currently using a post build event in my project to copy my assemblies to another directory for debugging purposes. This is local to my machine, and is for debugging purposes only, so I would prefer to have it in a *.csproj.user file instead of…
blachniet
  • 4,323
  • 5
  • 33
  • 34
8
votes
3 answers

PowerShell .ps1 file on Visual Studio post build event

I am trying to execute the following post build event code but I am getting an non-useful error : "c:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -file "$(SolutionDir)tools\nuget_pack.ps1" I have run the following PS script before I…
tugberk
  • 57,477
  • 67
  • 243
  • 335
8
votes
2 answers

post-build event with multiple if/copy combinations only execute if first file does not exist

Given the bin\ directory inside the Delphi project contains the files Cert.pem and Key.pem, the below Delphi post-build event only copies both files if C:\Binaries\Cert.pem does not exist: if not exist $(OUTPUTDIR)Cert.pem (copy bin\Cert.pem…
Jeroen Wiert Pluimers
  • 23,965
  • 9
  • 74
  • 154
8
votes
2 answers

Can Visual Studio post build events be used with ClickOnce publishing?

In Visual Studio 2008, can a post-build event be used with ClickOnce publishing? If so, how? Out of the box, it looks like I can only use pre-build events and ClickOnce publishing seems to build the project to a different location, before the post…
Brad
  • 115
  • 2
  • 6
8
votes
1 answer

Use CMake to run a C++ program post-build

I have an application that is written in C++ that I use CMake to build and release binaries. I'd like to have the CMakeLists.txt script compile and run a CPP file that is used to timestamp and encrypt a license file after it has built the binaries…
8
votes
3 answers

Inherit Post-Build-Event in Visual Studio?

I have a solution in Visual Studio in which I have a shared property sheet which contains a Post-Build Event command (bar) which needs to execute for every project. Foo.props > Common Properties > Build Events > Post-Build Event > Command Line =…
JBentley
  • 6,099
  • 5
  • 37
  • 72
8
votes
1 answer

Delphi 2007 post-build event, copy exe into specific directory?

In Delphi 2007 how can I copy the newly-built exe into a specific directory using the post-build event? Any link to a list of build event commands would be much appreciated.
SteB
  • 1,999
  • 4
  • 32
  • 57
8
votes
2 answers

Post build SET command and %variable% error

I am a batch newbie and I might have made a mistake. But I have the following post-build event: IF $(ConfigurationName) == Release ( SET RELEASEPATH = "C:\Users\Synercoder\Documents\Visual Studio 2010\Releases\$(ProjectName)" IF NOT EXIST …
SynerCoder
  • 12,493
  • 4
  • 47
  • 78
8
votes
2 answers

Post-Build Event VS 2010 "Fails", but really doesn't

I have a relatively simple post-build event happening in VS 2010, just two copy operations. The output from the copy operations shows that they have succeeded, and I've checked the directories and the file copy is working perfectly. VS tells me that…
Tag Ashby
  • 83
  • 1
  • 6
7
votes
1 answer

How to trigger VS post-build events without rebuilding

I have a bunch of VS 2005 C++ projects, which build a number of dlls and executables, which are a small part of a large interdependent file hierarchy. In order to debug the files, I copy the built execs/dlls to the hierarchy by post-build…
Serge
  • 1,027
  • 14
  • 21
7
votes
2 answers

Can Visual Studio automatically adjust the name of other file as it does with app.config?

When adding an Application Configuration file to a .Net project in Visual Studio it will be named app.config and will be renamed (on build) to ApplicationName.config. I have a solution with about 40 projects. I want to add log4net functionality to…
7
votes
1 answer

Help using signtool.exe in Delphi project post-build events

This is a very simple question. What should I write in Delphi post build events to execute a coomand line tool? I wrote this: c:\BinPath\signtool.exe sign /f c:\BinPath\Mypfxfile.pfx /p MyPassword /t http://…
UnDiUdin
  • 14,924
  • 39
  • 151
  • 249
7
votes
2 answers

Post build event depending on configuration name in new ASP.NET 5 project

I'm writing a unified project for 3 smart TVs. I have also 3 configurations created in Visual Studio. Now I want to execute some CLI scripts depending on selected configuration. The problem is in new ASP.NET 5 project I don't have an editor for post…
Nickon
  • 9,652
  • 12
  • 64
  • 119