Jump to content

QESTNET Internal:Developer QESTNET Changing Branches: Difference between revisions

From QESTonline
John.meegan (talk | contribs)
No edit summary
Nathan.bennett (talk | contribs)
m Update QESTLab.Data Schema: Added EntityGenerator workaround
Line 22: Line 22:
*Run '''GenerateDataSchema.ps1'''
*Run '''GenerateDataSchema.ps1'''
*Build QESTLab.Data project
*Build QESTLab.Data project
** If you receive errors similar to '' 'Source file "Entities\UserDocument100.cs" could not be found' '' at this point, right click '''EntitiyGenerator.tt''', select Run Custom Tool, then rebuild QESTLab.Data.
*Right click '''QESTLab_Data_Views.tt''' and select Run Custom Tool
*Right click '''QESTLab_Data_Views.tt''' and select Run Custom Tool
*Build QESTLab.Data project.
*Build QESTLab.Data project.

Revision as of 03:24, 25 August 2015

QESTNET

QESTNET Database

Make sure you have a correct database version, upgraded with the appropriate branch of the upgrade tool.

QESTNET Repository

Complete the following steps within GitHub to fetch the QESTNET repository:

  • Change the directory to the new qestnet folder (cd qestnet/)
  • Fetch the branch to be used for development (git fetch origin branch_name).
  • Checkout the branch (git checkout branch_name).
  • Make sure the branch is up to date by merging your local branch with the origin branch (git merge --ff-only origin/branch_name).
QESTLab Schema Generator Setup
  • Open ~\qestnet\QESTNET\QESTNET.Sessions.Lab\QESTLab.SchemaGenerator\ QESTLab.SchemaGenerator.sln.
    • Build the solution, there should be no errors.
  • Open ~\qestnet\QESTNET\QESTNET.sln
    • Open the app.config file in the project QESTNET.Service\QESTNET.
    • Edit the QESTLab_Data connection string to point to the QESTLab database you want to connect to.

      <add name="QESTLab_Data" connectionString="metadata=res://*/Spectra.QESTLab.Data.Entities.QESTLabModel.csdl|res://*/Spectra.QESTLab.Data.Entities.QESTLabModel.ssdl|res://*/Spectra.QESTLab.Data.Entities.QESTLabModel.msl;provider=System.Data.SqlClient;provider connection string="data source=ADLD0031;initial catalog=fugro_20150320_qestlab;integrated security=True;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />

  • You may need to run the scripts in the ~\qestnet\QESTNET\QESTNET.Sessions.Lab\QESTLab.SchemaGenerator\scripts folder against your database. This will install stored procs the Schema Generator uses when running the GenerateDataSchema.ps1 file later.
Update QESTLab.Data Schema

The following steps will update the QESTLab.Data schema to match the QESTLab database structure

  • Run GenerateDataSchema.ps1
  • Build QESTLab.Data project
    • If you receive errors similar to 'Source file "Entities\UserDocument100.cs" could not be found' at this point, right click EntitiyGenerator.tt, select Run Custom Tool, then rebuild QESTLab.Data.
  • Right click QESTLab_Data_Views.tt and select Run Custom Tool
  • Build QESTLab.Data project.

It is on the "to do" list to get the PowerShell script to do all the last three steps as well. This was initially a one click operation but no one can stop the inexorable march of progress.

Build QESTNET
  • Open ~\qestnet\QESTNET\QESTNET.sln
  • Build the solution. If there are only errors which start "The command mkdir and end with "NET START QESTNET exited with code 2.", continue on to the next step. Any other errors will need to be fixed before continuing.
    • Errors in QESTNET.Custom are usually due to projects related to other customer's databases being compiled. Right click any Custom projects unrelated to the current customer's database you are connected to and select "Unload Project".