Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Problem with setup project building msi - 'The process cannot access the file because it is being used by another process.'
 

Problem with setup project building msi - 'The process cannot access the file because it is being used by another process.'

Hi, I am having trouble building setup projects on one of my machines and cant figure out why. My builds intermittently(approx 90% of the time) fail with the message:

ERROR: Could not create output file ... InstallerTest\Setup1\Debug\Setup1.msi' 'The process cannot access the file because it is being used by another process.'

I have created an empty Setup Project and added a primary output as an empty C# Class Library project. The setup package builds fine on my laptop but fails most of the time on my desktop machine (both running Win7RC). I have run procmon to try and see what is using the msi but it appears the msi never gets created. Also if i rename the Setup1.tmp to Setup1.msi it appears to work fine.

I do not have Orcas or any other msi editing software running - also i get this error before an msi even has been created so i have no way of running process explorer to see what has locks on the msi.

Thanks in advance for any help on this.
Dorito256  Wednesday, July 22, 2009 7:42 PM
Hi Dorito256,

I've performed a test on the machine with Windows 7 RC version. The problem can't be reproduced. Generally, we may meet such error while the setup.msi is used by other process. For example, the MSI file is currently edit with Orca, at this time, we try to build the setup project, the error will be reported.

I think the way you track down the problem is right, use procmon to find if the file is used by any of the process. But I am not sure if you've done it correctly. You can also try to use procexp for convenience. Just open the procexp, press "Ctrl+F" shortcut, and input the path of the setup.msi in the TextBox, then search. If the file is indeed used by any of the process, the result will be listed.

Please have a try with my suggestion, if the problem still can't be solved, feel free to contact me.

Best regards,
Bruce Zhou
Please mark the replies as answers if they help and unmark if they don't.
  • Marked As Answer byDorito256 Tuesday, July 28, 2009 4:39 PM
  •  
Bruce.Zhou  Thursday, July 23, 2009 3:25 AM
Hi Dorito256,

I've performed a test on the machine with Windows 7 RC version. The problem can't be reproduced. Generally, we may meet such error while the setup.msi is used by other process. For example, the MSI file is currently edit with Orca, at this time, we try to build the setup project, the error will be reported.

I think the way you track down the problem is right, use procmon to find if the file is used by any of the process. But I am not sure if you've done it correctly. You can also try to use procexp for convenience. Just open the procexp, press "Ctrl+F" shortcut, and input the path of the setup.msi in the TextBox, then search. If the file is indeed used by any of the process, the result will be listed.

Please have a try with my suggestion, if the problem still can't be solved, feel free to contact me.

Best regards,
Bruce Zhou
Please mark the replies as answers if they help and unmark if they don't.
  • Marked As Answer byDorito256 Tuesday, July 28, 2009 4:39 PM
  •  
Bruce.Zhou  Thursday, July 23, 2009 3:25 AM
Hi Dorito256,

How's your problem now? If the problem is still not solved or any further help is need, please feel free to let me know.


Best regards,
Bruce Zhou
Please mark the replies as answers if they help and unmark if they don't.
Bruce.Zhou  Monday, July 27, 2009 5:59 AM
Thanks for your help Bruce. This problem cleared itself up after a restart of my machine. Not sure what was causing it as it definately was not generating an .msi file to lock in the first place.

-Thanks
Dorito256  Tuesday, July 28, 2009 4:39 PM

You can use google to search for other answers

Custom Search

More Threads

• Setup and Deployment projects limited to 3 part version numbers?
• Hide cancel button
• Calling WebService from XBAP throws 'System.Net.WebPermission' exception
• How do i set the deployment providor from within the project? One Click
• Using ClickOnce deployment for Windows Forms with SQl Server Express
• is the right place to ask question about installshield
• VS2005 deployment project adding Sql Server with command line arguments and Directx dotnet prerequisites
• [Windows Intaller] Set Configuration in the default location.
• .Net 1.1 updates corrupt 2.0 installation?
• Windows XP development and Windows 2003 server development PLEASE PLEASE HELP HELP !!!!!!!!!!!!!!!