Back to Raja's Blog
Raja's Blog
Posted:
Wednesday, May 26, 2010
So I just got the following error:
Error 1 Cannot register assembly "C:\...Classes.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\Record' is denied.
This one seemed obscure enough to write down. I just set up a new workstation running Windows 7 and Visual Studio 2010. I've got a class library that I built in Visual Studio 2005 and it compiled fine in VS 2005. I opened the project in VS 2010; the funny thing is, that it compiled fine the first time. I then attempted to include it in a web project, added my library as a resource and built the entire thing. It failed with
Cannot register assembly "C:\...Classes.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\Record' is denied. I poked around for a few minutes on Google and MSDN. Saw a lot of suggestions that didn't apply to me but saw one, gave it a try and got lucky.
In my class library under Project > Project Properties > Compile I UNCKECKED COM Interop. After this, the thing compiled fine. I don't plan on needing Com Interop for this library so this is not a problem for me. Hope this helps.
Happy Coding, Martin Welch
|