You receive a "The process cannot access the file because it is being used by another process" when you try to remove an image file from Solution Explorer in Visual Studio .NET 2002 and 2003 (810110)
The information in this article applies to:
- Microsoft Common Language Runtime (included with the .NET Framework 1.1)
- Microsoft Common Language Runtime (included with the .NET Framework) 1.0
- Microsoft Visual Studio .NET (2003), Professional Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Academic Edition
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Academic Edition
SYMPTOMSWhen you try to remove an image file from Solution Explorer in Microsoft Visual Studio .NET 2002 or 2003, you receive the following error message: Error deleting file 'ImageFileName'. The process cannot access the file because it is being used by another process. CAUSEThis problem occurs when a reference to the image is created and then the reference is later removed.
For example, the Image property of a PictureBox control is set to the image file. Later, the PictureBox control is removed from the Windows form. When you try to remove the image that was referenced in the PictureBox control, you receive an error message.
Note To perform Undo operations, Visual Studio .NET Designer may keep a lock on an image file where a reference is created and then is later removed.WORKAROUNDTo work around this problem, you must remove all references to the image and then restart Visual Studio .NET. After you restart Visual Studio .NET, you can remove the image file from Solution Explorer.STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Major | Last Reviewed: | 1/5/2005 |
---|
Keywords: | kbGDIPlus kbtshoot kbprb KB810110 kbAudDeveloper |
---|
|