• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

COM Objects for ASP

I am currently developing a COM object to be used in an ASP website using a Visual C++ 2005 ATL project. My problem is that every time I build the DLL, visual studio registers the DLL on my local system. This works fine the first time, but the second time I rebuild the DLL it gives me an error because it cannot overwrite the DLL since it is registered on the system. Is there anyway to tell Visual Studio to unregistered/uninstall the DLL, build the new DLL, and register it?

Without a method like this, developing/testing my COM objects will take so much since I have to constantly manually get rid of the old DLL before I can build a new one.
1 Solution
In your project properties, in Build Events / Pre-Build Events add the command line:
regsvr32 /u dllname.dll
"cannot overwrite the DLL since it is registered on the system"

I think that it is not a problem (registering). Problem can be if something loaded such dll like for example dialog box or form or something else.

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now