Preparing your working environment

Before you create your module, you must setup your work environment:

Creating the project

To create the project, where you will design the custom module, perform the following:

  1. Open Visual Studio and click File » New Project…

  2. Click Other Template Types » Visual Studio Solutions » Blank Solution.

  3. In the Location input field, enter the path to the folder you want your project to be stored in.

  4. In the Name input field, enter Jobs and click OK.

  5. From the context menu of the solution, click Add » New Project…

  6. In the left pane, select Visual C# » Windows.

  7. Click Class Library and name it Jobs.

  8. Inside the created class library, delete the class automatically created by Visual Studio.

Next, you must create the folders in the project.

Creating the folder structure

To continue with the tutorial you must create the following folders inside your project:

  • Configuration

  • Data

  • Localization

  • Model

  • PublicControls

  • Resources

  • Views inside Resources
  • Services

  • Data inside Services

Adding assembly references

You must reference the following assemblies in the project:

  • System

  • System.Configuration

  • System.Core

  • System.Data

  • System.Data.DataSetExtensions

  • System.Runtime.Serialization

  • System.Web

  • System.Web.Extensions

  • System.Xml

  • System.Xml.Linq

  • Telerik.OpenAccess

  • Telerik.OpenAccess.35.Extensions

  • Telerik.OpenAccess.40.Extensions

  • Telerik.Sitefinity

  • Telerik.Sitefinity.Model

  • Telerik.Sitefinity.Resources

  • Telerik.Sitefinity.Utilities

  • Telerik.Web.UI

For more information about Sitefinity assemblies, see Referencing Sitefinity SDK.

Configuring the OpenAccess.targets path

To configure the OpenAccess.targets path in your project you must edit your project file (.csproj).

NOTE: You can not open .csproj file directly in Visual Studio. You must use an external text editor to edit it.

  1. Open the .csproj file.

  2. Add the following tags in the end of the file, before the closing </Project> tag:

    <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. 

Next steps

+1-888-365-2779
sales@sitefinity.com

Related topics:

Feedback

How useful is this article?

Tell us more

Submit
Your message was successfully sent.

We appreciate your feedback.

Your message could not be sent.

OK