Create microservice in C# with Cumulocity

I tried following the instructions for the hello world microservice for c# but I always get an error

C:\microservicesdk-win-dev-latest\demo\src\demoapi\demoapi.csproj : warning NU1603: Cumulocity.SDK.Microservices 1004.12.0 depends on Newtonsoft.Json (>= 12.0.0) but Newtonsoft.Json 12.0.0 was not found. An approximate best match of Newtonsoft.Json 12.0.1 was resolved.
  Restore completed in 437,72 ms for C:\microservicesdk-win-dev-latest\demo\src\demoapi\demoapi.csproj.
C:\microservicesdk-win-dev-latest\demo\src\demoapi\demoapi.csproj : warning NU1603: Cumulocity.SDK.Microservices 1004.12.0 depends on Newtonsoft.Json (>= 12.0.0) but Newtonsoft.Json 12.0.0 was not found. An approximate best match of Newtonsoft.Json 12.0.1 was resolved.
Startup.cs(44,50): warning CS0618: 'IHostingEnvironment' is obsolete: 'This type is obsolete and will be removed in a future version. The recommended alternative is Microsoft.AspNetCore.Hosting.IWebHostEnvironment.' [C:\microservicesdk-win-dev-latest\demo\src\demoapi\demoapi.csproj]
Startup.cs(40,56): error CS1061: 'JsonOptions' does not contain a definition for 'SerializerSettings' and no accessible extension method 'SerializerSettings' accepting a first argument of type 'JsonOptions' could be found (are you missing a using directive or an assembly reference?) [C:\microservicesdk-win-dev-latest\demo\src\demoapi\demoapi.csproj]
Program.cs(24,4): error CS0103: The name 'WebHost' does not exist in the current context [C:\microservicesdk-win-dev-latest\demo\src\demoapi\demoapi.csproj]
Startup.cs(48,4): warning MVC1005: Using 'UseMvcWithDefaultRoute' to configure MVC is not supported while using Endpoint Routing. To continue using 'UseMvcWithDefaultRoute', please set 'MvcOptions.EnableEndpointRouting = false' inside 'ConfigureServices'. [C:\microservicesdk-win-dev-latest\demo\src\demoapi\demoapi.csproj]
An error occurred when executing task 'DotnetPublish'.
Error: One or more errors occurred.
        .NET Core CLI: Process returned an error (exit code 1).

Can somebody explain how I get rid of this error? I installed the latest docker version, dotnet sdk and powershell as required. I can use the ./create.ps1 command find but when I then try to build this project the error above occurs.

Any help is appreciated Greets

Hi,

I got to know about this forum today so replying today. Apologies for late reply.

I could see that you tried C# microservice SDK in the month of May. The C# Microservice SDK is compatible with .NET core 2.2 but not the latest .NET Core 3.1.

We have planned to release new version of C# Microservice SDK in 1 week. Please try with .NET Core 3.1 SDK after that, you should not get these errors.

C# microservice SDK has been released which support .NET Core 3.1 and Visual Studio 2019.
Please refer document. Please test latest given Hello World example and see you can run successfully.
https://cumulocity.com/guides/microservice-sdk/cs/