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
5
votes
1 answer

how to write cross platform postbuild event in dotnet core

I need some help writing a post build event that would work cross platform. The following in my csproj file will work on windows but not Unix. Thanks.
Kevin Tran
  • 137
  • 1
  • 8
5
votes
1 answer

Visual Studio: Running jsmin as a post-build event

I'm trying to add jsmin.exe as a post-build event to my VS 2010 project but I get "error code 9009" when I try to build my project. I've tested at the command prompt and found that if I navigate to the folder, then run jsmin < debug.js >…
awj
  • 7,482
  • 10
  • 66
  • 120
5
votes
2 answers

How to suppress initial post-build event error in Visual Studio 2017 (C#)?

I have a C# solution in Visual Studio 2017. I also have a batch script called foobar.bat that contains the following code: echo foobar : error 1: This is a test error. My goal is to get only the test error message above to appear in…
5
votes
1 answer

Visual Studio doesn't see all files in System32

I set some post-build commands in Visual Studio 2017 that should allow me to run a program that I currently have in System32 (wsl.exe). However, Visual Studio doesn't see the program. I tried to set the command to dir C:\Windows\System32\ to see all…
5
votes
1 answer

Use Visual Studio macros in powershell scripts called from build event

I want to use a powershell script in a build event in Visual Studio, and I need to use some macro defined in Visual Studio itself. This is my powershell script sample: "Updating version for Project:" "$ProjectDir" Then in pre-build event of the…
Jepessen
  • 11,744
  • 14
  • 82
  • 149
5
votes
1 answer

Visual studio post build event command line "for" syntax

Solution1 : { Project1 (windows form), Project2 (class library) } Trying to copy all .dll(s) I get from after compiling Project1, from the default directory (same as the .exe) to a /lib sub-folder. if not exist Lib mkdir Lib for %i in (*.dll) move…
dimitris93
  • 4,155
  • 11
  • 50
  • 86
5
votes
1 answer

Elevate Permissions to Visual Studio For Post-Build Event Batch Script

I have a batch file that copies a directory to a new location, creates 2 other .bat files, 2 .json files, and Inserts Registry Keys. When running the batch script for the command line, I get no errors and all desired outcomes. While running it from…
5
votes
0 answers

Copy Files in Visual Studio Post Build Event

I want to copy all files recursivly with given file extensions after the build process succeeds. Robocopy ROBOCOPY %source% %destination% /S *.as?x *.xls? *.mrt xcopy xcopy .\*.as?x %destination% /SY xcopy .\*.xls? %destination% /SY xcopy .\*.mrt…
Marko
  • 1,291
  • 1
  • 21
  • 37
5
votes
2 answers

GWT Post build command in Eclipse

I am starting getting used to Eclipse, but I have much more experience with Visual Studio. In Visual Studio it is possible to run auto commands after the build has finished. Now I am creating a GWT project and several other projects at once in one…
Henrik
  • 167
  • 1
  • 1
  • 7
5
votes
1 answer

Post-build step for multiple targets

I have a makefile that has multiple targets for outputting data in different formats, e.g. make html, make pdf, make txt etc. and I would like to have pre-build and post-build steps that run when any of these options are used. I have the pre-build…
DanielGibbs
  • 9,910
  • 11
  • 76
  • 121
5
votes
2 answers

Do "if" type statements exist when inside Property Groups in MSBuild?

I currently have to have two separate property groups with only two differences between them, that are set to have one or the other trigger depending on a condition. Here's what I have:
Masamune_Shadow
  • 181
  • 1
  • 2
  • 7
5
votes
1 answer

Post-build powershell script

I have the following post-build event: powershell Set-ExecutionPolicy Unrestricted powershell -file "$(SolutionDir)Obfuscation\_obfuscate.ps1" "$(SolutionDir)" "$(ProjectDir)" powershell Set-ExecutionPolicy Restricted and PS script beginning…
Dzmitry Martavoi
  • 6,867
  • 6
  • 38
  • 59
5
votes
1 answer

Jenkins - Post Build to a Folder

does jenkins have a post build process such that the build WAR files can be made to be stored particular folder?
Priyanka Iyer
  • 175
  • 1
  • 3
  • 8
5
votes
1 answer

Suppress GUID Warnings as a Result of mt.exe Post-Build Event

Within a large, pre-existing codebase, I have several *.dll's which I need to register with COM interop. These manifest registrations are being performed as post-build events using mt.exe in the following manner: mt.exe -manifest…
4
votes
1 answer

VisualStudio 2010 Post-Build event to refresh chrome tab?

i have a question about post-build events in visual studio 2010. I have an MVC3 project and i want a post-build event that make a refresh on the current chrome tab. It's that possible? What i have is a vb file with this code: set WshShell =…
Phoenix_uy
  • 3,173
  • 9
  • 53
  • 100