Visual Studio 2022 (or later)

Please follow these steps to setup a new .NET Core web project with Veva.

Setup visual studio project

Launch VS (2022 at the time of this writing), and create a new project.
Choose the "ASP.NET Core Web app (Razor pages)" project template and click next.

Then configure your project, by choosing a name and a location, then click "Next".

Now we are going to make sure we select ".NET 8.0" and  "None" under "Authentication type".
We recommend that the the "Configure for HTTPS" option is selected, then click "Create".

You should now be presented with a blank web application project.

You can remove the "wwwroot" and "Pages" folders, as we will not be using those.

The next step is to add the Veva nuget packages. If you already have the Veva nuget package source registered, you can skip over the "Add nuget source" section.

Add Nuget source

First you need to make sure that you have our package feed registered as a package source. Goto "Tools -> Nuget Package Manager -> Package Manager Settings". In the dialog which pops up, click "Package sources" in the tree on the left and then click the plus button to register a new source. Give it a name, such as "Veva Packages" and set the URL to: "https://nuget.pkg.github.com/AdvaniaVeflausnir/index.json"
Hit the "Update" button and close the dialog.

When you are presented with a login window you must use a PAT (Personal Access Token) as your password. To retrieve this token you must do the following step.

  1. Log into your account on Github.com
  2. Go to Settings -> Developer Settings and there you'll find "Personal Access Token" dropdown.
  3. Click "Tokens (classic)" and click "Generate new token".
  4. Select all permissions and also make sure that there is no expiration date on the token (there is a dropdown to select the expiration limit)

Install Veva Nuget packages

Right-click the project in the solution explorer and click "Manage Nuget packages ...". Make sure that the "Veva Packages" is selected as the package source (Selecting "All" should also work, but might be slower). Search for the "Veva.Web.Essentials" package and install it. A license agreement dialog will pop-up, close it by clicking "Agree". The installation should only take a moment and after it has successfully finished, you can proceed to the next step.

The Lisa.Web.Essentials package contains one theme, which is a very minimalistic, Bootstrap based theme. At this point, you might want to consider installing alternative themes that we might have available. You can search for "Theme" in the Nuget package manager to see the selection of themes that we offer.

Modifing project files

There are a few modifications you need to make to the project files, to configure the project properly to run LiSA.

Program.cs

Start by opening the Program.cs file.

  • Add using Veva.Web;
  • Change the line var app = builder.Build(); to var app = builder.BuildVeva();

The program.cs file should look something like this after the required modifications:

First run - Setup wizard

You should now be ready to run the application for the first time. Hit F5 to run the project and you should be presented with the Veva Setup wizard, which is only run when the initial configuration has not been finalized properly (and when database migrations are needed).

Database connection

The first step is to choose which database to use. You can choose to use "LocalDB" if you have it installed on your machine, this is the easiest and quickest way to get started. The other option is to connect to an SQL Server instance.

LocalDB

If you choose this option, a database will be automatically created and the appsettings.json file will be modified accordingly.
Then click "Next".

SQL Server

If you choose to use SQL Server, you'll be prompted for the SQL Server host name and a username/password to use. Once you have specified a valid host, username and password, click the "Verify connection" button. If the information is correct and the connection is successful, you will be asked if you'd like to use an existing database or create a new database.

NOTE: If you select an existing database from the list and proceed, existing data in the database could be lost. Only use this option if you know what you are doing, most of the time it's recommended to create a new database.

Finally, you can choose which credentials you'd like Veva to use for the database connection. You can use the same credentials as you specified when connecting to the SQL Server instance, or you can choose to create a new user/password combination.

Finally, click "Next" to proceed to the next step, "User setup".

NOTE: At this point, the wizard will update the connection string setting in the appsettings.json file and the web application will be restarted for those changes to take effect. If you are running this via Visual Studio, the browser window will probably be closed and you will have to start the project up again (F5) and then the setup wizard will be launched again, and you should be taken to the next step.

User setup

Now is the time to create the default built-int SysAdmin user account which you will use to authenticate into the Veva backend. Here you will be asked to create a password for the SysAdmin user.

Then click "Next".

Website setup

The final step is to configure the first website in this Veva instance. You are prompted for a website name and an optional description. You must also select which theme the website uses, at this point the only available theme is the "Default theme" which is a part of the "Lisa.Web.Essentials" Nuget package we just installed earlier.

You can also specify bindings (host-headers) but it's usually OK to skip that at this time, the bindings can be configured later in the websites module in the backend, if required.

Click "next" and let the wizard do it's thing, which should only take a few seconds.

Done

If everything goes as expected, the configuration should now be complete and you should be presented with this screen:

At this point, the web application will be restarted again for any final configuration changes to take effect. Again, if you are running the app via Visual Studio, the browser window will be closed and you will have to start the project up again (F5), but this time you should not see the setup wizard. You should be presented with a blank website, which should look something like this:

Congratulations - you have now successfully configured your project to use Veva