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
1
vote
2 answers

Visual Studio 2015 - Running Post Build Events only when built from the GUI

I have a Visual Studio 2015 solution that builds 10 projects. In each project there are a pre and post build event to call ant to resolve and publish the code. These events should be triggered before and after every project build, so moving the…
1
vote
1 answer

Visual studio Access to the path is denied

I am editing a project written by someone else. The issue is that there seems to a hidden build event. The event is copying a ini file to my c:/ drive. But the build gives the following error: "Unable to copy fille to access to is denied. I…
akb
  • 43
  • 7
1
vote
1 answer

Is there a better way to run a c++ makefile from a c# project?

I have a project in c# which uses bindings to use some c++ code. The c++ code consists of multiple DLL's which are compiled using a makefile. Currently I'm trying to run the makefile using a pre build event which calls nmake. However to get it to…
CalumMcCall
  • 1,665
  • 4
  • 24
  • 46
1
vote
3 answers

Android Studio Gradle Pre Build Step

I would simply like to run a separate application (exe) prior to Gradle beginning the build progress. My goal is have my exe (already written) auto-gen a dependancy file containing a build number, which I display in the UI. All of the above is…
Syntactics
  • 313
  • 4
  • 8
1
vote
1 answer

Unique Assembly name every build

I’m trying to change the Assembly name of my dll during build. I’ve created another exe that changes the assembly name in the csproj file, which I execute during pre-build. But it seems like my changes to the csproj file only take effect after the…
VincentC
  • 245
  • 4
  • 14
1
vote
0 answers

How to automatically refresh open files after changes by a pre-build event

In Delphi XE3 I have a pre-build event that generates .pas files. The generated files are in the project's search path and this works fine. When one of those files is currently opened in the Delphi editor, the pre-build event will still run fine and…
TmTron
  • 17,012
  • 10
  • 94
  • 142
1
vote
0 answers

How to run an action hook on Red Hat OpenShift?

I read the documentation about Action Hook Scripts for OpenShift and created a pre_build action hook with the following commands on my OpenShift gear: rhc ssh jbosswildfly cd $OPENSHIFT_REPO_DIR/.openshift/action_hooks touch pre_build chmod a+x…
Benny Code
  • 51,456
  • 28
  • 233
  • 198
1
vote
1 answer

How to run vbs file in pos-build or pre-build event in vs2005?

I have some projects inside a solution, but because the needs of x64 and win32 i have diferent releases and some diferent files for a setup project. I need to unpack a zipfile before build the setup project. I have a vbs file that woks well to unzip…
Undefined Behavior
  • 2,128
  • 4
  • 24
  • 34
1
vote
1 answer

How to send all .cs files to output directory after every build in Visual Studio 2012.

I have some project what contains 3 dll libraries (one of them has 2 dependencies) At the output folder of 'DLL parent' I need to have all source files of this 2 children. Moveover I want to save structure of this cs files by making 'cs' folder at…
Vitalii
  • 10,091
  • 18
  • 83
  • 151
1
vote
3 answers

Pre/Post build event for windows service. Best practice

Got a windows service and need to recreate it with project build. In pre event: sc query "Service" | findstr /i running | if "%errorlevel%"=="0" (sc stop "Service") sc query "Service" | findstr /i running | if "%errorlevel%"=="0" (sc delete…
Roar
  • 2,117
  • 4
  • 24
  • 39
1
vote
3 answers

Pre build Events in Visual Studio

What does attrib -r "$(ProjectDir)FileName.cs" means?. Can any one explain me the meaning of this and also where can I find the list of Prebuild events?
vikasse
  • 445
  • 2
  • 8
  • 20
1
vote
1 answer

Exit Code 216 with SubWCRev

I'm using SubWCRev to automatically update the version info of a project. When another programmer pulls this project all the pre-build hooks fail with an exit code of 216. The only thing we use in the pre-build hook is SubWCRev. This is the only…
jmooreiwt
  • 13
  • 5
1
vote
1 answer

Executing PowerShell script as pre-build event fails

I have a pretty big JavaScript project I am working on, embedded into an ASP.NET MVC project. I have separated the JS code into several (12-ish) files, to have an easier handling of the code. The problem is, I have lost IntelliSense with this, and…
1
vote
1 answer

What context does MSBUILD run in?

When we are running our build through MSBuild, what context does the MSBuild run in/under? The reason I am asking is because I have pre-build event that calls a command line program (ajax minification) that works perfectly if the project is build…
1
vote
1 answer

Copy the content of an appxmainfest file to another using Pre-build command

I've been trying to get this re-build command working for a Windows 8 Project in Visual Studio 2012. if "$(ConfigurationName)"==ReleaseOEM copy "$(ProjectDir)PackageOEM.appxmainfest" "$(ProjectDir)Package.appxmainfest" copy…