I'm working on a project that requires that DLLs generated by building my solution to be copied from the bin folder to another folder, both of which are on my machine, in my C drive. I've written a batch file that uses xcopy to accomplish this, which you can see here:
xcopy /s /y /q "C:UsersscoganDocumentsVisual Studio 2012ProjectsOrganizrServerinDebugOrganizr.Services.dll" "C:inetpubwwwrootAppServerin"
xcopy /s /y /q "C:UsersscoganDocumentsVisual Studio 2012ProjectsOrganizrServerinDebugOrganizr.Services.pdb" "C:inetpubwwwrootAppServerin"
Now, I've tried numerous iterations of this file, which is located at:
C:UsersscoganDesktopCopyFiles.bat
so my post-build event command line looks like this:
call C:UsersscoganDesktopCopyFiles.bat
I've run this batch file on its own with two text files in folders on my desktop, and it works fine. I've also run it as it is with the files I need to copy on its own, and that works fine, too. However, when I try to run this as a post-build event, I get this output:
1> Organizr -> C:UsersscoganDocumentsVisual Studio 2012ProjectsOrganizrClientinDebugOrganizr.exe
1> File not found - Organizr.Services.dll
1> 0 File(s) copied
1> 0 File(s) copied
1> File not found - Organizr.Services.pdb
1>c:WindowsMicrosoft.NETFrameworkv4.0.30319Microsoft.Common.targets(4291,5): error MSB3073: The command "call C:UsersscoganDesktopCopyFiles.bat" exited with code 4.
I've done some research, and found that error code 4 means that "Initialization error occurred. There is not enough memory or disk space, or you entered an invalid drive name or invalid syntax on the command line."
I've also looked up what MSB3073 is, and haven't really found much that can help me there. So, my question is what am I doing wrong? Are the absolute paths messing it up? Any help here is appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…