This post was written for Xperience by Kentico v29.6.0. Please consult the documentation for any feature or API changes when using a different version. Be sure to check the System Requirements in the product documentation.

Interested in Xperience by Kentico but you recently started using macOS? Maybe even one of the super optimized ARM based Apple Silicon processors? No problem! Xperience by Kentico runs great on macOS. Read on to see how to get your environment set up.

Prerequisites

To get started developing with Xperience by Kentico on a modern Mac, we'll need to first install all the toolchain dependencies. We'll start with the list and then we'll cover any details for each one.

For each of these, you'll want to install the arm64 binaries if they are available, as these will perform the best on your M1/M2/M3/M4 Apple Silicon Mac.

Visual Studio Code

The VS Code installation should be pretty standard, but we'll want to add a few extensions to improve the .NET developer experience.

These two extensions will give us language support and the MS SQL Server extension will allow us to connect to our local SQL Server instance and run some queries in VS Code.

.NET 8 SDK

Once you install the .NET 8 SDK (which lets you author, compiled, and publish .NET applications) you can install the Xperience by Kentico .NET project templates at the command line.

You can read more about the project templates in the product documentation.

Now you can install the project templates using the following command in your terminal.

dotnet new install kentico.xperience.templates

These templates will help us quickly create a new Xperience by Kentico project with just a few commands at the terminal.

Docker Desktop

Docker Desktop (or OrbStack) will provide a visual application to manage containers and images. It will also come with some smart defaults for setting up your environment for running containers.

Both Docker Desktop and OrbStack require a license for commercial use, but you could try Colima or Podman.

Make sure you Use Rosetta for x86/amd64 emulation on Apple Silicon. to use the SQL Server container on Apple silicon.

Why are we talking about containers? Well, Xperience by Kentico depends on Microsoft SQL Server and the best way to run it on a modern Mac is using the SQL Server 2022 container, which runs on Linux, and Linux is what containers run in, even on MacOS.

We'll run two commands at the terminal. The first will pull the SQL 2022 image (the blueprint for all instances of SQL 2022 that we run) and the second will start a new instance as a container.

docker pull mcr.microsoft.com/mssql/server:2022-latest
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=Pass@12345" \
   -p 1433:1433 --name sql2022 --hostname localhost \
   -d \
   mcr.microsoft.com/mssql/server:2022-latest

The database server connection details will be the following.

  • Server Name: localhost,1433 (SQL Server uses a comma instead of a colon to separate the host from the port number)
  • Username: sa
  • Password: Pass@12345 (you can change this if you want)

We can test that our database server is up and running by using VS Code and the MS SQL Server extension to connect to it.

In VS Code, along the right side icon list, you should see an icon for the SQL Server extension. When you click it you will see a new Connections panel appear with a + Add Connection link. Click that and a dialog will appear where you can start entering the connection details above.

You can leave the optional database name value blank. For the login type you want to select SQL Login. The credentials are the ones listed above and you can save the password for convenience when prompted.

For a Profile Name you can enter something like localhost - SQL Server 2022 to help identify it in the future within the SQL Server extension Connections list.

You will be prompted to trust a server certificate, which you will want to accept.

Now you should see your new connection in the panel, which you can expand localhost - SQL Server 2022 > Databases > System Databases > master. Right click on master and select New Query.

Enter the following query into the tab that appears.

SELECT *
FROM SYS.Databases

Now press the green button to the right of the tab name and you should see a new tab with the query results appear. If everything has worked so far, you're all set to setup the Xperience by Kentico project.

Project Creation

Return to the terminal and run the following command to create a new Xperience by Kentico ASP.NET Core 8.0 code base.

dotnet new kentico-xperience-sample-mvc \
    -n DancingGoat.Web \
    -o ./DancingGoat/DancingGoat.Web \
    --allow-scripts Yes

This will setup a new code base, creating a DancingGoat.Web folder inside of a DancingGoat folder in your current directory.

Once this all completes, change directory to DancingGoat and open VS Code from that folder.

cd DancingGoat
code .

The C# DevKit should detect you are viewing a .NET project and create a DancingGoat.sln file in the DancingGoat folder.

You will want to get a license key for Xperience by Kentico which you will put into a text file named license.txt in your DancingGoat.Web folder. You can follow the instructions from the documentation to get a license key, which will be used in the next step.

Go back to your terminal and change directory into the DancingGoat.Web folder and then run the Xperience database manager which will create and populate the database for this project.

cd DancingGoat.Web
dotnet kentico-xperience-dbmanager -- \
  -d DancingGoat \
  -u sa \
  -s "localhost,1433" \
  -p "Pass@12345" \
  -a "Pass@12345" \
  --license-file "license.txt" \
  --recreate-existing-database

The -p option is the password for the database and must match the password you provided when creating the container in the previous section.

The -a option specifies the password for the administrator login to the Xperience by Kentico application.

Once all of this completes we are ready to run the application!

In VS Code, switch to the Explorer tray by clicking the Explorer icon in the left side icon list. Collapse the DancingGoat tray and expand the Solution Explorer tray. You should see a solution hierarchy DancingGoat > DancingGoat.Web.

Right click on DancingGoat.Web and select Debug > Start without debugging.

Some stuff should start displaying in VS Code and when the application starts up, a new browser tab will open to a localhost URL and show the Dancing Goat home page.

Update the URL by adding /admin to the end of it and you will be taken to the Administration login.

Use the following credentials to login.

  • Username: administrator
  • Password: Pass@12345 (this is the admin password you specified when using the kentico-xperience-dbmanager tool)

Wrap Up

Now you can check out the Xperience by Kentico Tutorial and general documentation to learn more about the product.

You can use our training guides to learn best practices and see examples of building Xperience by Kentico projects or review the blog post Learning Xperience by Kentico as a software developer.

Check out the Resource Hub here on the Community Portal for more places to continue your Kentico education.

For further reading on using Xperience with macOS, check out Kentico community member Milan Lund's blog post Setting Up a Solution for Integrating Custom Code in Xperience by Kentico on macOS

Cheers!