post-build-event

How to differentiate TFS Builds and manual builds using macros in Post build event

為{幸葍}努か 提交于 2021-02-17 20:26:40
问题 In TFS post build script of a .proj file I want to find whether the project build is happening through TFS triggered build or manually triggered build. Can someone suggest me how to do this using macros in Post Build event. 回答1: Short answer: you can make use of the IsDesktopBuild MSBUILD property within your csproj file to differentiate between TFS and local build. Long Answer: Developer or Team Build? To differentiate the build environments we have to implement a mechanism that detects in

Visual Studio: Run C++ project Post-Build Event even if project is up-to-date

泪湿孤枕 提交于 2020-01-26 18:53:56
问题 In Visual Studio (2008) is it possible to force the Post-Build Event for a C++ project to run even if the project is up-to-date? Specifically, I have a project which builds a COM in-process server DLL. The project has a post-build step which runs "regsvr32.exe $(TargetPath)". This runs fine on a "Rebuild", but runs on a "Build" only if changes have been made to the project's source. If I do a "Build" without making any changes, Visual Studio simply reports that the project is up-to-date and

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

给你一囗甜甜゛ 提交于 2020-01-23 11:39: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

Post-build event copy not working

谁说我不能喝 提交于 2020-01-15 09:14:11
问题 I have a post-build event to copy a .dll from one project to another on successful build using the following command: copy $(TargetPath) ....\MainProject\bin This works fine on my local machine, but it appears to be failing on the build server because when building the MainProject I receive the following: warning MSB3245: Could not resolve this reference. Could not locate the assembly "Project2". Check to make sure the assembly exists on disk. If this reference is required by your code, you

MSBuild AfterBuild Step

送分小仙女□ 提交于 2020-01-11 12:49:08
问题 I have added the following code to a VisualC++ 2010 .vcxproj file just inside the first <project> tag: <PropertyGroup> <PilotStationDirectory>\..\..\PilotStation\PilotStationApp\$(Configuration)</PilotStationDirectory> </PropertyGroup> <ItemGroup> <MySourceFiles Include="$(TargetName).dll;$(TargetName).lib;$(TargetName).pdb" /> </ItemGroup> <Target Name="AfterBuild"> <MakeDir Directories="$(PilotStationDirectory)" /> <Copy SourceFiles="@(MySourceFiles)" DestinationFolder="$

xcopy /s /y “$(SolutionDir)packages\Apache.Ignite.1.6.0\Libs\*.*” “$(TargetDir)Libs” error while building in jenkins

落爺英雄遲暮 提交于 2020-01-06 06:09:37
问题 Hello All, while building Visual project project from jenkins am getting below error i have set msbuild plugin and set path in jenkins. C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073: The command " [C:\Users\Administrator.jenkins\workspace\DrawingsFabric\DrawingsFabricApi\DrawingsFabricApi.csproj] C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073: if not exist "C:\Users\Administrator

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 2012 Post Build Events - Error Code 255

无人久伴 提交于 2020-01-02 04:33:05
问题 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

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

亡梦爱人 提交于 2020-01-01 05:54:54
问题 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