Questions tagged [post-build-event]

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

How to specify build event - MSDN

511 questions
3
votes
2 answers

Post build events using relative paths do not work in VS 2013

I have a batch file two levels up. ..\..\PostBuildEventCopy.bat $(TargetDir) $(TargetName) This batch file copies certain files to a location mentioned in the batch file. I get the below error. It seems to me that VS is not able to find the batch…
sundar
  • 235
  • 2
  • 11
3
votes
1 answer

How can I get with PowerShell the project version in Visual Studio?

I'm writing a simple PowerShell script for creating NuGet packages on Post-build event. For this I'd like to set the package version automatically to the project version. Currently it's hardcoded in my command: nuget pack .\MyProject.csproj…
t3chb0t
  • 16,340
  • 13
  • 78
  • 118
3
votes
2 answers

Access ProgramFilesFolder from Visual Studio post-build events

When building a C# project in Visual Studio, in the post-build events I need to call a program that is situated in C:\Program Files\\MyProgram.exe. How can I access the "C:\Program Files" folder from the post-build events? At this link:…
rPulvi
  • 946
  • 8
  • 33
3
votes
2 answers

Add post build event without overwriting existing events

I have a Powershell script (run by my NuGet package) that adds a post build event to a user's Visual Studio project. $project.Properties | where { $_.Name -eq "PostBuildEvent" } | foreach { $_.Value = "xcopy `"`$(ProjectDir)MyFolder`"…
openshac
  • 4,966
  • 5
  • 46
  • 77
3
votes
2 answers

Visual Studio Post Build does not like my conditional

I have a post build conditional that looks like this: if $(ConfigurationName)==Release ( echo Update $(TargetName) to be non conflicting "$(SolutionDir)ILMerge\RummageTypeRenamer.exe" -f XamlGeneratedNamespace.GeneratedInternalTypeHelper -t…
Vaccano
  • 78,325
  • 149
  • 468
  • 850
3
votes
1 answer

Copy files in Visual Studio Post-Build event: Access is denied

I added some copy commands to my project's post-build events. These should copy some template files to the following location: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\DBGen and…
Bass
  • 378
  • 5
  • 15
3
votes
2 answers

How to include a directory in a nuget package

I have a post build event in project which copies a folder that is not included in project to a shared directory in project. xcopy /Y /E "$(TargetDir)\Views\Shared\CommonScripts" "$(ProjectDir)\Views\Shared\CommonScripts" Now problem is it works…
sam
  • 4,594
  • 12
  • 61
  • 111
3
votes
1 answer

jenkins commit after successful build

I am new to jenkins and maybe do not understand the CI-topic yet completly. Considering my research i found that if i do CI, i will always have stable build. Now this somehow confuses me, since i did not found anything about it in jenkins. My…
jig
  • 73
  • 2
  • 8
3
votes
1 answer

Post-Build Events Output Path for Projects and Deployment Project

I am working on a program that needs to have each exe signed before being packaged in the MSI deployment project. I've tried using VS2010's Signing tools ("Sign the Assembly"), but the key file doesn't seem to like VS2010. VS doesn't ask for a…
teynon
  • 7,540
  • 10
  • 63
  • 106
3
votes
1 answer

VS Post build event declare var in bat file and use it later

I'm trying to auto sign project with certificate using signtool.exe in Visual Studio 2010. Here is my simplified post-build script: if $(ConfigurationName) == Debug ( call "$(VS100COMNTOOLS)VCVarsQueryRegistry.bat" call…
3
votes
1 answer

Can a post-build step take me to a specific line of code?

I just wrote a little program which will be executed as a post-build step when I compile certain projects. This program returns 0 for success, or some number for failure. In case of failure, Visual Studio then correctly outputs: "The command [...]…
Timwi
  • 65,159
  • 33
  • 165
  • 230
3
votes
1 answer

Visual Studio 2010 post build event completely ignored

I was looking on stackoverflow for anything similiar to my issue but without results. It seems that my VS started to completely ignore post-build events. Post-build events are not triggered in any project or solution I open or create using my VS…
3
votes
2 answers

Build events in C++ project

I have a post-build event in my C++ Visual Studio 2010 project, which uses command xcopy, but when this xcopy return error code (>0), all build failed too and message "build unsuccessfull", how can i turn of error sensetivity in build…
Breakdown
  • 1,035
  • 4
  • 16
  • 26
3
votes
3 answers

How to get the dynamic path of solution directory in post-build event of Visual Studio

I have seven code library project in my solution and I has 3 different type of websites which are using same code library project from VSS. Now I want to put post build script in one of my reference code library project so that when build it done it…
Manoj Singh
  • 7,569
  • 34
  • 119
  • 198
3
votes
1 answer

"Error MSB3073" in Visual Studio 2010 - post-build command dosen't handle line breaks?

I have a post build command in Visual Studio 2010: setlocal cd D:\1.5\BINZ if %errorlevel% neq 0 goto :cmEnd D: if %errorlevel% neq 0 goto :cmEnd "C:\Program Files\CMake 2.8\bin\cpack.exe" -C $(Configuration) --config ./CPackConfig.cmake if…
Danijel
  • 8,198
  • 18
  • 69
  • 133