7

I have developed a COM+ Component in C# be inheriting ServicedComponent. Here is how it looks like:

    [Transaction(TransactionOption.Required)]
    [ClassInterface(ClassInterfaceType.AutoDual)]
    [EventTrackingEnabledAttribute(true)]
    [JustInTimeActivation]
    [ObjectPooling(Enabled = true, MinPoolSize = 10, MaxPoolSize = 30, CreationTimeout = 15000)]
    [Synchronization]

    class MyComponent: System.EnterpriseServices.ServicedComponent
    {
        [AutoComplete(true)]
        public string getHello()
        {//2nd breakpoint
            ContextUtil.SetComplete();
            return "HelloWorld";
        }
    }

I have another test project from which I call this component.

class Program
{
static void Main(string[] args)
{
MyComponent myComp = new MyComponent();
myComp.getHello();//1st Breakpoint
}
}

I am not able to reach 2nd Breakpoint. This was working before I switched to VS 2012. Strange thing is after switching to 2012 its no longer working in VS 2010 too.

I've already tried,

  • Attach to process
  • Unchecked "Enable Just My Code" in debug settings

Can someone please give direction from here?

UPDATE 1

From the links given by Mike, I tried symchk for my DLL in the same folder where DLL and PDB files were there. It fails with error saying PDB mismatched or not found. I don't know how to resolve this error.

Eternal Noob
  • 2,717
  • 5
  • 27
  • 41

1 Answers1

5

You may be missing the .pdb file in your project.

Check this microsoft link out for an explanation: https://msdn.microsoft.com/en-us/library/yd4f8bd1(vs.71).aspx

TopBanana9000
  • 818
  • 2
  • 14
  • 32
  • 1
    When I build the project, I see the .pdb file in my debug folder. Is there a way I can check if that's linked properly while debugging? – Eternal Noob Jul 10 '15 at 17:54
  • 1
    This is probably unlikely, but another thing that can cause this is having an outdated .dll in your GAC. I am not sure if you can check to see what the linker is using. My experience has been missing pdb. Here is a more robust article on the topic: https://msdn.microsoft.com/en-us/library/windows/desktop/ee416588(v=vs.85).aspx - Sorry, wish I could be of more help – TopBanana9000 Jul 10 '15 at 17:58
  • 1
    Thanks for the links, I'll go through them and see if that helps! – Eternal Noob Jul 10 '15 at 18:03
  • symchk failed with mismatch or no files found error. :( – Eternal Noob Jul 20 '15 at 17:02