Questions tagged [build-events]
61 questions
1
vote
0 answers
Multi-line build events result into locking problems
I have a Visual Studio solution with x projects. Each project has (post) build events consisting of two or more lines.
When the build events are executed, a locking problem occurs:
The specified task executable "cmd.exe" could not be run. The…

Martin Mulder
- 12,642
- 3
- 25
- 54
1
vote
1 answer
Post Build event xcopy - exclude some set of files
I want to copy some of the files to the specific folder after the successful compilation of the project. I have written a post build event as mentioned below:
xcopy "$(ProjectDir)bin" "$(TargetDir)..\..\Support Files\DBUpgradeUtility\" /Y
Note: the…

Mehul Vaghela
- 478
- 4
- 20
1
vote
2 answers
Is it possible to run a post build event when the whole compilation finishes in Visual Studio 2013?
I have a solution with multiple projects and we use FxCop. We want to run it once the compilation requested finishes (it may be one project, a folder with several folders or the whole solution).
Is there a way of doing this? We currently do it per…

Ignacio Soler Garcia
- 21,122
- 31
- 128
- 207
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
2 answers
Prebuild Event only on Build Solution/Project not on F5(Debug)
As the tittle says I need a prebuild command CONDITION that executes an exe on build solution/project and passes when i use F5.
I found "$(ConfigurationName)" as a possible solution on some websites but it only works if you change each time the…

VSP
- 2,367
- 8
- 38
- 59
1
vote
2 answers
Update hosts file on post-build event Visual Studio 2012
I have a VS2012 project. To make it run I need a hosts file entry
eg. 127.0.0.1 local.mywebsite.com
The problem is I want to make it as easy as possible for new developers to simply get the project from TFS and run it without any extra steps.
Is…

StackThis
- 1,262
- 1
- 14
- 23
1
vote
2 answers
'Faking' a project reference?
I have a solution structure like in Ports And Adapters Architecture or Onion Architecture. My composition root (a web application in this case) and infrastructure libraries only reference the core library.
I can also load infrastructure libraries…

Ufuk Hacıoğulları
- 37,978
- 12
- 114
- 156
1
vote
1 answer
Converting a TypeScript build event into an External Tools command
I'm working on TypeScript files with Visual Studio 2012 Express for Web. Since the Web Essentials addon doesn't work with Express editions, and rebuilding the entire project every time I update a script is starting to take too long, I was hoping to…

YotaXP
- 3,844
- 1
- 22
- 24
1
vote
1 answer
Show ErrorList Windows in Visual Studio 2010 Addin
I have Win7 64 bits, Visual Studio 2010, and I have developed an Addin for Vs2010.
I try show messages in Error List Windows VS.
I use ErrorListProvider in OnBuildProjConfigDone build event for Addin
this._buildEvents.OnBuildProjConfigDone += new…

Kiquenet
- 14,494
- 35
- 148
- 243
1
vote
2 answers
Visual Studio 2012 slow build because of pre-build and post-build events
I have troubles with Visual Studio 2012 build, it runs extremely slow. It worked fine some time ago, I have no idea what happened. I enabled diagnostic build output, and saw this:
3>Target Performance Summary:
...
3> 1093 ms …

Peace87
- 23
- 2
- 7
1
vote
2 answers
Error with post-build event command
I get an error, while compiling my C#-code with Visual Studio 2010 on Windows 7.
I have these Build Events (Post-build Event Command Line):
if not "$(ConfigurationName)"=="Release" goto :finish
"$(TargetDir)mt.exe" -manifest…

Gepro
- 583
- 1
- 11
- 20
0
votes
0 answers
In Visual Studio/msbuild, how can one target framework's build event depend on another's?
I am building multiple target frameworks in a single .net 6 project: net461 and net6.0.
The two target frameworks build concurrently in Visual Studio as expected.
Oddly, my net6.0 post-build event depend on the net461 post-build event.
I have not…

Buzz
- 512
- 1
- 4
- 11
0
votes
1 answer
Visual Studio 2019 C++ After Successed Build Run an .exe
How to make my Visual Studio 2019, running an custom exe after my C++ Build successfully compile?
i tried to insert into the PostEvent builds, following command: "start C:\Test.exe" but the executable starts while the compile is running ( compile…

Steven.Hawks
- 25
- 5
0
votes
0 answers
How to do REST api call on build event
I am working on .net standard library.
I have two requirements
Note : client project means - c# project which consumes my library.
Call a REST api on pre or post build event of client project.
Based on the response , I should create a enum class…

Noorul
- 873
- 2
- 9
- 26
0
votes
2 answers
Visual studio to override file on selected build configuration
at the moment my project has a license file. No extension attached to the file. The file itself only contains a key.
I have 3 build configuration
Dev
Stage
Prod
At the moment I have 4 license file.
GLicense…

Master
- 2,038
- 2
- 27
- 77