The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,224 other subscribers

Sometimes it is Visual Studio’s fault: failure to copy file in a post build event

Posted by jpluimers on 2016/02/25

Not sure yet why, but every now and then I get a failure like this in Visual Studio (at least in 2013 and up):

2>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(4548,5): error MSB3073: The command "copy /Y "C:\SomePath\SomeProjectName\bin\Debug\SomeProjectName.dll" "C:\SomePath\Shared Assemblies\"" exited with code 1.
2>Done executing task "Exec" -- FAILED.

Most of the times it is me at fault: some process still is using it.

But sometimes, it is devenv.exe (Visual Studio itself) that keeps it locked, even though nothing is running (in fact it can happen right after you loaded the project in Visual Studio 2013).

I found this out by using “Process Explorer Search” (Ctrl+F or Find Handle or DLL).

Not sure why yet.

–jeroen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: