More in this section
Forums / Developing with Sitefinity / 'Telerik.OpenAccess.SPI.dataobjects.PersistenceCapable' is defined in an assembly that is not referenced.

'Telerik.OpenAccess.SPI.dataobjects.PersistenceCapable' is defined in an assembly that is not referenced.

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
3 posts, 0 answered
  1. AlphaZeta
    AlphaZeta avatar
    14 posts
    06 Jun 2006
    08 Mar 2012
    Link to this post

    Yesterday I was working on custom widgets which accessed custom modules(built with 4.4 new module builder). I keep running into an error when I try to access the modules collection as shown below.         

    Type speakersType = TypeResolutionService.
    ResolveType("Telerik.Sitefinity.DynamicTypes.Model.Speaker.Speakers"); //get speakers module type
    var mycollf = DynamicModuleManager.GetManager().GetDataItems(speakersType); //get actual collection of speakers modules

    Error    6    The type 'Telerik.OpenAccess.SPI.dataobjects.PersistenceCapable' is defined in an assembly that is not referenced. You must add a reference to assembly 'Telerik.OpenAccess, Version=2011.2.713.3, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342'.    C:\Program Files\Telerik\Sitefinity 4.4\Projects\handlertest2\ModuleAccess\Widgets\SpeakerDropDown\SpeakerDropDown.cs    68    13    ModuleAccess

    I have made sure all the Telerik.OpenAccess dlls are included and referenced. I even tried the forum suggestion of adding a Telerik.OpenAccess.dll  reference to the webconfig file.

    <add assembly="Telerik.OpenAccess, Version=2011.2.713.3, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342" />

    One thing I did notice is I can intellisense Telerik.OpenAccess and their is no SPI.DataObjects property so it looks like its just not part of that dll.

    Do you know how I can access Telerik.OpenAccess.SPI.
    dataobjects.PersistenceCapable? Or any other way of accessing custom modules created by the module builder?
  2. Allan Cady
    Allan Cady avatar
    1 posts
    06 May 2010
    22 Apr 2012
    Link to this post
    I'm seeing this same error.

    Visual Studio 2010
    MVC 4 Beta Mobile Application
    OpenAccess Q1 2012
  3. Grace Hallwachs
    Grace Hallwachs avatar
    144 posts
    03 Nov 2014
    26 Apr 2012
    Link to this post

    This error typically occurs when there is a problem with the version of OpenAccess that the custom module is trying to access.

    Go to the module project, right click the project name and "Unload Project". The project is now unloaded, right click the unloaded project and select "Edit .csproj file".
    At the bottom of the .csproj file you will find the path where the module is trying to find the enhancer.

          <UserProperties OpenAccess_EnhancementOutputLevel="1" OpenAccess_UpdateDatabase="False" OpenAccess_Enhancing="False" OpenAccess_ConnectionId="DatabaseConnection1" OpenAccess_ConfigFile="App.config" />
        <OpenAccessPath>C:\Program Files (x86)\Telerik\Sitefinity 5.0\SDK\Content\Common\Dependencies
      <Import Condition="Exists('$(OpenAccessPath)\OpenAccess.targets')" Project="$(OpenAccessPath)\OpenAccess.targets" />

    Enter the path to your enhancer from the SDK. Reload the module project and build it. Now the module is enhanced with the correct version of OpenAccess.
    Note in the element <OpenAccessPath> you may find a macro $(SolutionDir)..\..\..Common\Dependencies, don`t worry changing it with the full path to the enhancer.

    I hope this will help you. Write back if you encounter a problem along the way.


    Grace Hallwachs
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
3 posts, 0 answered