Mam napisany prosty COM+ w C#
[assembly: ApplicationName("COMp")]
[assembly: Description("Wrox Sample Application for Professional C#")]
[assembly: ApplicationActivation(ActivationOption.Server)]
[assembly: ApplicationAccessControl(false)]
namespace COMp
{
[EventTrackingEnabled(true)]
[ComVisible(true)]
[Description("Simple Serviced Component Sample")]
public class Class1 :ServicedComponent, IWitaj
{
#region IWitaj Members
public string witaj(string s)
{
System.Threading.Thread.Sleep(1000);
return "Witaj " + s + " !";
}
#endregion
}
oraz jego interface
namespace COMp
{[ComVisible(true)]
interface IWitaj
{
string witaj(string s);
}
}
Komponent jest zarejestrowany posiada mocną nazwę jest widoczny w GAC oraz w Usługach składowych.
Ale gdy próbuję go dodać do klienta wyskakuję błąd:
//A referenceto 'COMp' could not be added.
the ActiveX type library 'ścieżka do pliku tlb' was exported from a .NET assembly and cannot be added as a reference.
Add a reference to the .NET assembly instead.//
O co z tym chodzi?
Dziękuję za odpowiedzi