Problems with Post-Build Event in Visual Studio 2010 - visual-studio-2010

I am running into an issue with my Post Build Event in VS 2010, I am recieving the following errors on my projects, but I don't know what ths means and I cannot seem to even edit the original Post-build Event. Let me know what my options are? thanks in advance.
Error 1 The command "copy "C:\Users\Paul.Rykiel\Desktop\Sitecore Notes\YAFIntegrationSource\YAFIntegrationSource\YetAnotherForum.NET\Bin\YAF.Classes.Utils.*" "d:\projects\Sitecore\yaf2\Sitecore\www\bin\"" exited with code 1. YAF.Classes.Utils
Error 2 The command "copy "C:\Users\Paul.Rykiel\Desktop\Sitecore Notes\YAFIntegrationSource\YAFIntegrationSource\YetAnotherForum.NET\Bin\YAF.Classes.UI.*" "d:\projects\Sitecore\yaf2\Sitecore\www\bin\"" exited with code 1. YAF.Classes.UI
Error 3 The command "copy "C:\Users\Paul.Rykiel\Desktop\Sitecore Notes\YAFIntegrationSource\YAFIntegrationSource\YetAnotherForum.NET\Bin\YAF.Classes.Base.*" "d:\projects\Sitecore\yaf2\Sitecore\www\bin\"" exited with code 1. YAF.Classes.Base
Error 4 The command "copy "C:\Users\Paul.Rykiel\Desktop\Sitecore Notes\YAFIntegrationSource\YAFIntegrationSource\YetAnotherForum.NET\Bin\YAF.Classes.Config.*" "d:\projects\Sitecore\yaf2\Sitecore\www\bin\"" exited with code 1. YAF.Classes.Config

Options:
1. Remove the post-build event
Fix the commands defined in the post-build event
Fix the underlying problem that's preventing the commands from working
Ignore the failures?
It's not clear why you can't edit the post-build event. You can't find where in the UI to edit it? These are unfortunately different depending on the type of project you're working on. I think we'll need more information (like what you've tried) in order to provide more help.

Related

Visual Studio Post-Rebuild / Post-NoBuild Event?

I'm working on a project where I need a script to execute when someone hits "F5" or "F6", even if the code in the project hasn't changed.
The script is responsible for copying data from a different directory - data that may have changed.
I've noticed that this works properly as a post-build event, but only if the project is actually rebuilt. How do I get the event to trigger without requiring a clean each time?
These are the steps I followed to setup the script to run when I needed it:
Opened Project > Properties
Navigate to Custom Build Step > General
Put the script command in the "Command Line" field
Set an arbitrary output filename (this is required, if you don't have an output filename, visual studio will skip your custom build step) I chose an arbitrary filename ".filename" if I were to get fancy I'd also have the script output a log to this file
Set the "Execute After" field to "FinalizeBuildStatus" This ensures that the command will execute after the build status has been established (which happens in all circumstances when you'd hit F5 or F6, even if you haven't changed any code in the project).
I was surprised not to find these steps clearly outlined elsewhere online. Perhaps I'm bad at googling, but since I solved my own problem I find it only fitting to share in case someone else has this problem.

Visual Studio Postbuildevent Batch

I hope someone got an idea for a little problem of mine...
I got the following Postbuild-event script in my visual-studio 2010 project:
copy "D:\Sources\Project/output\program.exe" "D:\Project\Testserver\"
cd "D:\Project\Testserver\"
start "" /I "D:\Project\Testserver\program.exe"
The program is starting properly in a new window but the build-process is not ending before I stop the batch.
The same command in a normal windows shell does create a new independent instance but visual studio seems to wait for the process to end, why? I just want it to copy and start the program and then complete the build-process, is there a way to accomplish this? Thanks!
Oh and the follwing error is thrown in the visual studio output window:
Error: The input redirection is not supported. Process will be killed immediately.
(I translated this from german text but still google does not find anything to this error-message)
Would be cool if someone has experience with this. Thanks!

Visual Studio post-build: keep console open?

My post-build event works, but in some situations I am quite sure it is showing an error in the console window. However, because the window closes immediately, I'm not able to read any of it.
This is the build event:
if $(ConfigurationName) == Release start xcopy /y "$(TargetDir)*.dll" "$(ProjectDir)../../bin"
Basically it copies the built dlls over to another directory.
Is there a way to force the console window invoked by start to remain open until I close it?
I think that the information that you want is written in the "Output" (Views > Output or Ctrl-W + O). That information is still written/available after everything has ran.
For example, the output for
echo Information on the post build event
some_non_existant_command
is
Information on the post build event
'some_non_existant_command' is not recognized as an internal or external command, operable program or batch file.
which will give you a better hint at what's going wrong than the Error List (Ctrl-W + E) which will only display something cryptical, like "... exited with code 9009".
So, my advice, check the Output!
Hope it helps.

Post-build event causing an exit code of 1

I have the following post-build event in my web application in Visual Studio.
"..............\External\Tools\ILMerge\2.10.0\ILMerge"
/out:"$(ProjectDir)$(OutDir)Combined.dll"
"$(TargetPath)"
"$(ProjectDir)$(OutDir)Utilities.dll"
"$(ProjectDir)$(OutDir)AjaxMin.dll"
"$(ProjectDir)$(OutDir)Yahoo.Yui.Compressor.dll"
"$(ProjectDir)$(OutDir)EcmaScript.NET.modified.dll"
It's causing an exit code of 1. Any ideas why this might be the case?
This might help you out

Can a post-build step take me to a specific line of code?

I just wrote a little program which will be executed as a post-build step when I compile certain projects.
This program returns 0 for success, or some number for failure. In case of failure, Visual Studio then correctly outputs: "The command [...] exited with code n."
However, a single number is not always helpful. In my case, I actually want the error to point to a specific place in the source code. Is it possible to output a filename and line number in such a way that Visual Studio will actually let me just double-click on the error and get there instantly?
If the program you're running is a console application, I think its output will appear in the output pane. If the output is of the form
D:\dev\project\Code\MyClasscpp(68) : something terrible happened
then you can double-click on the line and the editor will open on the indicated line.

Resources