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

Determine platform (x86 or x64) in post-build event

Our c# project depends on some native dlls that we copy to output directory in a post-build command. We target both x86 and x64bit so we have to copy 32-bit version of native dlls for our x86 build and 64-bit versions of dlls for x64 build. We use…
2
votes
3 answers

How to transfer post-build event command line to batch file in MsBuild?

In my demo project's build event, (a class library project), to copy the build result .dll to a specific folder, (auto-created if it doesn't exist), I added following command line in Post-build event command line section: xcopy /Y…
MagB
  • 2,131
  • 5
  • 28
  • 54
2
votes
0 answers

Text replacement in a file fails if a line contains '='

I am trying to replace a string in a file through a batch file in post-build action of visual studio. The first string is lMkUk= and the second string (replacement string) is ##DummyValues##. While replacing the first string with the second string…
2
votes
1 answer

MIBPostProcessDependencyGraph post build task fails in msbuild

I have a visual studio solution with about 8 projects. 6 csproj and 2 vsxproj. I had to migrate the proj files from VS 2010 to VS2017. So i started using the latest msbuild version for vs2017. Faced a new post build error after this, that first…
2
votes
1 answer

Change temp post-build visual studio folder

I want to add post build event to sign some project outputs by my signer app - this is the simple console application with the one action inside. I had added this in the Post-build event command line window $(OutDir)\Tools\SignTool.exe…
Kamerton
  • 315
  • 3
  • 9
2
votes
0 answers

Unable to copy file from remote machine in a remote post-build event with Visual C++ for Linux Development

I'm developing to Linux OS using Visual Studio 2017 (version 15.7.1) with Visual C++ for Linux Development version 1.0.9 As part of the build procedure, I'm moving the source files to the remote Linux machine (Ubuntu 16.04) and building it - so far…
Guy Avraham
  • 3,482
  • 3
  • 38
  • 50
2
votes
2 answers

How to add conditional postbuild actions using jenkins Declarative Pipeline?

I need to check a condition before the job triggers the postbuild action I could see that post section within the Pipeline supports always, changed, failure, success, unstable, and aborted. as the post build conditions. But i want to check another…
2
votes
1 answer

CMake generating additional code around add_custom_command()'s command

Running into issues with a CMake POST_BUILD command. Whenever I try to build my CMake project (libFDSequencer) I error out with a pseudo-random error code (anything between 123 and 9009). I have narrowed down the root of the problem to the fact that…
2
votes
1 answer

Request user input in pre or post build event - Visual Studio

I want the user to approve an action in the pre or post build event by requesting an user input - like 'y' or 'n'. Thereby the user can cancel the task if he forgot to switch the Configuration by mistake for example. if $(ConfigurationName) ==…
2
votes
0 answers

Update a file when build a project in Visual Studio

if not exist %UserProfile%\Documents\"Visual Studio 2015"\Templates\ItemTemplates\Regra.zip ( xcopy %cd:bin\Debug=Artefatos\Regra.zip% %UserProfile%\Documents\"Visual Studio 2015"\Templates\ItemTemplates\ ) The code above is a command line…
2
votes
1 answer

Pre- Post- Build Event Variables in Visual Studio are Empty

Have a .NET Core app that I'm trying to use $(ProjectDir) with and when I attempt to pass in that macro, I get an empty value. I tried what was suggested in Issue 26748846, but that didn't seem to solve my issue.
2
votes
1 answer

VS2017 .Net Core (Full Framework) Project's Post Build Event gets empty string for $(ConfigurationName)

I'm setting up the dev environment for a new project. It's a Web API project that serves an @angular project from static files. In order to facilitate this, on post build, I run the angular cli's build function, then copy the files into wwwroot.…
Alex Kibler
  • 4,674
  • 9
  • 44
  • 74
2
votes
2 answers

Build .net core project by postbuild event in visual studio 2017

I have project A which has dependency on project B but there is no reference from B to A. I want build and copy assemblies in bin folder of project B to bin folder of project A. how can I do this with post build event and dotnet msbuild. I found…
2
votes
1 answer

Publish a web application in visual studio and run npm install on the remote machine

I have integrated npm with visual studio and I can run my project locally as it has all the required dependencies in the node_modules locally. Now I want to publish this web app to remote server but I don't want to add all the node_modules in to the…
2
votes
0 answers

VS 2013 to 2015 "Post-build event command line" error

I am moving a project from VS 2013 to VS 2015 and when I go to compile a project I get "The command "call “C:***\vcvarsall.bat” x86 “C:***\EditBin.exe” “E:***.exe” /LARGEADDRESSAWARE" exited with code 123. If I go into (r-click project)…
runfastman
  • 927
  • 2
  • 11
  • 31