Home Dashboard Directory Help
Search

Unable to copy file "obj\x86\Debug\*.exe" to "bin\Debug\*.exe". by HomeSoft.ru


Status: 

Closed
 as Fixed Help for as Fixed


6
0
Sign in
to vote
Type: Bug
ID: 688789
Opened: 9/16/2011 5:18:02 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
1
Workaround(s)
view
4
User(s) can reproduce this bug

Description

Unable to copy file "obj\x86\Debug\*.exe" to "bin\Debug\*.exe". The process cannot access the file 'bin\Debug\*.exe' because it is being used by another process.    

Помогает только закрытие VS2010.

Это началось сразу после сегодняшних (16.09.2011) обновлений
KB2529927,KB2547352,KB2522890,KB2549864,KB2548139

26/09/2011 Дополнение
Это из-за файла Revision.tt TextTemplatingFileGenerator . Компиляция в .cs . В VS2008 он работал. Сейчас почему-то нет.
Details
Sign in to post a comment.
Posted by Kiran Qureshi on 3/3/2013 at 9:18 PM
i am using Microsoft Visual Studio 2010 Professional (Evaluation version), whenever i build my project, i am facing this error "Unable to copy file "obj\x86\Debug\*.exe" to "bin\Debug\*.exe". The process cannot access the file 'bin\Debug\*.exe' because it is being used by another process." After seeing this error, i used to close Visual Studio & check for processes in Task Manager (by pressing ctrl+alt+delete), and close process indicating my_project_name.exe, then open Visual Studio and build my project again, it shows 'Build succeeded' and .exe file executes.

But, after 2-3 times execution of .exe file, i see the same error and it shows persistently. Please help to solve this problem. Thanks.
Posted by HomeSoft.ru on 11/1/2011 at 12:58 AM
Un-installing KB2547352 help for me to solve a problem. Thank you.
Posted by Microsoft on 10/31/2011 at 4:43 PM
We are planning to release a new hotfix over Microsoft Update to address this issue. If the workaround mentioned below (removing KB2547352) does not address the issue, please open a new Connect bug.

-The Windows Forms Team
Posted by Microsoft on 10/18/2011 at 4:37 PM
Hi HomeSoft.ru -

We are still investigating this issue. Please try un-installing KB2547352 - this should remove the issue.

-The Windows Forms Team
Posted by HomeSoft.ru on 10/8/2011 at 2:36 AM
In AssemblyInfo.cs :
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]

In Revision.tt :

using System.Reflection;

[assembly: AssemblyVersion("0.1.<#= this.RevisionNumber #>.*")]
[assembly: AssemblyFileVersion("0.1.<#= this.RevisionNumber #>.*")]
<#+
    int RevisionNumber = (int)(DateTime.UtcNow - new DateTime(2000,1,1)).TotalDays;
#>
Posted by Microsoft on 10/7/2011 at 2:35 PM
I'm sorry, can you please clarify this statement:

"auto-incrementing version I have executed in a separate code"

Thanks again.
Posted by HomeSoft.ru on 10/7/2011 at 1:40 AM
I performed the previous step with a disabled version of the auto-incremented. Once again: auto-incrementing version I have executed in a separate code .tt !
Posted by Microsoft on 10/6/2011 at 12:16 PM
Thanks for the confirmation. Can you also confirm that the first workaround (disabling the auto-increment AssemblyVersion) did not work?
Posted by HomeSoft.ru on 10/5/2011 at 11:13 PM
Yes, I is confirmed that this workaround trick to prevent the lock assembly. I tried on both my computers. Works well everywhere.
Posted by Microsoft on 10/5/2011 at 5:42 PM
I would like to clarify your remarks. Can you confirm that the workaround prevents your assembly from being locked?

-The Windows Forms Team
Posted by HomeSoft.ru on 10/5/2011 at 11:47 AM
I understand. So is working properly. And what is the solution?
Posted by Microsoft on 10/5/2011 at 10:50 AM
Hi HomeSoft.ru -

