Integrating the OpenAccess enhancer
Sitefinity ships with the latest version of OpenAccess. To use it in the data provider of a module, you must integrate the OpenAccess enhancer by performing the following:
- From the context menu of the project LocationsModule, click Unload Project.
- From the context menu of the unloaded project, click Edit LocationsModule.csproj.
-
Find the following line:
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-
Add the following lines of code after the aforementioned line:
<ProjectExtensions>
<VisualStudio>
<UserProperties OpenAccess_EnhancementOutputLevel="1" OpenAccess_UpdateDatabase="False" OpenAccess_Enhancing="False" OpenAccess_ConnectionId="DatabaseConnection1" OpenAccess_ConfigFile="App.config" />
</VisualStudio>
</ProjectExtensions>
<PropertyGroup>
<OpenAccessPath>C:\Program Files (x86)\Telerik\Sitefinity 4.1\SDK\Content\Common\Dependencies</OpenAccessPath>
</PropertyGroup>
<Import Condition="Exists('$(OpenAccessPath)\OpenAccess.targets')" Project="$(OpenAccessPath)\OpenAccess.targets" />
In the OpenAccessPath element you must place the path to the folder containing the OpenAccess.targets file. This file is installed together with Sitefinity SDK. It is placed in the SDK\Content\Common\Dependencies folder in the Sitefinity installation folder.
- Save the changes.
- From the context menu of the project, click Reload Project.
For more information, see Integration with OpenAccess Enhancer.
NOTE: If you are using Sitefinity 4.0 SP1 or prior, see Custom Modules for Sitefinity 4.0.