Persistate

Installing the Persistate Generator add-in for Visual Studio

Hide Navigation Pane

Installing the Persistate Generator add-in for Visual Studio

Previous topic Next topic No directory for this topic  

Installing the Persistate Generator add-in for Visual Studio

Previous topic Next topic Topic directory requires JavaScript JavaScript is required for the print function Mail us feedback on this topic!  

This walkthrough takes you through the installation of the Persistate Generator add-in for Microsoft Visual Studio.  Generator works for versions from Visual Studio 2005 onwards.  It is recommended that you perform this walkthrough as an administrator user.

1.Download the PersistateGenerator-v0.6.1.exe file from the Downloads page into a scratch folder.
2.Right click the PersistateGenerator-v0.6.1.exe file and select Install. Follow the on-screen prompts to install Generator.  You may get a prompt from Windows' UAC during this process.
3.Start Visual Studio.  On the Tools menu, Persistate Generator should be visible as the top item.  If not, refer to the Troubleshooting installation problems section below.
4.Select the Persistate item on the Tools menu.  An error box will be displayed saying that Persistate could not be initialised.  This is normal, and happens because Persistate could not find any database connection details.  Click Ok.
5.The Create or Connect to Persistate Domain dialogue box appears.  Here you enter details required to create the root database holding the Persistate domain.  This dialogue allows you to manage any number of root database profiles for different Persistate domains if you so wish.   Initially, there is a single profile named "default" with all the fields blank.
Creating the root database

Creating the root database

6.Rename the default profile to a name of your choosing, and enter details into the box as follows:
Database Type.  Select the DBMS that you are using.  For the moment, only the SQL Server or MySQL types are supported.  Be aware that if you choose MySQL, you will be limited to a single database in the Persistate domain.  This is because the .Net connector for MySQL does not as yet support distributed transactions.
Database Server.   Enter the server name as required by your DBMS.  The above example shows the default instance of SQL Server Express on the host "Delilah".
Root Database.  The name of the new Persistate root database (catalog, schema) which will be created.
Integrated Security.  Check this to use integrated security with your database server, or clear it to enter credentials here.
User Name and Password.  If you clear the Integrated Security checkbox, enter appropriate credentials here.  These must have sufficient privileges to create a new database.
Create Root Database.  Set this checkbox here.  When you use this dialogue box to connect to an existing root database, then you leave this blank.
Domain Name.  A name to give to the Persistate domain object.  This is the object at the root of your entire persistent object tree, using potentially many databases, and so should reflect this.
Always Request Details.  If you check this box, then this dialogue will always be displayed when Persistate Generator starts up.  If you uncheck the box, this dialogue will not be displayed, unless Persistate could not connect for some reason.  If you hold down the shift key when starting Persistate Generator, then the dialogue will be displayed, regardless of the state of this checkbox.
7.Click The Ok button.  Persistate will create the database, including all the tables, views and stored procedures supporting the storage of metadata.  This will take a few moments.  Once finished, the main window for Persistate Generator is displayed.
The main window of Persistate Generator.

The main window of Persistate Generator.

8.Expand the Environments node on the left.  You can see that two Environments have been created.  These are the places where you create or import Packages, which are the Persistate applications.  The System environment contains only the Persistate package.  You can use the Development environment to create your own packages (though you can create any number of other environments also).  To create your first Persistate package, you can now follow the Creating and running the Device Network demonstration walkthrough.

Troubleshooting installation problems

If you don't see the Persistate option in the Tools menu, then it may not be fully installed.  To check this, select the Add-in Manager option on the Tools menu.  If Persistate Generator is not listed, then this could mean that that the add-in definition file was not correctly placed in the appropriate folder.  You can try and do this manually as follows;

1.Look for the folder Visual Studio 20xx\Addins in your Documents or My Documents folder, where xx is 05, 08 or 10 depending on the version of Visual Studio.  If you are using folders other than these to hold your add-ins, snippets, templates, etc., then this would explain why Persistate is not appearing, as the installation process looks for these folders in which to place the add-in definition file.
2.If you don't see the PersistateVs.AddIn file in your add-in folder (wherever it is), then you can add it manually, but you must edit the file first.  The file you need can be found in the C:\Program Files\Persistate\Persistate Generator folder, assuming you accepted the default installation location.  The V4.0 folder is for Visual Studio 2010, use V3.5 and V2.0 for VS 2008 and VS 2005 respectively.
3.Copy the PersistateVs.AddIn file to the Visual Studio 20xx\Addins folder, or wherever else your add-ins folder now is.
4.Edit the copied file in a text editor.  You need to alter the two <Version> sections and the <Assembly> section.  The contents  of both version sections should be set to 8.0, 9.0 or 10.0, corresponding to Visual Studio 2005, 2008 or 2010 respectively.  The contents of the assembly section should be the absolute path name of the PersistateVs.dll file in the installation folder.  by default this will be C:\Program Files\Persistate\Persistate Generator\V4.0\PersistateVs.dll.  The V4.0 folder is for Visual Studio 2010, use V3.5 and V2.0 for VS 2008 and VS 2005 respectively. The file should look similar to the following, for Visual Studio 2010.

<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<Extensibility xmlns="http://schemas.microsoft.com/AutomationExtensibility">
   <HostApplication>
      <Name>Microsoft Visual Studio Macros</Name>
      <Version>10.0</Version>
   </HostApplication>
   <HostApplication>
      <Name>Microsoft Visual Studio</Name>
      <Version>10.0</Version>
   </HostApplication>
   <Addin>
      <FriendlyName>PersistateVs</FriendlyName>
      <Description>Persistate application generator Visual Studio add-in.</Description>
      <AboutBoxDetails>For more information see http://www.persistate.com\r\n\r\nCopyright ...
      <AboutIconData>0000010006002020100000000000E8020000660000001010100000000000280100004 ...
      <Assembly>C:\Program Files\Persistate\Persistate Generator\V4.0\PersistateVs.dll</Assembly>
      <FullClassName>PersistateVs.Connect</FullClassName>
      <LoadBehavior>0</LoadBehavior>
      <CommandPreload>1</CommandPreload>
      <CommandLineSafe>0</CommandLineSafe>
   </Addin>
</Extensibility>