'Telerik.OpenAccess.SPI.dataobjects.PersistenceCapable&#

Posted by Community Admin on 04-Aug-2018 16:48

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

All Replies

Posted by Community Admin on 08-Mar-2012 00:00

All,

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?

Posted by Community Admin on 22-Apr-2012 00:00

I'm seeing this same error.

Visual Studio 2010
MVC 4 Beta Mobile Application
OpenAccess Q1 2012

Posted by Community Admin on 26-Apr-2012 00:00

Hi,

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.

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

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.

Greetings,

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

This thread is closed