Performing Post-Build Event Fails

J

John

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 print out
some forms that were created in vs6 causing this issue to occur. I
may be way off here but that is why i'm posting this message.

Performing Post-Build Event...
Access is denied.
0 file(s) copied.
Project error: A tool returned an error code from the build event

Post-Build Event failed


Any help would be greatly appreciated.

Thanks in advance,

John
 
M

Mihajlo Cvetanovic

John said:
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 print out
some forms that were created in vs6 causing this issue to occur. I
may be way off here but that is why i'm posting this message.

Performing Post-Build Event...
Access is denied.
0 file(s) copied.
Project error: A tool returned an error code from the build event

Post-Build Event failed

This has to do entirely with Post-Build Event. Check Post-Build event.
The destination file of copy operation must be accessible, you have to
have write privileges on it, and all handles of it must be closed.

This is happening to me always when I forget to close an application
while trying to copy newly built one over it.
 
J

John

How do i go about checking the Post-Build Event, checking that the
file of copy operation is accessible, check to see if it has write
privileges and how to check if all handles are closed?

I apologize for the amount of questions but it would be a big help if
they could be answered.

Thanks in advance again,
John
 
R

Ronald Laeremans [MSFT]

E.g. by having a batch file with a pause statement in there and when that
hits trying to do the exact same steps manually yourself.

Ronald Laeremans
Visual C++ team
 
M

Mihajlo Cvetanovic

John said:
How do i go about checking the Post-Build Event, checking that the
file of copy operation is accessible, check to see if it has write
privileges and how to check if all handles are closed?

Could you post here this Post-Build Event? Go to Properties of the
project and look for Build Events > Post-Build Event.

In 90% of all cases handle to an application is still open (I only
mentioned the first two cases for the sake of complicity). If copy fails
check the process list in Task Manager, you'll probably find your app
hanging there.

If the app is actually some service, or ISAPI filter, or COM server, or
similar, then you need to close the app in the way that is predicted for
its type.
 
J

John

That is another thing. When i go to the properties of the project i
do not see Build Events. The only things i see are Startup Project,
Project Dependencies, Debug Source Files and Debug Symbol Files.
 
M

Mihajlo Cvetanovic

John said:
That is another thing. When i go to the properties of the project i
do not see Build Events. The only things i see are Startup Project,
Project Dependencies, Debug Source Files and Debug Symbol Files.

What you saw was properties of a Solution (also common mistake).
Projects are under the solution.
 
J

John

Ok i found the Build Events > Post Build Events. But currently there
is nothing specified in the post build event, it is just blank.
 
M

Mihajlo Cvetanovic

John said:
Ok i found the Build Events > Post Build Events. But currently there
is nothing specified in the post build event, it is just blank.

I'm sorry, but I can't see how the build output can be:

Performing Post-Build Event...
Access is denied.
0 file(s) copied.
Project error: A tool returned an error code from the build event

Post-Build Event failed


....without any build event. Maybe there is more than a blank line in
Command Line of post build event (to see more press "..." button
associated with command line). Maybe there are several projects and the
event is related to other project than you looked at. Maybe there's some
macro that behaves like post build event (I don't know anything about
that). Why don't you post here the whole build output...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top