post-build-event

Alternative to Pre/Post Build Events in Visual Studio

雨燕双飞 提交于 2019-12-07 12:08:59
问题 The Pre/Post Build Events in Visual Studio has bugged me for a few years, but I just haven't got around to research a better alternative. The thing that I want to achieve is pretty much the same as I get with Post Build Events: I call a piece of code that does something before or after a project build. The two things with the Pre/Post Build Events that really bugs me is that (1) the code is separated from my project and compiled into a command line .exe and (2) that every error I get will end

Is there a way to make user specific pre/post build events in Visual Studio projects?

无人久伴 提交于 2019-12-07 03:04:16
问题 I'm currently using a post build event in my project to copy my assemblies to another directory for debugging purposes. This is local to my machine, and is for debugging purposes only, so I would prefer to have it in a * .csproj.user file instead of a * .csproj file. I tried copying the responsible elements from the * .csproj to the * .csproj.user , but that didn't work. Edit To clarify, I do not want to put user specific commands in the post-build event in the * .csproj file. Instead, I want

Post-build step for multiple targets

萝らか妹 提交于 2019-12-06 07:36:20
问题 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 step sorted, but not sure how I can get the post-build step working properly. .PHONY: html pdf txt pre-build post-build pre-build: do-pre-build-stuff post-build: do-post-build-stuff html: data.dat generate-html data.dat pdf: data.dat generate-pdf

VS .Net: Post build events for “Primary Output from <myProject>” in installer project

那年仲夏 提交于 2019-12-06 02:12:01
问题 I'm using the following post build actions in a project, to merge a lib into my application: IF $(ConfigurationName) == Debug GOTO end cp $(TargetPath) $(TargetDir)app_unmerged.exe del $(TargetPath) "C:\Program Files\Microsoft\ILMerge\ilmerge.exe" /internalize $(TargetDir)MyApp_unmerged.exe $(TargetDir)someLib.dll /out:$(TargetDir)myApp.exe del $(TargetDir)myApp_unmerged.exe $(TargetDir)someLib.dll :end This works fine. Now I have an Installer project and added the Project Output. I would

Is there a way to move the entire post {} build section in Jenkinsfile to the global pipeline library?

天大地大妈咪最大 提交于 2019-12-06 01:36:53
I'm relatively new to Jenkins pipelines, but having implemented already a few, I've realised I need to start using jenkins shared library before I go mad. Have already figured out how to define some repetitive steps in the library and call them with less clutter from Jenkinsfile, but not sure if the same thing can be done for the entire post build section (thought I've read about to how to define the entire pipeline in the lib and similar ), as this is pretty much static end of every single pipeline code: @Library('jenkins-shared-library')_ pipeline { agent none stages { stage ('System Info')

How do I use signtool in post build event for Visual Studio 2013 without hard coding path?

烈酒焚心 提交于 2019-12-05 20:52:50
I've created a post build event to do code signing of the application after a successful build with the following post build script. copy $(TargetPath) $(TargetDir)SignedApp.exe signtool sign /t http://timestamp.verisign.com/scripts/timestamp.dll /a $(TargetDir)SignedApp.exe I get the error 'signtool' is not recognized as an internal or external command. So it seems the path used for the build event doesn't point to the signtool utility. When I run the VS2013 x86 Native Tools Command Prompt I can run signtool as it includes a path which points to: C:\Program Files (x86)\Windows Kits\8.1\bin

Visual Studio Post-Build events calling batch files with arguments that have spaces

不羁的心 提交于 2019-12-05 19:23:32
Anybody know how to do this? I have a .bat script that I'd like to be able to use both from the command line as well as a post-build script in Visual Studio. The script takes arguments, some of which can contain spaces. The path to the .bat script can contain spaces, and is best expressed as a path relative to $(SolutionDir). I've tried what seems like a hundred variations of command lines with different enclosing quote and escape character combinations including: "$(SolutionDir)myScript.bat" "$(SolutionDir)\" "$(Platform)" "$(Configuration)" call "$(SolutionDir)myScript.bat" "$(SolutionDir)"

VS Post Build Event

家住魔仙堡 提交于 2019-12-05 19:08:55
问题 I would like to implement a post build event that performs the following actions A relative path copy of the DLL output (1 file, not all the debug jazz) A register the output DLL to GAC How is this done? 回答1: Does that do you want? copy $(TargetPath) $(TargetDir)..\..\someFolder\myoutput.dll regasm $(TargetPath) (Entered into the field for post-build step under project properties) 回答2: Enter following into "Project properties->Build events->Post build events command line:" xcopy "$(TargetPath

Post-build powershell script

不问归期 提交于 2019-12-05 11:21:56
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 with: param ( [string]$slnDir, [string]$projectDir ) when MSBuild trys to run it, my first parameter "$(SolutionDir)" is splitted in two parameters because the solution path contains a space character: D:\Projects\Dion2 Mercurial\repo\Dion2Web\ . So my script receives D:\Projects\Dion2 as the first parameter and Mercurial\repo\Dion2Web\ as the second one.

Visual Studio 2012 Post Build Events - Error Code 255

爱⌒轻易说出口 提交于 2019-12-05 09:33:22
Here is my attempt to copy my application executable to another folder changing it's name: IF $(ConfigurationName) == Release ( SET DESTINATION=$(ProjectDir)Output\Distribution IF NOT EXIST "%DESTINATION%" ( MD "%DESTINATION%" ) XCOPY /Q /Y "$(TargetPath)" "%DESTINATION%" RENAME "%DESTINATION%\$(TargetFileName)" "$(TargetName).Plain$(TargetExt)" ) I've tried everything to make it work, but it always throw error code 255 or 1, it depends. Running that code with a plain batch file works like a charm! You need to enable delayed expansion , using the SETLOCAL EnableDelayedExpansion command. Do it