Allow me to clarify my statement to help us deduce the issue. If the issue persists when the AssemblyVersion auto-increment feature is disabled, perform the following steps: close the designer, restart VS, ensure the designer is still closed, change your code, and rebuild multiple times. Is your assembly still locked?

Thanks,

The Windows Forms Team
Posted by HomeSoft.ru on 10/5/2011 at 1:07 AM
Auto-increment is unplugged.

// [assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
_____________________________________
Auto-increment is realized in the following code:

<#@ template language="C#" #>
//
// This code was generated by a tool. Any changes made manually will be lost
// the next time this code is regenerated.
//

using System.Reflection;

[assembly: AssemblyVersion("0.4.<#= this.RevisionNumber #>.*")]
[assembly: AssemblyFileVersion("0.4.<#= this.RevisionNumber #>.*")]
<#+
    int RevisionNumber = (int)(DateTime.UtcNow - new DateTime(2000,1,1)).TotalDays;
#>
_______________________________
Here is this I did not understand: "Also, when the auto-increment feature is enabled, does this issue occur when the designer is not open? Try restarting VS, ensure the designer is closed, and try rebuilding multiple times."

The error appears only if I something change in code and build application.

I loaded the application's source. You their look?
Posted by Microsoft on 10/4/2011 at 12:00 PM
In order to help us understand the issue, please try the following workaround: disable the auto-increment feature of your CSharp project's AssemblyVersion attribute in AssemblyInfo.cs. For example, change [assembly: AssemblyVersion("1.5.*")] to [assembly: AssemblyVersion("1.5.0.0")]

Also, when the auto-increment feature is enabled, does this issue occur when the designer is not open? Try restarting VS, ensure the designer is closed, and try rebuilding multiple times.


Thanks,

The Windows Forms Team
Posted by HomeSoft.ru on 10/3/2011 at 11:25 PM
Yes. On a computer with Windows XP: Microsoft Visual Studio 2010 Version 10.0.40219.1 SP1Rel
On another with Windows 7 too, but the Russian version. Everywhere there is an error.
Posted by fs - ab on 10/3/2011 at 8:23 PM
sorry for the erroroneous confused reply. I did not see the request was clearly for HomeSoft.ru . please ignore
thx
Posted by fs - ab on 10/3/2011 at 8:12 PM
yes

Microsoft Visual Studio 2010
Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework
Version 4.0.30319 SP1Rel

Installed Version: C# Express

Microsoft Visual C# 2010 01014-169-2560017-70410
Microsoft Visual C# 2010

Hotfix for Microsoft Visual C# 2010 Express - ENU (KB2547352) KB2547352
This hotfix is for Microsoft Visual C# 2010 Express - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2547352.

Microsoft Visual C# 2010 Express - ENU Service Pack 1 (KB983509) KB983509
This service pack is for Microsoft Visual C# 2010 Express - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/983509.
Posted by Microsoft on 10/3/2011 at 3:18 PM
Hello HomeSoft.ru,

Your issue sounds like a known issue that was fixed in Service Pack 1 (SP1)for Visual Studio. Can you confirm that you are using VS2010 SP1?

Thanks,

The Windows Forms Team
Posted by Microsoft on 10/2/2011 at 11:55 PM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by HomeSoft.ru on 9/27/2011 at 6:35 AM
Я загрузил исходные коды проекта.
1) Запускаем построение проекта - все нормально. Можно закрыть.
2) Изменяем что-либо (просто комментарий вставить, например) и снова запускаем
3) Обычно сразу возникает ошибка. Или при следующем изменении
...
I downloaded the source code of the project.
1) Run the construction of the project - everything is normal. Can be closed.
2) Any change in (just insert a comment //, for example) and start again
3) Typically, once an error occurs. Or the next time you change. Sorry for E-translator.
Posted by Microsoft on 9/27/2011 at 5:45 AM
Hi HomeSoft.ru,

Could you please provide us with some more detail info? And please help to describe in English.

