Skip to content

Use Database Solution Tool

JamieO53 edited this page Mar 6, 2018 · 7 revisions

Return to Create DB Solution

Use Database Solution Tool

Creating a new Database Solution

In this example, we are going to create the NewSys solution with database NewDB and a single dependency DepSys.DepDB. Our solutions all live in the C:\Dev folder.

  • Navigate to the tools folder
  • Copy DbTemplate.xml as NewSys.xml
  • Open NewSys.xml in an editor

We start with:

<dbSolution>
    <parameters>
        <location>C:\Dev</location>
        <name>SampleSolution</name>
    </parameters>
    <databases>
        <database dbName="SampleDB"/>
    </databases>
    <dependencies>
        <dependency id="RootSolution.RootDB"/>
    </dependencies>
</dbSolution>

which we change to:

<dbSolution>
    <parameters>
        <location>C:\Dev</location>
        <name>NewSys</name>
    </parameters>
    <databases>
        <database dbName="NewDB"/>
    </databases>
    <dependencies>
        <dependency id="DepSys.DepDB"/>
    </dependencies>
</dbSolution>
  • Save NewSys.xml
  • Ensure that C:Dev\NewSys does not exist. Delete or rename it before proceeding
  • Open a PowerShell console in the tools folder and execute New-CiDbProject
.\New-CiDbProject.ps1 .\NewSys.xml

The new solution is in C:\Dev\NewSys

The new solution folder

Clone this wiki locally