Headless .NET client
Before you start, you'll need to create a Headless project on Cloud which can be done by following the instructions at umbraco.com/headless.
Be aware that the Umbraco headless is still in beta.
The Headless client nuget package is hosted on a custom MyGet feed, so you need to create a
Nuget.config file for your project which can be done via the command line. If you don't do this then you would need to use the
--source parameter and a few other tricks so it's just simpler to use a
So before you run any script for creating a project, you will need to do this in the new folder where you are creating your project (
dotnet new nugetconfig
- Edit the
Nuget.configfile, remove the
<clear/>and add our custom source, it should look like this:
<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="umbracoMyGet" value="https://www.myget.org/F/uaas/api/v3/index.json" protocolVersion="3" /> </packageSources> </configuration>
Using the client
Below are examples for various types of projects
This example is for creating a statically routed website which means that it's a normal MVC application that defines it's own routes, like a brochure website. URLs will not be dynamic.
This example is for creating a fully content managed website where URLs will be dynamic and be based on the same URLs generated in Umbraco. This also gives you the ability to Hijack routes for specific Document Types like in a normal Umbraco installation.
This example is for creating a .NET Core Console (command line) application
This example shows how to build a traditional ASP.NET Framework website on Windows and Visual Studio using the Umbraco Headless Client.