Introduction

The next alpha version of Starcounter 3.0.0, codenamed Nova, is available for general access.

Download Starcounter.3.0.0-alpha-20190930.zip archive with all required NuGet packages.

Please make sure to read our End User License Agreement for Starcounter Software.

Starcounter 3.0 alpha 20190930 main changes

  • Starcounter database access is now provided with a Microsoft.Extensions.DependencyInjection service.

  • Starcounter.Star.Tool is no longer required to manipulate and communicate with the database.

  • It is now possible to deploy Starcounter applications with dotnet publish command and run them in a Docker container.

  • Overall performance has been significantly improved with multiple optimizations in the communication layer between application and the database.

Dependency Injection (DI) and Starcounter

Requirements

Note: Due to the alpha state of this release we cannot provide any guarantees, but we monitor our GitHub: Starcounter/Home issue tracker and stand ready to assist with any potential issues.

Installation

Note: This section assumes that you have required operating system and .NET Core 3.0.100 SDK installed.

Binaries

  • Create a folder for Starcounter binaries, for example Starcounter.3.0.0-alpha-20190930.

  • Download Starcounter.3.0.0-alpha-20190930.zip into the folder.

  • Unzip downloaded archive into the folder.

Ubuntu 18.04

Install prerequisites.

Starcounter relies on a specific version of SWI-Prolog.

Download and unpack Starcounter binaries.

Application

Create an application folder and initialize a .NET Core console application.

All the following commands shall be executed from the StarcounterConsoleSample folder.

Setup NuGet to consume Starcounter packages feeds.

Create nuget.config file and add required package sources:

  • local, points to the Starcounter binaries folder.

  • Starcounter, points to https://www.myget.org/F/starcounter/api/v2.

NuGet tips:

  • Default NuGet.config file can be created with dotnet new nugetconfig command.

  • For more information on how to work with NuGet configurations, see this post by Microsoft.

End file should look similar to this:

Visual Studio Setup:

Visual Studio requires manual NuGet package sources configuration. For this go to the Tools → Options → NuGet Package Manager → Package Sources menu then add local and Starcounter feeds.

Note: Replace the [Starcounter.3.0.0-alpha-20190930] value with actual path to the folder with unzipped Starcounter binaries.

Add Starcounter.Nova.App package reference

Add minimal Starcounter database access

Replace content of the Program.cs file with the following:

For ASP.NET Core application:

Update Startup.cs class with the following:

Note: Starcounter works with Kestrel Web Server only. IIS and IIS Express are not yet supported.

Running with Visual Studio Code

  • Open Visual Studio Code in the application folder (from command line: code ./).

  • Restore dependencies Visual Studio Code asks for.

  • Click Ctrl + F5 to start the application.

Everything should run out of the box.

Running with Visual Studio 2019

  • Update Visual Studio 2019 to the latest version using Visual Studio Installer.

  • We checked version 16.3.0.

  • Open StarcounterConsoleSample.csproj from Visual Studio.

  • Click Ctrl + F5 to start the application.

Extra information

Before asking questions or reporting issues, please read these few lines, and maybe you will find an answer for your question.

  • Currently there is no database tooling available except the bare minimum of dotnet star new and dotnet star start commands.

  • Starting from Starcounter 3.0.0 beta, all required packages will be uploaded to one of the popular providers, such as NuGet.org, MyGet.org or GitHub Package Registry.

  • Base namespace will be changed from Starcounter.Nova to just Starcounter.

  • It is recommended to define all database classes and properties as abstract to reduce memory footprint when compared to virtual. Support for virtual properties might be removed in the future.

  • Publishing application in a single file with dotnet publish /p:PublishSingleFile=true is not yet supported.

Last updated