MultiConnectMultiConnectDocs Website home
MultiConnectSDK › Export to .NET

6. Create the .NET project

  1. Install the .NET SDK.
  2. Create the project:
dotnet new console -n MyGameServer
  1. Download the .NET version of MultiConnectSDK from multiconnectcloud.com/download-sdks. The Unity package's MultiConnect.dll will not work here, because it is built for Unity.
  2. Set up these folders:
Path Holds
MyGameServer/MultiConnectPlugin/MultiConnect.dll The .NET version of MultiConnectSDK
MyGameServer/MultiConnectPlugin/MultiConnectImports/ Your .mcprefab files from Section 4
  1. Replace the contents of MyGameServer.csproj with Script 6.1. It references MultiConnectSDK, and copies your prefabs next to the server when it builds.

Script 6.1: MyGameServer.csproj

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net10.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="MultiConnect">
      <HintPath>MultiConnectPlugin\MultiConnect.dll</HintPath>
    </Reference>
    <None Include="MultiConnectPlugin\MultiConnectImports\**" CopyToOutputDirectory="PreserveNewest" />
  </ItemGroup>
</Project>