473,385 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Post Build Events

Hi there,

I'm calling xcopy in a post build event to copy some runtime requirements to
the TargetDir of the application I am working on. Problem is that I only
seem to be able to have 9 calls to xcopy. If I make any more calls than the
9, it will fail. I can call the same command 9 times, and the 10th will
fail, or I can call 10 different ones and it will fail on the tenth.
Basically it doesn't matter how I mix it up, but if I take a bunch of xcopy
commands that copy different files to the same location, no matter which
order and despite the fact each command works by itself or when 9 or less
commands are executed, if I go to 10 commands it fails. :-(

I tried to reproduce this in a new C++ app, copying "C:\test.txt" to the
TargetDir, but it seems I can call xcopy as many times as I like and it will
work in the test app.

What could be the problem in my application?

Regards,
David.
Nov 17 '05 #1
3 7844
Actually, I can reproduce this in a test app. Seems not to be related to the
number of lines, so I investigated the number of macros, and it also seems
not to be directly related. What it appears to be is a limitation on the
number of characters in the post build event? Seems to be the number of
characters post macro expansion.

For example, this will fail with a project at C:\...\Desktop\Test

xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y
xcopy "$(ProjectDir)..\..\..\..\test me.txt" "$(TargetDir)" /R /Q /Y

But will work with the same project at C:\Test.

If I add more lines to the project in the shallower path, then it will also
fail...

Performing Post-Build Event...
'x..\..\..\..\test' is not recognized as an internal or external command,
operable program or batch file.

Is this a known issue?

Thanks,
David.

"David Battams" <da******@hotmail.com> wrote in message
news:eR**************@TK2MSFTNGP09.phx.gbl...
Hi there,

I'm calling xcopy in a post build event to copy some runtime requirements to the TargetDir of the application I am working on. Problem is that I only
seem to be able to have 9 calls to xcopy. If I make any more calls than the 9, it will fail. I can call the same command 9 times, and the 10th will
fail, or I can call 10 different ones and it will fail on the tenth.
Basically it doesn't matter how I mix it up, but if I take a bunch of xcopy commands that copy different files to the same location, no matter which
order and despite the fact each command works by itself or when 9 or less
commands are executed, if I go to 10 commands it fails. :-(

I tried to reproduce this in a new C++ app, copying "C:\test.txt" to the
TargetDir, but it seems I can call xcopy as many times as I like and it will work in the test app.

What could be the problem in my application?

Regards,
David.

Nov 17 '05 #2
> From: "David Battams" <da******@hotmail.com>

Actually, I can reproduce this in a test app. Seems not to be related to the number of lines, so I investigated the number of macros, and it also seems
not to be directly related. What it appears to be is a limitation on the
number of characters in the post build event? Seems to be the number of
characters post macro expansion.

...

Is this a known issue?


This is a bug in the 2003 version. We fixed it for our next release.

Thanks for the report.
--
Tarek Madkour, Visual C++ Team
This posting is provided AS IS with no warranties, and confers no rights.

Nov 17 '05 #3
Thanks for the information! :-)

""Tarek Madkour [MSFT]"" <ta****@online.microsoft.com> wrote in message
news:qd**************@cpmsftngxa07.phx.gbl...
From: "David Battams" <da******@hotmail.com>

Actually, I can reproduce this in a test app. Seems not to be related to

the
number of lines, so I investigated the number of macros, and it also seems not to be directly related. What it appears to be is a limitation on the
number of characters in the post build event? Seems to be the number of
characters post macro expansion.

...

Is this a known issue?


This is a bug in the 2003 version. We fixed it for our next release.

Thanks for the report.
--
Tarek Madkour, Visual C++ Team
This posting is provided AS IS with no warranties, and confers no rights.

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Boni | last post by:
Dear All, I am wondering, that I can't in C# have different post build events for debug and release. My goal is to copy different files after the build. If I build release I have to copy in other...
8
by: John | last post by:
Here is the current error that im getting when building my solution. The only thing i can think of is that i needed to install visual studio 6 after visual studio .net was already installed to...
1
by: matt_felzani | last post by:
We are noticing that for a Utility project that we have in VS.Net (C++) that the Post-Build step is being performed every time that the IDE finds the project as a dependency. While it does not take...
3
by: Loui Mercieca | last post by:
I want to write a script to be executed whenever i build my web application in 'release' mode. What it does is that it gets the newly generated dll and places it in another folder. I tried to use...
1
by: Arthur Dent | last post by:
Hello all, ... question for those who've been playing with the 2005 pre-releases: Does VB.NET have pre & post-build events in 2005 by any chance? This would be such a a great improvement. ...
4
by: Allan Ebdrup | last post by:
Hi I'm Using VS.Net 2003 and am trying to get the app.config file copied to the directory of the target dll by using a post build command. In Properties/Common Properties/Build Events/Post-build...
3
by: michael.lang | last post by:
I am using PostBuild events in a C# project to run some tasks, but only when in release configuration mode. The build events run perfectly as expected when run. The problem comes when I save the...
1
by: AlexZh | last post by:
Hi, I'd like to stop command line build by one project build failed. To do that I've created simple AddIn (see code below), that works fine for IDE and does not work for command line. In the AddIn...
1
by: Abhishek | last post by:
Hi All, I need to copy the dll and the tlb file that is build by the project to 2 different directory after the build is successfully complete. what do i add to the post build events in VS 2005...
3
by: =?Utf-8?B?Rmxhc2hwcm8=?= | last post by:
i have googled this question but cannot find an answer. i'm running windows vista and i'm using Visual Basic Express 2008. i know the build event button SHOULD be in under the compile tag but i...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.