locked
Error While Installing Customer Portal CRM 2011 On-Premise RRS feed

  • Question

  • Hi All,

        Can anyone Please help me in solving the below ERROR while building the Customer portal for On-Premise Version. I did all customizations and while building the website in Visual studio 2010 I got this error

    Error 3 The type 'Microsoft.Xrm.Client.CrmEntity' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Xrm.Client, Version=5.0.1.0, Culture=neutral, PublicKeyToken=d25d1a4517cc3fd4'. C:\Users\Administrator\Downloads\CustomerPortal\Web\Controls\EventCalendar.ascx 24 

    Can AnyOne please Help me.

    Thanks in Advance

    Jayakrishna

     

     

    Tuesday, May 3, 2011 1:44 PM

Answers

  • That is the correct version.  Some assembly is requiring version 5.0.1 (assuming you are having the exact same error as above).  Here is how I have validated the dependencies.  I open Visual Studio Command Line, then run ildasm.  I then opened the microsoft.xrm.portal.dll file, then doubdle-clicked on MANIFEST.  Here is the section of the file that requires the 5.0.2 microsoft.xrm.client.dll:

    .assembly extern Microsoft.Xrm.Client
    {
      .publickeytoken = (31 BF 38 56 AD 36 4E 35 )                         // 1.8V.6N5
      .ver 5:0:2:0
    }

    Notice the .ver 5:0:2:0.  That is what it is supposed to be.  The earlier release of the SDK had 5:0:1:0 in that, which then brought in the 5.0.1 client SDK.  From the error message, you have at least one assembly in your website that depends on 5.0.1 client SDK and you need to find it.  Check your xrm project and ensure that you also have updated the project references there too - perhaps your xrm project is using the old assembly and your new website is using the new assembly.  Both need to be compiled with the same version.  At any rate, check all the manifests for each of the assemblies in your bin folder. 


    Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com
    • Proposed as answer by Palak Kadakia Monday, May 23, 2011 7:42 PM
    • Marked as answer by Palak Kadakia Monday, January 23, 2012 2:29 AM
    Tuesday, May 17, 2011 3:46 AM
    Moderator
  • I had the same issue.  It turns out the web solution .dlls do not come pre-compiled (or at least they were not properly compiled when they were included in the release).  Open the solution in VS 2010, set the compile target to 'Release' and then compile.  Your .dlls should then be properly generated.
    • Marked as answer by Palak Kadakia Monday, January 23, 2012 2:29 AM
    Friday, June 3, 2011 2:58 PM

All replies

  • Do you have a reference to Microsoft.Xrm.Client in your project?  Is it in the bin folder? 
    Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com
    Saturday, May 7, 2011 4:05 AM
    Moderator
  • Hi Shan McArthur,

              Yes, I have  Microsoft.Xrm.Client.dll with th same version in the error in my project and  while building the website it shows the following error.

     

    Error  The type 'Microsoft.Xrm.Client.CrmEntity' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Xrm.Client, Version=5.0.1.0, Culture=neutral, PublicKeyToken=d25d1a4517cc3fd4'. C:\Users\Administrator.CRM5DEMO\Desktop\CustomerPortal\Web\Controls\EventCalendar.ascx 24 

    can u please help me in Solving this.

     

    Thanks,


    JayakrishnaK
    Saturday, May 7, 2011 7:28 AM
  • Sounds like you downloaded the first 5.0.3 SDK.  We identified that a file was missing and it was re-published.  Please download it again and you will find that error go away.
    Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com
    Saturday, May 7, 2011 10:58 PM
    Moderator
  • Hi,

    I downloaded the SDK 5.0.3 and referneced the new Microsoft.Xrm.Client.dll still i am having the same issue.

    Tuesday, May 17, 2011 2:41 AM
  • This was a problem with the first deployment of 5.0.3 but was resolved.  I still think you have an older download, but there is an easy way to verifiy.  Can you tell me what the version number on the Microsoft.xrm.portal.dll file is in the bin folder of your SDK?  And double check your website's bin folder to validate it is the same version number.


    Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com
    Tuesday, May 17, 2011 2:49 AM
    Moderator
  • its 5.0.2.0 version in both places.
    Tuesday, May 17, 2011 3:16 AM
  • That is the correct version.  Some assembly is requiring version 5.0.1 (assuming you are having the exact same error as above).  Here is how I have validated the dependencies.  I open Visual Studio Command Line, then run ildasm.  I then opened the microsoft.xrm.portal.dll file, then doubdle-clicked on MANIFEST.  Here is the section of the file that requires the 5.0.2 microsoft.xrm.client.dll:

    .assembly extern Microsoft.Xrm.Client
    {
      .publickeytoken = (31 BF 38 56 AD 36 4E 35 )                         // 1.8V.6N5
      .ver 5:0:2:0
    }

    Notice the .ver 5:0:2:0.  That is what it is supposed to be.  The earlier release of the SDK had 5:0:1:0 in that, which then brought in the 5.0.1 client SDK.  From the error message, you have at least one assembly in your website that depends on 5.0.1 client SDK and you need to find it.  Check your xrm project and ensure that you also have updated the project references there too - perhaps your xrm project is using the old assembly and your new website is using the new assembly.  Both need to be compiled with the same version.  At any rate, check all the manifests for each of the assemblies in your bin folder. 


    Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com
    • Proposed as answer by Palak Kadakia Monday, May 23, 2011 7:42 PM
    • Marked as answer by Palak Kadakia Monday, January 23, 2012 2:29 AM
    Tuesday, May 17, 2011 3:46 AM
    Moderator
  • I had the same issue.  It turns out the web solution .dlls do not come pre-compiled (or at least they were not properly compiled when they were included in the release).  Open the solution in VS 2010, set the compile target to 'Release' and then compile.  Your .dlls should then be properly generated.
    • Marked as answer by Palak Kadakia Monday, January 23, 2012 2:29 AM
    Friday, June 3, 2011 2:58 PM