question

Richard Sikora avatar image
Richard Sikora asked

Are .NET Core applications used on Playfab servers?,Can .NET Core applications used on Playfab servers?

Hi,

I am using a .NET Core C# console server application and deployed it on a Playfab server. However, the build always goes into the status "Unhealthy" although I implemented the GamserverSDK and registered the HealthCallback method.

I also tested it locally with the PlayfabVmAgent (MockVmAgent.exe) combined with Docker. From the logfiles it looks like as if the command "dotnet" is not recognized by the VM.

To start my application I use a simple Powershell script which contains: "dotnet MyServerApplication.dll". For the start command I use:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -File "C:\Assets\StartServer.ps1"

Is there something I am doing wrong here or are .NET Core application not supported on Playfab servers? Do I need to start the application in a different way or do I need to include some additonal libraries maybe?

Thanks in advance.

PS: I tested the same with a .NET Framework application (.exe) and a modified start command and this worked perfectly on a Playfab server aswell locally with the Mock.

,

Hi,
I have a .NET Core C# console server application which I want to deploy on a Playfab server. However, it always runs into the state Unhealthy even though I implemented the GameserverSDK and registered the HealthCallback method.

I also tested it locally with the PlayfabVMAgent (MockVMAgent.exe) combined with Docker. Looking at the logfiles, it seems like as if the command 'dotnet' is not known by the VM.

I tried to start the server application with a powershell script that only contains 'dotnet MyServerApplication.dll'. The StartCommand looks like this:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -File "C:\Assets\StartServer.ps1"

Is there something I am doing wrong here or is this just not supported?

Thanks in advance.

PS: With a .NET Framework application (.exe) and the modified StartCommand it works perfectly fine with the Mock aswell with a real Playfab server.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
JayZuo avatar image
JayZuo answered

It seems you are using Windows as the virtual machine operating system for your build. In this scenario, PlayFab will use Windows Server Core containers to host your server (you can find the contain image here: https://hub.docker.com/_/microsoft-playfab-multiplayer). As it's pure Windows Server Core with some additional dlls (such as VC runtimes), there is on .NET Core environment built in, thus command "dotnet" is not recognized.

To solve this issue, you can either change to .NET Framework as you've tested or publish your server as self-contained. For more details, please see https://docs.microsoft.com/en-us/dotnet/core/deploying/#publish-self-contained.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.