post-build-event

XCopy will not copy in visual studio

给你一囗甜甜゛ 提交于 2019-12-02 04:25:15
I'll copy a exe into another folder with a post build event from visual studio. This should happens every build. I haven't any errors, the exe output is in a custom folder, but it will not copy into another folder, why? The build output from visual studio is only: Build successfully. 0 files copied . With this script, I've changed the output folder: $(SolutionDir)..\..\build\$(ProjectName)\ . And with this, I'll try to copy the result into another folder: xcopy "$(SolutionDir)..\..\build\$(ProjectName)\$(TargetFileName)" "$(SolutionDir)..\..\bin\AutoCopy-Server.exe*" . With the "*" at the end,

Add post build event without overwriting existing events

假装没事ソ 提交于 2019-12-01 09:04:51
I have a Powershell script (run by my NuGet package) that adds a post build event to a user's Visual Studio project. $project.Properties | where { $_.Name -eq "PostBuildEvent" } | foreach { $_.Value = "xcopy `"`$(ProjectDir)MyFolder`" `"`$(OutDir)`"" } Unfortunately it currently overwrites the existing post build event. How can I modify the Powershell script to append my build event if it does not already exist? I've never used Powershell before but I tried simply appending it inside the foreach, but this didn't work: $_.Value = "$_.Value`nxcopy `"`$(ProjectDir)MyFolder`" `"`$(OutDir)`"" just

Pre and Post Build event parameters

我怕爱的太早我们不能终老 提交于 2019-12-01 04:09:54
In Visual Studio, can someone point me to a list of available pre- and post-build events parameters? eg. $(TargetDir) , etc. Tschareck There you go: http://msdn.microsoft.com/en-us/library/42x5kfw4(v=vs.80).aspx VS 2015 version Zanon This link provides the complete and updated list. However, if it breaks, this answer will be lost. Currently, for VS 2015, we have: $(ConfigurationName) The name of the current project configuration, for example, "Debug|Any CPU". $(OutDir) Path to the output file directory, relative to the project directory. This resolves to the value for the Output Directory

Pre and Post Build event parameters

北城余情 提交于 2019-12-01 01:41:30
问题 In Visual Studio, can someone point me to a list of available pre- and post-build events parameters? eg. $(TargetDir) , etc. 回答1: There you go: http://msdn.microsoft.com/en-us/library/42x5kfw4(v=vs.80).aspx VS 2015 version 回答2: This link provides the complete and updated list. However, if it breaks, this answer will be lost. Currently, for VS 2015, we have: $(ConfigurationName) The name of the current project configuration, for example, "Debug|Any CPU". $(OutDir) Path to the output file

Post-build event command for publish (Visual Studio 2010)

一笑奈何 提交于 2019-11-30 12:59:04
I have a project in visual studio 2010. This project has the following post-build event command lines: SET TARGET_PROJECT=TestMain IF NOT EXIST "$(TargetDir)IceBox" ( XCOPY /E /I /Y "$(SolutionDir)Externals\IceBox" "$(TargetDir)IceBox" ) IF NOT EXIST "$(TargetDir)bzip2.dll" ( COPY "$(SolutionDir)Externals\IceBox\bzip2.dll" "$(TargetDir)" ) XCOPY /E /I /Y "$(SolutionDir)Externals\Infragistics" "$(TargetDir)" But this commands are just used when I create a debug or a release. When I publish my project will this commands ignored. Gives it a possibility to use this commands when I publish the

TFS 2010 Build Automation and post-build event

扶醉桌前 提交于 2019-11-30 11:59:21
问题 In the project I've inherited, the original developer used a number of post-build events in his Visual Studio projects to copy around DLL's and stuff when building inside VS. This is causing some grief now that I'm trying to move these things to the TFS 2010 Build system. I was hoping to be able to create a new "Continuous" project configuration, and exclude those post-build events from Visual Studio in that configuration - but it seems those calls aren't configurable based on your project

VS 2012: Post Build xcopy error 2

感情迁移 提交于 2019-11-30 08:14:38
i want to make VS copy the .lib-file it created after the build process to a specific folder. So i went to the project config, post-build event, and entered the following command: if exist $(TargetPath) xcopy "$(TargetPath)" "C:\Users\Incubbus\Documents\Visual Studio 2010\My Libraries\z.lib" /Y But instead of copying the process fails after i click "build" and i receive the following error: error MSB3073: The command "if exist C:\Users\Incubbus\Documents\Visual Studio 2010\My Libraries\MyNetWorkProject\Debug\IncNetworkLibD.lib xcopy "C:\Users\Incubbus\Documents\Visual Studio 2010\My Libraries

Post build event depending on configuration name in new ASP.NET 5 project

前提是你 提交于 2019-11-30 07:34:50
问题 I'm writing a unified project for 3 smart TVs. I have also 3 configurations created in Visual Studio . Now I want to execute some CLI scripts depending on selected configuration. The problem is in new ASP.NET 5 project I don't have an editor for post build events. I know I have to do this in project.json . What I found is: "scripts": { "postbuild": "" } But using this one I can't create different CLI scripts for different configurations. I found also: "configurations": { }, And I guess this

TFS 2010 Build Automation and post-build event

ε祈祈猫儿з 提交于 2019-11-30 01:53:40
In the project I've inherited, the original developer used a number of post-build events in his Visual Studio projects to copy around DLL's and stuff when building inside VS. This is causing some grief now that I'm trying to move these things to the TFS 2010 Build system. I was hoping to be able to create a new "Continuous" project configuration, and exclude those post-build events from Visual Studio in that configuration - but it seems those calls aren't configurable based on your project configuration.... Any ideas? Is there something I could check for to know I'm running under TFS Build and

Post-build event command for publish (Visual Studio 2010)

喜夏-厌秋 提交于 2019-11-29 18:54:22
问题 I have a project in visual studio 2010. This project has the following post-build event command lines: SET TARGET_PROJECT=TestMain IF NOT EXIST "$(TargetDir)IceBox" ( XCOPY /E /I /Y "$(SolutionDir)Externals\IceBox" "$(TargetDir)IceBox" ) IF NOT EXIST "$(TargetDir)bzip2.dll" ( COPY "$(SolutionDir)Externals\IceBox\bzip2.dll" "$(TargetDir)" ) XCOPY /E /I /Y "$(SolutionDir)Externals\Infragistics" "$(TargetDir)" But this commands are just used when I create a debug or a release. When I publish my