Trying to publish be2.6 with vs 2010

Topics: ASP.NET 2.0, Business Logic Layer, Controls, Themes
Jun 21, 2012 at 2:47 AM

When I try to publish be I get the following error:

Error 1 The command "xcopy E:\Blogengine Source\GHC\Source\BlogEngine\..\lib\optimization\System.Web.Optimization.dll E:\Blogengine Source\GHC\Source\BlogEngine\BlogEngine.NET\Bin\ /F /R /Y /I
xcopy E:\Blogengine Source\GHC\Source\BlogEngine\..\lib\razor\*.dll E:\Blogengine Source\GHC\Source\BlogEngine\BlogEngine.NET\Bin\ /F /R /Y /I
xcopy E:\Blogengine Source\GHC\Source\BlogEngine\..\lib\watin\Interop.SHDocVw.dll E:\Blogengine Source\GHC\Source\BlogEngine\BlogEngine.Tests\Bin\Debug\ /F /R /Y /I
xcopy E:\Blogengine Source\GHC\Source\BlogEngine\..\lib\watin\BlogEngine.Tests.dll.config E:\Blogengine Source\GHC\Source\BlogEngine\BlogEngine.Tests\Bin\Debug\ /F /R /Y /I" exited with code 4. BlogEngine.Core

I believe I am using the c68c69a968b0 release.....Not sure though. 

Coordinator
Jun 21, 2012 at 5:08 AM

It might be because of the space in your folder name (BlogEngine Source), the Post Build command may need to have its arguments wrapped in double quotation marks.
http://stackoverflow.com/questions/5626557/what-is-going-wrong-when-visual-studio-tells-me-xcopy-exited-with-code-4

I haven't looked at it, but you might need to edit the Post Build command in Visual Studio (in the BlogEngine.Core project properties) and wrap some of the arguments in double quotation marks.

Some other results....
https://www.google.com/search?q=exited+with+code+4 

Jun 21, 2012 at 6:35 AM
Edited Jun 21, 2012 at 6:36 AM

Good stuff BenAmada, I put the double quotes in the following xcopy arg:

xcopy "$(SolutionDir)..\lib\watin\BlogEngine.Tests.dll.config" "$(SolutionDir)BlogEngine.Tests\Bin\Debug\" /F /R /Y /I

and we're green.

Thanks.

BTW, do you have any tips on deploying a custom version of be from vs2010? Any tips or gotchas would be helpful.

Again, thanks.

Jun 29, 2012 at 5:25 PM

I am getting the same issue, I tried to put double quotes but it didn't change a thing

My post Build Command

xcopy "$(SolutionDir)..\lib\optimization\System.Web.Optimization.dll" "$(SolutionDir)BlogEngine.NET\Bin\" /F /R /Y /I
xcopy "$(SolutionDir)..\lib\razor\*.dll" "$(SolutionDir)BlogEngine.NET\Bin\" /F /R /Y /I
xcopy "$(SolutionDir)..\lib\watin\Interop.SHDocVw.dll" "$(SolutionDir)BlogEngine.Tests\Bin\Debug\" /F /R /Y /I
xcopy "$(SolutionDir)..\lib\watin\BlogEngine.Tests.dll.config" "$(SolutionDir)BlogEngine.Tests\Bin\Debug\" /F /R /Y /I

The error

Error	18	The command "xcopy "E:\Mydata\Visual Studio 2010\Projects\BlogEngine2012\..\lib\optimization\System.Web.Optimization.dll" "E:\Mydata\Visual Studio 2010\Projects\BlogEngine2012\BlogEngine.NET\Bin\" /F /R /Y /I
xcopy "E:\Mydata\Visual Studio 2010\Projects\BlogEngine2012\..\lib\razor\*.dll" "E:\Mydata\Visual Studio 2010\Projects\BlogEngine2012\BlogEngine.NET\Bin\" /F /R /Y /I
xcopy "E:\Mydata\Visual Studio 2010\Projects\BlogEngine2012\..\lib\watin\Interop.SHDocVw.dll" "E:\Mydata\Visual Studio 2010\Projects\BlogEngine2012\BlogEngine.Tests\Bin\Debug\" /F /R /Y /I
xcopy "E:\Mydata\Visual Studio 2010\Projects\BlogEngine2012\..\lib\watin\BlogEngine.Tests.dll.config" "E:\Mydata\Visual Studio 2010\Projects\BlogEngine2012\BlogEngine.Tests\Bin\Debug\" /F /R /Y /I" exited with code 4.	BlogEngine.Core
Coordinator
Jun 29, 2012 at 6:51 PM
Edited Jun 29, 2012 at 6:53 PM

Do you actually have files in the paths? If you run it from command line - does it work? The command itself looks good to me and I checked it with project moved to "folder with spaces", worked fine.

I mean run from cmd command:

xcopy "E:\Mydata\Visual Studio 2010\Projects\BlogEngine2012\..\lib\optimization\System.Web.Optimization.dll" "E:\Mydata\Visual Studio 2010\Projects\BlogEngine2012\BlogEngine.NET\Bin\" /F /R /Y /I

Jun 29, 2012 at 9:19 PM

Spot on rtur, thanks for your help