Answered by:
Regasm error: Access is denied.

Question
-
I have a .NET COM dll that works fine, but when I make changes and try to install the new version using regasm sometimes I get this error:
RegAsm error: An error occurred while saving the exported type library: Access is denied.
Any suggestions on why this happens and how to avoid it?
Thanks very much !Thursday, June 2, 2005 2:09 PM
Answers
-
That could happen if the DLL has been loaded in memory. So you would need to shutdown the hosting process or EXE. This can be the Visual Studio IDE or the executable thats using this DLL.
Shutting down the hosting process should solve ur problem.
Regards,
VikramThursday, June 2, 2005 4:02 PM
All replies
-
Do you have the VB6 project [or any other project which consumes your .NET DLL] open ? Close the project and try again.
Or else, if the DLL is consumed by an executable, close it before registering.
Hope this helps.
-Praveen.Thursday, June 2, 2005 2:19 PM -
That could happen if the DLL has been loaded in memory. So you would need to shutdown the hosting process or EXE. This can be the Visual Studio IDE or the executable thats using this DLL.
Shutting down the hosting process should solve ur problem.
Regards,
VikramThursday, June 2, 2005 4:02 PM -
I could delete the .tlb file; but still I get the same error:
RegAsm error: An error occurred while saving the exported type library: Access i
s denied.any clues??
Thanks
Advait
Friday, July 28, 2006 11:47 AM -
Can you give any example process file name. What is hosting process name?Tuesday, August 7, 2007 7:42 AM
-
I was getting this error and I realized I was directing my tlb output to a file type of .dll. Make sure you are not doing something dumb like I was. It generates this error, not something more descriptive. So double check all your syntax if you are encountering this. Just posting for everyone else.
- Proposed as answer by o_q Monday, August 13, 2012 3:07 AM
Tuesday, February 26, 2008 5:17 PM -
I was also trying to register using /tlb:myassembly.dll
The assembly was registered ok after changing it to /tlb:myassemply.tlb instead.
Rgds
FedericoMonday, September 22, 2008 12:39 PM -
You saved my day! Thank you:)Tuesday, December 16, 2008 5:33 PM
-
I don't know what caused it, but deleting the tlb allowed me to create the new one.
HTH,
Brad.Friday, November 20, 2009 2:48 AM -
I was the dumb too LOL. Thanks man.Monday, August 13, 2012 3:08 AM
-
Thanks, you helped me...Tuesday, May 14, 2013 9:51 AM