CRM demo issue

15 posts, 0 answers
  1. Nick Wood
    Nick Wood avatar
    126 posts
    Member since:
    Feb 2010

    Posted 02 May 2012 Link to this post

    Hi There

    Running the source for the CRM demo and I get the following issue.

    Failed to load type for module CompaniesModule.

    If this error occurred when using MEF in a Silverlight application, please ensure that the CopyLocal property of the reference to the MefExtensions assembly is set to true in the main application/shell and false in all other assemblies.

    Error was: The package downloaded successfully but an error occurred while reading the contents of the package. See the inner exception for more details..

    Please help

    Nick
  2. Teodor
    Admin
    Teodor avatar
    501 posts

    Posted 07 May 2012 Link to this post

    Hello,

    Thank you for contacting us.

    Can you please give us some more details on this:

    • Could you please try to clean and rebuild the solution? Let us know if this passes successfully.

    • Could you please examine the Inner exceptions? They should be more descriptive about what the actual error is. Also, feel free to send them over to us so that we can further investigate and provide you with solution. 

    Thank you in advance.

    All the best,
    Teodor
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Karl
    Karl avatar
    7 posts
    Member since:
    Dec 2011

    Posted 07 May 2012 Link to this post

    Same issue here. Looking a little bit deeper into the Inner Exceptions a LoaderException can be found saying:

    "Could not load file or assembly 'Microsoft.Expression.Interactions, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The requested assembly version conflicts with what is already bound in the app domain or specified in the manifest. (Exception from HRESULT: 0x80131053)"

    I have installed Blend 5 Preview. The reference in the project goes to "CRM-Path\Binaries\Microsoft.Expression.Interactions.dll" which is of version 4.0.5.0. This may cause the error.

    Since this assembly is part of PRISM I highly recommend that you update the project to use PRISM 4.1 which includes newer assemblies that are compatible with SL5 and Expression Blend 5, especially the "evil" Microsoft.Expression.Interactions.

    Regards
    Heiko

  5. Karl
    Karl avatar
    7 posts
    Member since:
    Dec 2011

    Posted 07 May 2012 Link to this post

    After replacing the assemblies the project runs smoothly. The assemblies now are:

    from PRISM 4.1:

    Microsoft.Practices.Prism (4.1.0.0)
    Microsoft.Practices.Prism.MefExtensions (4.1.0.0) 

    from C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\Silverlight\v5.0\Libraries:

    Microsoft.Expression.Interactions (5.0.5.0)
    System.Windows.Interactivity (5.0.5.0)

    Best regards
    Heiko
  6. Karl
    Karl avatar
    7 posts
    Member since:
    Dec 2011

    Posted 07 May 2012 Link to this post

    There are some more minor issues.

    Database script:
    Activity: missing field DateCreated
    Contact: missing field IsMale
    Opportunity: missing field DateCreated

    Also the Contact.IsImportantPerson field should be filled with true or false otherwise BooleanToVisibilityConverter throws an error in ContactsDetailsUserControl.xaml (shouldn't this converter handle NULL values?).

    And finally: in ContactsViewModel one should uncomment the part where the Contacts list is populated.

    :-)

  7. Teodor
    Admin
    Teodor avatar
    501 posts

    Posted 10 May 2012 Link to this post

    Hello,

    @Karl: Thank you for sharing these issues and workarounds. We will update the code as soon as we have the resource.

    @Nick: Should the Inner exception at your side as Karl's you could try to fix the issue the latest version of Blend and refer its newer assemblies. Just copying them to the Binaries folder of the solution should do the job. Let us know if the issue persists.

    Greetings,

    Teodor
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. CreativeIndy
    CreativeIndy avatar
    1 posts
    Member since:
    May 2011

    Posted 19 Nov 2012 Link to this post

    So in order to fix some of the issues described above like the expression error and the OP error you need to do a few common things. First, after downloading the zip file, right click and hit "UNLOCK" on the properties menu. THis way when you unzip the sample all of the included binaries will now be unlocked and useable. You should no longer have any errors at this point except the one that I have below.

    Error 6 RIA code generation failed to construct OpenAccess context: No metadata has been registered for class 'CRM.DataAccess.Activity, CRM.DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. (This usually indicates, that either this class is not declared persistent or it is declared persistent but not enhanced. The class was loaded from file:///C:/Projects/CRM/CRM_Dev_2012_3_1017/CRM.Web/bin/CRM.DataAccess.DLL.) CRM.Repository

    You will get this error on CRM.Repository, Companies, Dashboard, Activities, Contacts and Opportunities when you do a rebuild or build on the solution.  The only projects that build individual are the ones not listed above. Can you advise a work around for this?

    I have tried cleana nd rebuild but it fails. I have also tried bebuilding individual projects and they build fine except for the projects mentioned above. Not sure whats causing this error as I have yet to figure out a resolve by normal measures.
  9. Teodor
    Admin
    Teodor avatar
    501 posts

    Posted 22 Nov 2012 Link to this post

    Hello Charlie,

    This is very unusual behavior. Have you made any changes to the CRM solution source code? What version of Visual Studio do you use?

    Kind regards,
    Teodor
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  10. Polyana
    Polyana avatar
    2 posts
    Member since:
    Nov 2012

    Posted 03 Dec 2012 Link to this post

    Hi guys,

    I am also having the same problem.

    I'm relatively new to this, but I am trying to build (or halfway building) a project using the following:

    Silverlight 5
    Telerik OpenAccess
    Visual Studio 2010

    I wanted to create a similar page as the dashboard, using your demo as an example/template (hope this is not infringement!!).

    I had this error first:
    Error 9 Could not load file or assembly 'Microsoft.Expression.Drawing, Version=4.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) C:\Documentos\Downtime Analysis Project\Code Stuff\CRM_Trial_2012_3_1017_SourceCode\CRM\Views\MainMenuView.xaml 1 1 CRM

    But then I built and cleaned the solution, and then this error came:

    Error 6 RIA code generation failed to construct OpenAccess context: No metadata has been registered for class 'CRM.DataAccess.Activity, CRM.DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. (This usually indicates, that either this class is not declared persistent or it is declared persistent but not enhanced. The class was loaded from file:///C:/Documentos/Downtime Analysis Project/Code Stuff/CRM_Trial_2012_3_1017_SourceCode/CRM.Web/bin/CRM.DataAccess.DLL.) CRM.Modules.Companies

    Thank you for reading.


    Polyana
  11. Teodor
    Admin
    Teodor avatar
    501 posts

    Posted 04 Dec 2012 Link to this post

    Hi,

    Thank you for contacting us.

    You can freely use/change the code of the CRM demo, so don't worry about infringement regarding this one. 

    Regarding the last error you get, have you changed the CRM application's source code or you are trying it just as you have it downloaded? If there are changes in the code, feel free to send us a copy of your solution in order to check it locally and try to fix it.

    Regards,

    Teodor
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  12. Polyana
    Polyana avatar
    2 posts
    Member since:
    Nov 2012

    Posted 05 Dec 2012 Link to this post

    Hi,

    I was trying to run the demo by itself without any changes. But after understanding a few things, I am implementing on my own.

    I have other questions that I'm going to create another thread, still about this CRM demo, so I hope to meet you there.


    Regards,


    Polyana
  13. John
    John avatar
    26 posts
    Member since:
    Mar 2012

    Posted 07 Mar 2013 Link to this post

    Hello Admin,

    I'm trying latest version CRM 2013.1 not compile. IDE: VS2012 Ultimate.

    Error 7 The type or namespace name 'Web' does not exist in the namespace 'CRM' (are you missing an assembly reference?) D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\RepositoryBase.cs 6 11 CRM.Repository
    Error 16 The type or namespace name 'SalesTrend' could not be found (are you missing a using directive or an assembly reference?) D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\CompanyRepository.cs 17 84 CRM.Repository
    Error 10 The type or namespace name 'DashboardStats' could not be found (are you missing a using directive or an assembly reference?) D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\DashboardRepository.cs 13 46 CRM.Repository
    Error 8 The type or namespace name 'CRMDomainContext' could not be found (are you missing a using directive or an assembly reference?) D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\RepositoryBase.cs 12 24 CRM.Repository
    Error 13 The type or namespace name 'CRMDomainContext' could not be found (are you missing a using directive or an assembly reference?) D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\RepositoryBase.cs 16 16 CRM.Repository
    Error 12 The type or namespace name 'ContactsMetadata' could not be found (are you missing a using directive or an assembly reference?) D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\ContactRepository.cs 14 65 CRM.Repository
    Error 9 The type or namespace name 'Company' could not be found (are you missing a using directive or an assembly reference?) D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\CompanyRepository.cs 12 53 CRM.Repository
    Error 11 The type or namespace name 'Company' could not be found (are you missing a using directive or an assembly reference?) D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\ContactRepository.cs 14 41 CRM.Repository
    Error 14 The type or namespace name 'Company' could not be found (are you missing a using directive or an assembly reference?) D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\ActivityRepository.cs 17 44 CRM.Repository
    Error 15 The type or namespace name 'Company' could not be found (are you missing a using directive or an assembly reference?) D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\CompanyRepository.cs 17 48 CRM.Repository
    Error 17 The type or namespace name 'Company' could not be found (are you missing a using directive or an assembly reference?) D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\OpportunityRepository.cs 22 47 CRM.Repository
    Error 18 The type or namespace name 'Company' could not be found (are you missing a using directive or an assembly reference?) D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\ContactRepository.cs 33 42 CRM.Repository
    Error 19 The type or namespace name 'Company' could not be found (are you missing a using directive or an assembly reference?) D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\ActivityRepository.cs 41 48 CRM.Repository
    Error 20 The type or namespace name 'Company' could not be found (are you missing a using directive or an assembly reference?) D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\OpportunityRepository.cs 42 51 CRM.Repository
    Error 24 Metadata file 'D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\Bin\Debug\CRM.Repository.dll' could not be found D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Modules.Companies\CSC CRM.Modules.Companies
    Error 27 Metadata file 'D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\Bin\Debug\CRM.Repository.dll' could not be found D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Modules.Dashboard\CSC CRM.Modules.Dashboard
    Error 30 Metadata file 'D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\Bin\Debug\CRM.Repository.dll' could not be found D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Modules.Activities\CSC CRM.Modules.Activities
    Error 33 Metadata file 'D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\Bin\Debug\CRM.Repository.dll' could not be found D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Modules.Contacts\CSC CRM.Modules.Contacts
    Error 36 Metadata file 'D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Repository\Bin\Debug\CRM.Repository.dll' could not be found D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Modules.Opportunities\CSC CRM.Modules.Opportunities
    Error 1 Compiling transformation: Metadata file 'Telerik.OpenAccess, Version=2011.2.713.3, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' could not be found D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Web\CRMDomainService.tt 1 1 CRM.Web
    Error 6 A namespace cannot directly contain members such as fields or methods D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Web\CRMDomainService.generated.cs 1 1 CRM.Web
  14. John
    John avatar
    26 posts
    Member since:
    Mar 2012

    Posted 08 Mar 2013 Link to this post

    After run CRM exception error how to fix this error?

    Unhandled exception at line 1, column 1 in eval code

    0x800a139e - JavaScript runtime error: Unhandled Error in Silverlight Application Invoke operation 'GetDashboardStats' failed. The remote server returned an error: NotFound.   at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error)

       at System.ServiceModel.DomainServices.Client.InvokeOperation.Complete(Exception error)

       at System.ServiceModel.DomainServices.Client.DomainContext.CompleteInvoke(IAsyncResult asyncResult)

       at System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass30`1.<InvokeOperation>b__2c(Object )

  15. Teodor
    Admin
    Teodor avatar
    501 posts

    Posted 12 Mar 2013 Link to this post

    Hi,

    Please ensure the following before trying to build the application:

    • Before unzipping the .zip with source code right-click it and in Properties menu click Unblock button if visible. This unblocks the files in case they are blocked because of being downloaded.
    • Regarding the following error:
      Error 1 Compiling transformation: Metadata file 'Telerik.OpenAccess, Version=2011.2.713.3, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' could not be found D:\CRM_Trial_2013_1_0220_SourceCode\CRM.Web\CRMDomainService.tt 1 1 CRM.Web

      there is a file inside CRM.Web project called CRMDomainService.tt, containing a line that references older version of OpenAccess (maybe you are using newer OpenAccess?):

      <#@ Assembly Name="Telerik.OpenAccess, Version=2011.2.713.3, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342" #>

      All you need is just to find this line and replace it with the correct version of OpenAccess that you reference like:

      <#@ Assembly Name="Telerik.OpenAccess, Version=2012.2.816.1" #>
    • In order to retrieve more information about the JS error from the last post, can you please check if the browser returns any other errors? For instance you can open the developer console in Chrome and observe if in the lower right corner any errors appear?

    Hope this helps! Let us know if this issue persists.

    Kind regards,
    Teodor
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  16. Alex
    Alex avatar
    5 posts
    Member since:
    Dec 2012

    Posted 13 Mar 2013 Link to this post

    Hello,

    Thanks solved my problem.
Back to Top
DevCraft banner