Questions tagged [build-events]
61 questions
3
votes
2 answers
Is it possible to call multiple post-build events in Delphi 2007?
I am trying to run two cmd files from the post-build event of a Delphi 2007 project.
The build events are configured like this:
..\..\buildtools\postbuild.cmd $(OUTPUTDIR)$(OUTPUTNAME)
..\copydlls.cmd $(OUTPUTDIR)
The first one works fine, the…

dummzeuch
- 10,975
- 4
- 51
- 158
3
votes
2 answers
How to use an ampersand sign in a build event?
I'm trying to figure out how to call a PowerShell script with spaces in the filename as a Delphi build event.
From CMD I have to call powershell.exe -Command "& 'Filename With Spaces.ps1'" which works fine.
Delphi on the other hand doubles the…

Jens Mühlenhoff
- 14,565
- 6
- 56
- 113
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) ==…

LM358
- 141
- 9
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.

Jason N. Gaylord
- 7,910
- 15
- 56
- 95
2
votes
4 answers
External tool (esriRegasm.exe) fails during build. Where in my VS project is it executed?
I am trying to compile a sample from ESRI and I get this error
Error 1: The command "esriRegasm.exe CommandInheritingBaseCommand.dll" /p:Desktop /s" exited with code -1.
So, there must be a command to invoke esriRegasm.exe somewhere in the…

patrick
- 16,091
- 29
- 100
- 164
2
votes
1 answer
In a large Visual Studio solution, how can I quickly identify the projects with build events?
I have a fairly large Visual Studio solution (> 30 projects). Every time I start a debugging session, the whole solution is recompiled. I vaguely remember that one of the projects has some xcopy post-build event, and I know from past experience that…

stakx - no longer contributing
- 83,039
- 20
- 168
- 268
1
vote
0 answers
How to use powershell support for Build Events in VS2019
I found this link Add powershell support for Build Events indicating that as of VS2019 v16.2 you can now use powershell directly in VS build events. Mads closed this with the following comment:
This feature has now been released in the latest…

Dweeberly
- 4,668
- 2
- 22
- 41
1
vote
1 answer
Visual Studio 2019 Windows SDK executable path macro has multiple paths
I'm trying to use $(WindowsSDK_ExecutablePath_x64) in my C++ project post build events to copy some files. However, it contains two paths instead of one. I can't seem to be able to find how to use the first path (not the .Net one):
C:\Program Files…

rashmatash
- 1,699
- 13
- 23
1
vote
0 answers
How to embed a file or text to c# project dll at build time in visual studio?
I need to embed a file/text to c# project dll at build time.
I have tried following ways to do it:
Consider I am having a c# project MyProject,
I have created a Support.exe which actually creates a Resource.resx file and embeds the file to by…

Priya darshini
- 11
- 2
1
vote
0 answers
Set BuildAction in Visual Studio from pre build event
I have droid and iOS xamarin projects plus a shared library. Both apps use a common set of images. For android these should live in the Assets folder. I have a pre build event that copied them from the shared project to the android project.
xcopy…

ThirdPrize
- 194
- 1
- 13
1
vote
1 answer
How can I add an existing file to a project in Visual Studio in the pre-build event?
I have a batch file creating a config file that I don't want to share with all team mates over SVN because it's used for developer specific settings. The config file is called from app.config and is necessary in order to build the project and I…

MicMan
- 31
- 5
1
vote
0 answers
MSBuild post build events not running in windows 10
I've upgraded to a new windows 10 development machine.
Everything works great, except post-build events in msbuild/visual studio.
This is for any project, new or existing.
They all work fine on other people's windows 7 machines.
They work fine on…

Jim T
- 12,336
- 5
- 29
- 43
1
vote
1 answer
How to see the build events for all projects in Visual Studio?
I want to rebuild my entire solution, but I want to make sure that the projects have no post-build events. Is there a quick way in Visual Studio to do this? I would rather not check the properties of every single project one by one.

pushkin
- 9,575
- 15
- 51
- 95
1
vote
1 answer
C# Post Build Batch file returns '´╗┐'
I have a fairly large solution and in one of the project files in the Post Build I am executing a batch file.
The contents of which are:
echo %DevEnv%
echo %2
echo %1App-%DevEnv%.config
echo %1App.config
attrib -r %1App.config
copy…

Jay Croghan
- 445
- 3
- 16
1
vote
2 answers
C++ - Custom build events
Is there any way to force Clean action as a Post / Pre build event for single project in Visual Studio?
Thank you.

Yippie-Ki-Yay
- 22,026
- 26
- 90
- 148