post-build-event

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

萝らか妹 提交于 2019-12-05 06:02:19
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 to put the post-build event commands in the * .csproj.user file. (From the answers so far, this is

Get qmake to execute shell script after build finished on Mac

倖福魔咒の 提交于 2019-12-04 23:46:23
问题 After my release build is finished I would like to run a script. I found this question How to execute shell command after compile finished from .pro in QT? but the answer doesn't work for me. I tried adding various modifications of this to my .pro file: CONFIG(release, debug|release) { mytarget.target = ./MyScript.sh mytarget.commands = touch $$mytarget.target QMAKE_EXTRA_TARGETS +=mytarget QMAKE_POST_LINK += mytarget } But this always results with ":-1: error: mytarget: No such file or

Visual Studio Post Build Event MT.exe command fails with code 9009

99封情书 提交于 2019-12-04 17:19:44
问题 Hi I am running following command from my post build event: C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe -manifest "$(ProjectDir)$(TargetName).exe.manifest" -updateresource:"$(TargetDir)$(TargetName).exe;#1" It is failing with Exited with code 9009... I don't understand why this happens; any suggestions? 回答1: Try adding quotes around the mt.exe path, e.g.: "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe" Also, make sure that path is valid. Hope this helps. I've been

Post-build step for multiple targets

折月煮酒 提交于 2019-12-04 12:14:09
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 data.dat txt: data.dat generate-txt data.dat data.dat: pre-build generate-some-data > data.dat How can

Run batch script before Debugging

主宰稳场 提交于 2019-12-04 10:41:46
问题 I want to run a batch script every time before starting program for debugging. For the build events, such functionality is realized using pre-build event, post-build event. For actual debugging, I could not find any pre-Debug, post-Debug events. How to realize this scenario? I am using VS2008, .net framework 3.5, c# application. I am opposed to idea of creating some extra lines of code within the application that would fire-up external batch file. 回答1: I realise you wished to avoid additional

How do I start a background task from a VisualStudio post-build event?

大憨熊 提交于 2019-12-04 09:37:13
问题 I'm trying to start an instance of grunt watch whenever a particular project is run from VisualStudio. I have a single page-app written in ember, and compiled with grunt, which connects to a backend written with WebAPI. I'm trying to reduce friction so it's possible to Start Debugging (F5) in VS and have it get everything up and going. If I add a post-build event to compile the app with grunt, it works fine: node node_modules\grunt-cli\bin\grunt dev --no-color grunt watch never terminates, so

VS PostBuild Event - Copy file if it exists

僤鯓⒐⒋嵵緔 提交于 2019-12-03 23:51:14
Is there a simple way to copy a file in a post-build event for a Visual Studio project, but only if the file exists? (i.e. don't fail the build if the file doesn't exist) I've tried some options using xcopy. But I feel so stupid - I can't seem to get my head around what switches I might need with xcopy. Use "IF" command: IF EXIST file.txt xcopy file.txt [destination_folder]\ /Y Also without the IF EXIST but using the /U option of XCOPY xcopy source_file_name dest_folder /u /y 来源: https://stackoverflow.com/questions/11422555/vs-postbuild-event-copy-file-if-it-exists

How to create an asynchronous build event in Visual Studio (2008)?

你。 提交于 2019-12-03 16:22:26
I am trying to do a poor man integration with xUnit.Net from inside Visual Studio as a post build event. What I want is when I press Shift+F6 (Build the test project), after a successful build it should run xUnit.Console.exe and output the result in an html file and afterward launch the html file inside the browser. Below is what I got so far and it work, but not to my liking (in that the browser will appear as a modal dialog of sort and I can't switch back and forward / toggle (using Alt-Tab) between Visual Studio and the browser. Right now I must close the browser for VS to gain focus again

Use CMake to run a C++ program post-build

筅森魡賤 提交于 2019-12-03 15:47:19
I have an application that is written in C++ that I use CMake to build and release binaries. I'd like to have the CMakeLists.txt script compile and run a CPP file that is used to timestamp and encrypt a license file after it has built the binaries for the application. I've seen examples of running the execute_process command such as this: execute_process(COMMAND "gcc -o foo foo.cpp" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) execute_process(COMMAND "./foo" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} RESULT_VARIABLE MY_FOO_VAR) I am using Visual Studio 2010 to do the build on Windows. The

Get qmake to execute shell script after build finished on Mac

若如初见. 提交于 2019-12-03 14:17:29
After my release build is finished I would like to run a script. I found this question How to execute shell command after compile finished from .pro in QT? but the answer doesn't work for me. I tried adding various modifications of this to my .pro file: CONFIG(release, debug|release) { mytarget.target = ./MyScript.sh mytarget.commands = touch $$mytarget.target QMAKE_EXTRA_TARGETS +=mytarget QMAKE_POST_LINK += mytarget } But this always results with ":-1: error: mytarget: No such file or directory". Path is correct and 'MyScript.sh' works fine from command line. Since this works for other