Search code examples
.netvisual-studiodynamics-crmdynamics-crm-2011crm

The type or namespace name could not be found in Developing Dynamics CRM 2011


I had to do some reverse engineering. Anyways, I developed a plugin for Dynamics CRM 2011 based on the decompiled plugin. Refer to this link. I create a new Class Library, I solved most of error. But some errors exist,One of them is the most repeated ! Everywhere that entity repository has called,for example for QuoteProduct Entity :

QuoteProductRepository quoteProductRepository = new QuoteProductRepository(context);

The compiler says :

Severity    Code    Description Project File    Line    Suppression State
Error   CS0246  The type or namespace name 'QuoteReceiptStepRepository' could not be found (are you missing a using directive or an assembly reference?)    

What Reference Should I add to the project?


Solution

  • From its usage, we can see that QuoteProductRepository is a class. Since it's not a Microsoft\Dynamics CRM class, it must be a third-party piece of code that was used on the original .dll you decompiled.

    I see two options here:

    1. It's declared inside a namespace on the .dll you decomplied. If so, look for it there.
    2. It's declared on another .dll, that was referenced by the .dll you decompiled. In that case, you need to get this other .dll to see its implementation.