By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,364 Members | 1,272 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,364 IT Pros & Developers. It's quick & easy.

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

P: n/a
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,
--
Pete

Dec 20 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Pierre" <Pi****@discussions.microsoft.comwrote in message
news:DA**********************************@microsof t.com...
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,
--
Pete
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/sys...sExplorer.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.
--
Dec 23 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.