1. Some more detail repro steps.
2. A sample project zip if possible.
3. A diagnostic build log is needed.

It would be greatly appreciated if you could provide us this information as quickly as possible.

Thank you
Posted by HomeSoft.ru on 9/26/2011 at 7:35 AM
I has added change, problem in file Revision.tt.
Posted by Microsoft on 9/26/2011 at 4:16 AM
Hello,

Sorry for bothering. Is there any update?

It would be greatly appreciated if you could provide us with that information as quickly as possible.

Thanks you
Posted by fs - ab on 9/22/2011 at 4:25 PM
the work aroudn I outlined
can be quite tedious, error prone and painful for a huge solution with mariad of projects.

hopefully some one can come up a beet solution or a utility
Posted by fs - ab on 9/22/2011 at 1:08 PM
in my case, the project was working find even after I added some WPF menu. I was able to build and rebuild without getting " unable to copy exe" error until recent .net update.
what actually happens is that after a build, ctl-shft+B or F5 (that is after each build or debug, the applicationName.vshost.exe get locked and not releaased until the visual studio cloese. this is the cuase of unable to copy .exe message)

my c# visual studio info:

Installed Version: C# Express

Microsoft Visual C# 2010 01014-169-2560017-70410
Microsoft Visual C# 2010

Hotfix for Microsoft Visual C# 2010 Express - ENU (KB2547352) KB2547352
This hotfix is for Microsoft Visual C# 2010 Express - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/2547352.

Microsoft Visual C# 2010 Express - ENU Service Pack 1 (KB983509) KB983509
This service pack is for Microsoft Visual C# 2010 Express - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/983509.
Posted by MS-Moderator09 [Feedback Moderator] on 9/20/2011 at 8:07 PM
Thank you for reporting this issue.

In order to research the issue reported, we must first reproduce in our labs. Unfortunately, we are unable to reproduce the issue with the steps you provided.

Could you please provide us with the following information?

1. Some more detail repro steps.
2. A sample project zip for further investigation.
3. A diagnostic build log.
You can get build log easily by going to Tools/Options, Projects/Solutions, Build/Run, and setting the MSBuild verbosity to "Diagnostic" in both dropdowns. Then, just copy from the Output Window in the IDE, paste it into a text file and send it to us. For command line, you can pass in "/v:diag" switch to MSBuild.EXE and it will produce a diagnostic-level log.

It would be greatly appreciated if you could provide us this information as quickly as possible.

Thanks again for your efforts and we look forward to hearing from you.
Posted by MS-Moderator01 on 9/16/2011 at 5:42 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by fs - ab on 9/22/2011 at 4:02 PM
a potential work around is possible but results in a n extra black dos window during debug or release exec.

the work around is remove all .Kasparov, .project/sln file and start from scratch:

-backup all the relevant files the files
-move/rename all the solution and project files
start up c# visual studio express 2010,
remove the project re/soln reference,
start a new project (windows or wpf or whatever that is appropriate)
name the project/soln accordingly. save.
exit c# studio.
make sure the soln and project are in the right location
rename the Properties folder
if you are proficient with the files structures for references, you can copy the old referenced from the old files and paste to the new files
otherwise, open the c# studio and add references manually after all steps belows

add all existing source files including the app.config
add new folder and rename to Properties
open properties of the project
review and change the output type if needed under the Application tab
go to Settings Tab
click the shortcut to create new setting and you will get a copy from the app.config
close the c# studio
copy from the renamed Properties folder


you may need to repeat the process for the resource folder if you have any

it will be wonderful if the bug is fixed and some utility can be made avail to repair a project/solution

if Microsoft is interested, I can submit the old soln, suo, csProj files
File Name Submitted By Submitted On File Size  
SYTMonitorForMicrosoft.zip (restricted) 9/27/2011 -
log.xml (restricted) 9/27/2011 -
zProperties.zip (restricted) 10/3/2011 -
zieQkSearch(SolnNProjFiles-noSource).zip (restricted) 10/3/2011 -