PLEASE ... Fatal error when compiling Windows.Forms application

G

Guest

Hello,
I have an simle application that uses a referenced library of my own. It's
been a year now that I have no problems until a few days. Here is the
details of my problem:
The library referenced by the main application compiles properly. When I
compile the main application, I have the following message:

Cannot copy assembly 'MyLib' to file
'D:\Development\Projects\MyClent\MyLib.dll'. The requested operation cannot
be performed on a file with a user-mapped section open. I tried to remove
the Reference, then add it back and still the same result.

When I go to the client's Debug folder to manually delete MyLib.dll, Windows
does not permit to delete with the following message box: Cannot delete
'MyLib' Access is denied, make sure that the disk is not full or write
protected and that the file is not currently in use.

The disk is not write protected, I have sufficient space on HD (68 Gb) and
the client application is not running.

Can someone tell me what the heck is going on?

Thank you in advance,
 
N

Nick Malik [Microsoft]

Pierre said:
Hello,
I have an simle application that uses a referenced library of my own.
It's
been a year now that I have no problems until a few days. Here is the
details of my problem:
The library referenced by the main application compiles properly. When I
compile the main application, I have the following message:

Cannot copy assembly 'MyLib' to file
'D:\Development\Projects\MyClent\MyLib.dll'. The requested operation
cannot
be performed on a file with a user-mapped section open. I tried to remove
the Reference, then add it back and still the same result.

When I go to the client's Debug folder to manually delete MyLib.dll,
Windows
does not permit to delete with the following message box: Cannot delete
'MyLib' Access is denied, make sure that the disk is not full or write
protected and that the file is not currently in use.

The disk is not write protected, I have sufficient space on HD (68 Gb) and
the client application is not running.

Can someone tell me what the heck is going on?

Thank you in advance,
Hello Pete,

You have a process attached to your DLL file, preventing the file from being
moved. Therefore, the compiler cannot replace it with a new file. This is
clear from you attempt to delete it.

I did a live search on your error message and got a number of hits. One
that looks helpful describes a similar situation happening during an install
of a third party library.

<Quote>
This error is caused by WMIPRVSE.exe (Windows 2000/XP/2003) or WINMGMT.exe
(Windows SBS versions) attaching itself to the ubresenu.dll file during
install.

These two executables are part of the Windows Management Instrumentation
service. This service "provides a common interface and object model to
access management information about operating system, devices, applications
and services. If this service is stopped, most Windows-based software will
not function properly. If this service is disabled, any services that
explicitly depend on it will fail to start."

To fix this install error:

Restart the service - "Windows Management Instrumentation"

</Quote>
Source: http://www.ultrabac.com/kb/ubq000235.htm

One other useful bit of advice from the same page is this: if the step above
doesn't resolve the error, you can use the SysInternals utility Process
Explorer
(http://www.microsoft.com/technet/sysinternals/utilities/ProcessExplorer.mspx)
to find the process that is at fault and address it by either killing that
process or perhaps understanding what it is that process is doing.

I hope this helps,

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
 

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