Questions tagged [pre-build-event]

An event to run scripts, macros or other actions before 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 before compilation. These actions (if specified) are executed just before compilation.

How to specify build event - MSDN

190 questions
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

Invoking executable from nuget package folder in pre-build event in VS2015

I have nuget package with command line tools that I want to invoke from pre-build event in VS2015 project. I could use relative path to invoke command from package folder but then I have to modify that path if either nuget package version or…
Optional Option
  • 1,521
  • 13
  • 33
2
votes
1 answer

User entered text during pre-build event

I am executing a batch file as a pre-build event. The batch file however is expecting user input to continue (i.e., "Type x to continue") Is there a way to enter an 'x' followed by 'Enter' in the pre-build event so that the process…
BrianKE
  • 4,035
  • 13
  • 65
  • 115
2
votes
1 answer

Prebuild script in Visual Studios to change Entity framework database schema isn't working

My goal is to use a prebuild script to change the schema depending on the compiler configuration (Debug/Release/Others..). I see that there are a number of solutions to change the schema in runtime using code, I took a different approach using a…
2
votes
1 answer

Can I have a `pre-build` script decide whether to build or skip the project?

TL;DR Can I have a Visual Studio pre-build event that skips the build of a project without a visual error? Details I have a project that contains a custom XML file and a Powershell script that generates a resource file from the XML during pre-build…
Jim Buck
  • 2,383
  • 23
  • 42
2
votes
2 answers

error MSB3073: The command "call "C:\project\clientdll\dependencies\gitrev.bat" :VCEnd" exited with code 255

I'm getting this message when trying to build my project (Visual Studio 2010): Error 120 error MSB3073: The command "call "C:\project\clientdll\dependencies\gitrev.bat" :VCEnd" exited with code 255. Yes, the file does exist, I used this…
Omer D
  • 41
  • 2
  • 7
2
votes
1 answer

overriding App.Config in prebuild and Use Settings

I have a Settings files that is attached to app.config and I'm using pre-Build command line to call a bat file that supposes to override app.config based on the selected configuration for the project (Debug, release ...) before the build process.…
2
votes
2 answers

pre building python script before building android application on eclipse

I want to run a python script before building my application, i added the script path to the external tools following: project properties > Builders > New > program > file.py location and when i click on Ok after adding the path i get the…
cavallo
  • 4,414
  • 9
  • 39
  • 61
2
votes
1 answer

Jenkins - Mandatory Pre-build Step - All Builds/Projects

Is there a way to create a hidden build step, so Jenkins will always execute a specific script when a build is run? Essentially we are trying to enforce the standard process of builds onto the users.
2
votes
2 answers

Visual Studio: rebuild solution on each run...how?

I've a Visual Studio project with a pre-build event that copies some dll under the output directory. I would raise pre-build event whenever that I launch application with F5. In other words, I would to force solution rebuild on each run. How can I…
2
votes
2 answers

Bootstrap.less using dotless compiler exited with code 9009

I'm pulling my hair out with the following error: Error 1 The command ""C:\Users\Timothy\Documents\Visual Studio 2012\Projects\QProject\packages\dotless.1.3.1.0\tool\dotless.compiler.exe -m -w" "C:\Users\Timothy\Documents\Visual Studio…
2
votes
1 answer

a way to see prebuild steps output in console?

I compile in pre build step another project that takes time - don't see any output in console I'm just waiting. Is there a way to output it to console as well?
user1025852
  • 2,684
  • 11
  • 36
  • 58
1
vote
0 answers

Write a pre-build script to change files from BuildAction Embedded Resource to None in VS 2010?

Is it possible to write a pre-build event in Visual Studio 2010 that will change the build action from embedded resource to none for a file, or all files in a specific folder? Then, write a post-build event to change them back to embedded…
danludwig
  • 46,965
  • 25
  • 159
  • 237
1
vote
1 answer

Make CMake update header file before building

I have a header file version.h containing version information. Before every build, I want CMake to ensure that the version information is up to date. As a test, I've set up CMake to touch the file before every build. That should cause all source…
Magnar Myrtveit
  • 2,432
  • 3
  • 30
  • 51
1
vote
0 answers

Accessing changed files for a pull request in pre build script before executing GitHub actions

I am trying to do user authentication if a pull request contain changes in certain folders. I am intending to do this even before GitHub actions are triggered using pre-build script. I am able to access the user information using the environment…