pre-build-event

Setting a VS2010 environment variable from a batch file?

给你一囗甜甜゛ 提交于 2021-02-15 07:42:54
问题 I'm using a batch file to define some variables that will be used in my program. I want the batch file to change the environment variable and use it in my code , but it's just now working - the macro is not being changed. to be more specific and clear : I have a program that creates a DLL and sets it's version In the common setting of the project - I created a new macro (Common properties->User macros) : TEST_VER = 5 now I want to add a batch file , that will run in the pre-build command and

Visual Studio add pre-build event that always runs (C# project)

非 Y 不嫁゛ 提交于 2020-12-29 08:47:43
问题 In my project, I am running an external tool to update some binary files. These files are included in the project as "content". At the moment the tool is set to run during "pre-build event" in C# project properties. Unfortunately, this event is only executed if the project is out of date, which is not what I need. I am working around this by always using "rebuild" instead of "build" on my project, but this is tedious and slow. I need to execute this tool always, irrespective of whether a

Batch file to add git branch into header file

前提是你 提交于 2020-08-06 05:20:11
问题 I'm working on a C project, under git, and I would like to add the branch name into an header file. This is my idea: I have a version header file: /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef _VERSION_INTERFACE_H_ #define _VERSION_INTERFACE_H_ /* Includes ------------------------------------------------------------------*/ /* Exported defines ----------------------------------------------------------*/ /* Exported types -----------------------------

How to Add PreBuildEvent in install.ps1 in Nuget

会有一股神秘感。 提交于 2020-01-24 10:16:27
问题 Configure NuGet package to add a build event when installed I follow Paul's answer and do it $project.Properties.Item("PreBuildEvent").Value = "your build event here" Below is my install.ps1 $project.Properties.Item("PreBuildEvent").Value = "IF $(ConfigurationName) == Debug IF $(PlatformName) == ARM goto DebugARM IF $(ConfigurationName) == Debug IF $(PlatformName) == x86 goto Debugx86 IF $(ConfigurationName) == Release IF $(PlatformName) == ARM goto ReleaseARM IF $(ConfigurationName) ==

PreBuildEvent and PostBuildEvent on Visual Studio 2015 Tools for Apache Cordova

♀尐吖头ヾ 提交于 2020-01-03 21:02:20
问题 Does somebody know if there is a way to use PreBuildEvent and PostBuildEvent on the new Visual Studio 2015 Tools for Apache Cordova? I tried this post, but it didn't work: Setting post-build event commands? 回答1: I faced similar issue and i needed to delete a folder on build in my Cordova app build with VS 2015 . I found a solution in this link https://stackoverflow.com/a/10605248/581157 Hope this helps. To delete a folder on Biuld of the cordova app i added this to the jsproj file <Target

PreBuildEvent and PostBuildEvent on Visual Studio 2015 Tools for Apache Cordova

和自甴很熟 提交于 2020-01-03 21:02:11
问题 Does somebody know if there is a way to use PreBuildEvent and PostBuildEvent on the new Visual Studio 2015 Tools for Apache Cordova? I tried this post, but it didn't work: Setting post-build event commands? 回答1: I faced similar issue and i needed to delete a folder on build in my Cordova app build with VS 2015 . I found a solution in this link https://stackoverflow.com/a/10605248/581157 Hope this helps. To delete a folder on Biuld of the cordova app i added this to the jsproj file <Target

Visual Studio prebuild powershell script exiting with code 9009 and failing to build

和自甴很熟 提交于 2019-12-31 05:42:07
问题 In my project I have set pre-build event that updates content of *.cs and *.xaml files (which are included in project being built). I use Set-Content Powershell command for it. When I test it in Powershell console everything is working perfectly. But when I paste as in pre-build event it generates error with code 9009 and prevents VS from successfully building my project. I have set build output verbosity to Diagnostic , but there's no more information on it. What could be the problem? My

Android Studio Gradle Pre Build Step

一曲冷凌霜 提交于 2019-12-25 02:49:31
问题 I would simply like to run a separate application (exe) prior to Gradle beginning the build progress. My goal is have my exe (already written) auto-gen a dependancy file containing a build number, which I display in the UI. All of the above is easy, but I know almost nothing of Gradle. This question has been asked, but the answers are terse snippets of Gradle, using Gradle tasks, and do not explain much. I want to use the same exe in different projects, so it takes a command argument to

Run a gradle task before resolving dependencies

随声附和 提交于 2019-12-24 07:51:34
问题 I want to run a gradle task that fetches additional sources and sets them up before gradle tries to resolve dependencies. In build.gradle there is a task that fetches a sub project's source code. The task needs to be run before Gradle tries to resolve dependencies, because the sub project is part of the dependencies. The task involves fetching sources from a remote repository and replacing a few build.gradle files to make the build possible. What happens now is that: I run the task. Gradle

pre-build event to change setup project's ProductVersion doesn't take effect until after the build

雨燕双飞 提交于 2019-12-24 02:14:59
问题 I've followed the steps described here to modify the ProductCode and ProductVersion on my setup project on each build, using a prebuild event. (meaning- I created a console application that uses the above-mentioned code to modify the .vdproj file, and I trigger it from the pre-build event). The operation is successful, and after the build is done I can see that the 'Version' property of the setup project has changed. However, the 'ProductVersion' property of the compiled msi does not change.