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

Replaceable Class-Library for an Application

Dear Experts

There is a c# Project (class library) which has a bug. This ClassLib is referenced by an windows service. The service runs well since the bug is not really bad.

Well after I resolved the bug I have to recompile the class llibrary. Of course, I can recompile the Service and it's Setup and deinstall/reinstall the service. But it would be cool, if it is possible just to stop the service, replace the old ClassLib with the debugged one and start the Service again....ins't it?

Well i tried that and got the following message in the EventLog:
"Com object with CLSID XXXXXXXXXXXXXXXXXX is either not valid or not registered"

Is there an option in C# like in earlier times in VB the option "binary compatible"?

Many thanks for your answers
Alesch
0
alesch
Asked:
alesch
1 Solution
 
Nebulus_Commented:
You have attributes like these:

[Guid("EAA4976A-45C3-4BC5-BC0B-E474F4C3C83F")]
public interface IComYourClass
{ ... }

[Guid("EAA4976A-45C3-4BC5-BC0B-E474F4C3C83E")]
public class YourClass: IComYourClass
{ ... }

in your class library?
If the attribute is omitted, a Guid is assigned automatically.

for more info see:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconapplyinginteropattributes.asp
0
 
aleschAuthor Commented:
Nebulus, your comment helped me.

Many Thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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