VS2005 C#, COM and frustration ??

Hello Everyone,

I wrote a small dll in VS 2005 so that can be used in other projects, to my surprise VS 2005 C# dll cannot be used in CS 2003 projects. I thought to make a COM wrapper..I did that created a tlb file but cant register I used the tool (regasm). Below is the sample program and if someone can let me know the exact things to do to get this simple thing working.

namespace Something

{

public interface S

{

void Check(string p, out string t)

}

public class Check1 : S

{

public void Check(string p, out string t)

{

// do the code here

}

}

}

Now I have used tools like tlbimp and regasm....Can please someone suggest the exact steps. If you are wondering I have been on MSDN....

Thanks,

Harsimrat



Answer this question

VS2005 C#, COM and frustration ??

  • Patty Lau

    Harsimrat wrote:

    I wrote a small dll in VS 2005 so that can be used in other projects, to my surprise VS 2005 C# dll cannot be used in CS 2003 projects. I thought to make a COM wrapper..

    Do you mean VS 2003 You can't reference .NET 2.0 components from a .NET 1.x application. But you can dynamically load them if you configure the application to load the 2.0 CLR. Going through COM will not help.

    Harsimrat wrote:

    I did that created a tlb file but cant register I used the tool (regasm).

    What happens when you try it



  • Wang chia yu

    hello,

    When I use regasm it says types registered successfully and the entries are in registry and then it says (class not registered).

    Can someone please explain the exact way if I need to dynamically link .NET 2.0 CLR in .NET 1.1 application and how can I call the functions...

    Thanks,

    Harsimrat


  • VS2005 C#, COM and frustration ??