Error Msb3073 Exited With Code 2
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring
Visual Studio Xcopy Exited With Code 4
developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question the command xcopy exited with code 2 x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join
Xcopy Exited With Code 255
them; it only takes a minute: Sign up Why would a post-build step (xcopy) occassionally exit with code 2 in a TeamCity build? up vote 58 down vote favorite 8 A few projects in my client's solution have a post-build xcopy exit codes event: xcopy the build output to a specific folder. This works fine when building locally. However, in TeamCity, I occasionally get xcopy [...] exited with code 2 If I use regular copy, it exits with code 1. I expect this has something to do with file locks, although the specific files being copied are not the same, so perhaps just locking on the shared destination directory. I use /y to not prompt on overwriting files. Any ideas as to copy exited with code 1 why this fails in TeamCity but not locally? Any idea how to fix? teamcity xcopy share|improve this question edited Jan 12 '12 at 17:57 BoltClock♦ 384k939341046 asked Oct 20 '11 at 11:33 Tim Iles 76611023 I had similar issues but where related to simultaneously copying the same file in parallel. Could you double check that no file is copied twice? –Ignacio Soler Garcia Oct 20 '11 at 11:36 1 Exit code 2 means The user pressed CTRL+C to terminate xcopy. Hehe. –Hans Passant Oct 20 '11 at 11:39 @SoMoS Yes, the files being copied are definitely distinct. –Tim Iles Oct 20 '11 at 11:40 @HansPassant I don't know why teamcity would want to press CTRL+C on me! :( –Tim Iles Oct 20 '11 at 11:41 4 Yah, me neither. The other common convention is that the exit code equals the last Windows error or exception. Error 2 means "file not found". Which does of course make a lot more sense. –Hans Passant Oct 20 '11 at 11:55 | show 1 more comment 5 Answers 5 active oldest votes up vote 81 down vote accepted Even if you provide the /Y switch with xcopy, you'll still get an error when xcopy doesn't know if the thing you are copying is a file or a directory. This error will appear as "exited with code 2". When you run
language specified is not supported by any of the installed packages.Value does not fall within the expected range./The
Xcopy Error Codes
parameter is incorrect.Error HRESULT E_FAIL has been returned from error msb3073 xcopy exited with code 4 a call to a COM component.The command msidb.exe exited with code 2.Error MessageThe
Post Build Xcopy
command msidb.exe exited with code 2. Cannot build SharpSetup solution with message indicating that msidb.exe exited with code 2.SummaryAfter creating new solution http://stackoverflow.com/questions/7835304/why-would-a-post-build-step-xcopy-occassionally-exit-with-code-2-in-a-teamcity or when trying to build existing solution the build command may fail with message saying that msidb.exe exited with code 2. This is behaviour is most likely caused by the way msidb.exe processes command line arguments. When path to installer solution directory contains dash http://sharpsetup.eu/documentation/html/724f2ebe-5ed9-48ff-afcd-dfa5683f44d3.htm (-) followed by other characters, then folowed by space and then followed by another group of characters msidb.exe splits filename and treats only first part as filename. As the trimmed filename cannot be found on disk an error occurs. Affected configurationsAny supported Windows version, WiX v3.5, Visual Studio 2010, SharpSetup (1.0 or 1.2). SymptomsWhen trying to build SharpSetup solution you get the following error in Error List window: Error 1 The command ""C:\Program Files\Microsoft SDKs\Windows\v6.0A\\bin\msidb.exe" -d "C:\Users\administrator\Documents\Visual Studio 2008\Projects\Installer1-MyApp 2008\Debug\Package.msi" -r "C:\Users\administrator\Documents\Visual Studio 2008\Projects\Installer1-MyApp 2008\Debug\en-GB\en-GB"" exited with code 2. C:\Program Files\MsBuild\SharpSetup\SharpSetup.WixTranslation.targets 14 6 Package Output window contains the following message: "C:\Program Files\Microsoft SDKs\Windows\v6.0A\\bin\msidb.exe" -d "C:\Users\administrator\Documents\Visual Studio 2008\Projects\Installer1-MyApp 2008\Debug\Package.msi" -r "C:\Users\administrator\Documents\Visual Studio 2008\Projects\Installer1-MyApp 2008\Debug\en-GB\en-GB" C:\Users\administrator\Documents\Visual Studio 2008\Projects\Installer1-MyApp: Unable to place file in stream C:\Program Files\MsBuild\SharpSetup\SharpSetup.WixTranslation.targets(14,5): error MSB3073: The command ""C:\Program Files\Microsoft SDKs\Windows\
code 2 Visual Studio Team Foundation Server > Team Foundation Server - Build and release management Question 0 Sign in https://social.msdn.microsoft.com/Forums/vstudio/en-US/fa48ecf1-77dd-4c61-8a22-dc0e1412aa93/tfs-continuous-build-gives-error-msb3073-and-exited-with-code-2?forum=tfsbuild to vote Hi, I am, integrating "Sandcastle Document Generation" in my TFS Continuous Integration for a solution. It has a number of projects. And at the end, after each one gets build, I have to generate the API documentation, using SHFB (Sandcastle help file builder). For this I have created a fake project, that is supposed to be exited with built as the last project of the solution. As a pre-compilation step of this project, I have added following command, so that my API documentation process should get fired. The command is as follows.SandcastleBuilderConsole ..\Source\Documentation\FakeForDocumentation\ABC_API.shfb -assembly=.\XYZ*.dllOn the BUILD machine, when I run this command from Visual Studio it runs "OK" and generats my pretty good API Documents. But when it gets automatically build, exited with code that is, when it is queured up, the API document does NOT get generated and the build log shows me following error.C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(885,9): error MSB3073: The command "SandcastleBuilderConsole ..\Source\Documentation\FakeForDocumentation\ABC_API.shfb -assembly=.\XYZ*.dll" exited with code 2.Can any one help us, identifying the problem with our setup? Monday, March 10, 2008 3:41 PM Reply | Quote Answers 1 Sign in to vote I have no experience using the Sand Castle tool, but have you been able to verify that the file it is looking for exists in the target location? It would probably be more safe to use paths relative to $(SolutionRoot) (for local paths) or $(BuildProjectFilePath) (for server paths) rather than an explicit relative path as shown above. The key thing to pay attention to here is that the folder hierarchy of the source tree (as well as the generated binaries) will typically be different in a manual VS build and a "Team Build" build. Patrick Monday, March 10, 2008 6:50 PM Reply | Quote All replies 1 Sign in to vote I have no experience using the Sand