Questions tagged [build-events]
61 questions
0
votes
1 answer
How to append build version to end of the output exe file name in console appilication with using post build event?
I have a simple console application and it has auto increment build version. When I build project, I’d like to append build version to end of the output exe file name with using post-build event. There is no macro for build version.

Batuhan Avlayan
- 411
- 1
- 4
- 19
0
votes
1 answer
Post-build event command line based on project variable
I need to make a call to a batch file when I finish my project build.
I need to make different calls based on a variable in my c# project. How can I do? This is what I need:
AppHelper.cs
public enum CompilingDefines
{
XNET,
NOTIFIER
}
public…
user3518663
0
votes
1 answer
Visual Studio 2017 Post Build Event does not generating an error when compiling
I have 3 Post Build Events, the first event is invalid and should create an (exited with code 3) error when compiling my application. The question I have is why is VS 2017 not throwing the error when I compile my application?
if I remove the 2…

Joseph
- 343
- 1
- 14
0
votes
1 answer
Visual Studio 2017 - User Macro for Build Event
I cannot find any option to add custom Macros (for Build Events).
I am in a .Net environment and its about Visual Studio 2017.
I want to define a "var" which can be used both in the Build Events $(myVar) and in Code. Is this even possible?

Dude234
- 1
0
votes
1 answer
Disable some C# project's build events on local machine
There are some build events in C# project (on SVN). Is it possible to disable one of them on my local machine? I've tried to override section in *.csproj.user, but it does not work, all events perform anyway.
Thanks.

Feofilakt
- 1,341
- 2
- 13
- 33
0
votes
1 answer
Can I add a custom "task" to the post-build event of multiple Visual Studio projects?
I have a VS2010 solution with four projects in it.
I have a semi-complex command line that I want to run which uses Visual Studio build event macros.
This command line is currently in the post-build event of each project - however the command line…

joshcomley
- 28,099
- 24
- 107
- 147
0
votes
1 answer
Execute bat file in the build event got the error "error MSB3073: The command "call "MyTest.bat" exited with code 1."
In our solution we have more than 150 projects, I need build one of project before others, but I did not want to set project reference or project dependencies for more than 100 projects one by one. This is a waste of time. So I ask following…
user9119028
0
votes
0 answers
Getting the filename from the %%F placeholer in a post-build event
I have a post-build event as follows:
FOR %%F in ("$(SolutionDir)OcrLibrary\$(OutDir)*.dll") DO (IF EXIST "%%F" (ECHO "Skipped: %%F.") ELSE (COPY "%%F" "$(TargetDir)"))
%%F > C:\Solution\OcrLibrary\bin\debug\*.dll
$(TargetDir) >…

Raheel Khan
- 14,205
- 13
- 80
- 168
0
votes
0 answers
Running an executable in build events. works in TargetDirectory, not ProjectDirectory
I need to run an executable as a pre or post build event.
I tried calling the executable from my project directory and the program could not find a certain .dll that I am using, even though both projects have a reference to the same .dll.
call…

user1977591
- 211
- 1
- 4
- 22
0
votes
1 answer
Setting the value of a constant or variable at build time
I would like to have a Constant or field defined in my application startup code that reflect the date that the application was actually built. Something like for example:
Private Shared ApplicationBuiltOn As Date =

Dom Sinclair
- 2,458
- 1
- 30
- 47
0
votes
0 answers
Is it possible to do programmatic build events?
I have a solution with several wcf service projects. When they're built, I'd like to log the current release and build info to a database. Then client applications could access the information and log a warning if they're not running on the latest…

BVernon
- 3,205
- 5
- 28
- 64
0
votes
3 answers
Copying application files with visual studio for debugging
I am using VS2010 and created a program using C#.
I got a WIX installer which is creating sub folders in the application's main folder and is copying files to these folders.
The problem is that when I want to just run the application from VS and…

CodeMonkey
- 11,196
- 30
- 112
- 203
0
votes
2 answers
Create deployment package during build event
I have a project "A" that needs the deployment package of a another project "B".
I want this to happen automatically so that "A" depends on "B" and in the pre-build-event of "A" the deployment package is made for "B".
I know how to do this manually…

Martin Clemens Bloch
- 1,047
- 1
- 12
- 28
0
votes
2 answers
send variables to Visual Studio 2008 build event command line
I would like to send additional parameters to the batch file that I'm running in the "Pre-build event command line" of Visual Studio 2008. I can change directory ("cd") to the current "solution directory" by passing in "$(SolutionDir)\MyProject".…

Joshua
- 1,913
- 1
- 19
- 31
0
votes
1 answer
Debug a .net Class Library with Visual Studio
The Situation
I've been hit with a situation that I've never encountered before. I have an application that uses a dll called client.dll. The Application stays in the bin\debug\ folder and is run using Build Events... every time the application…

Freesnöw
- 30,619
- 30
- 89
- 138