Skip to main content

Getting Started with C# Hosting

Deploy your C# (.NET) applications on ShardCloud with minimal configuration and maximum performance.
ShardCloud supports .NET applications with automatic build and execution via dotnet run or direct .dll execution.

Prerequisites

Before uploading your C# application, ensure you have the following project structure ready.

Required Files

Essential files for deployment

Excluded Files

Files to exclude before upload

Required Files

Your C# application must include these essential files:

1. Project or Entry Point File

You can deploy using one of these options:

2. ShardCloud Configuration

  • File: .shardcloud
  • Purpose: Platform-specific deployment settings
  • Requirements: Plain text configuration file in root directory
The .shardcloud file is required. Missing this file will prevent successful deployment.

Deployment Options

Upload your source code with the .csproj file and let ShardCloud build and run it automatically. Required files:
  • *.cs source files
  • YourApp.csproj
  • .shardcloud
Files to exclude:
  • bin/
  • obj/
  • .vs/
  • *.user

Option 2: Upload Pre-built DLL

Upload your compiled application directly. Required files:
  • YourApp.dll (and dependencies)
  • .shardcloud

ShardCloud Configuration

The .shardcloud file configures your application deployment settings.

Configuration Example (Source Code)

Configuration Example (Pre-built DLL)

.NET applications typically require more memory than interpreted languages. Choose appropriate memory allocation for your application’s needs.

Deployment Process

1

Prepare Application

Ensure your project compiles locally with dotnet build
2

Create Configuration

Create .shardcloud file with deployment settings
3

Exclude Unnecessary Files

Remove bin/, obj/, and .vs/ folders (if uploading source)
4

Create Archive

Zip or RAR your project
5

Upload via Dashboard

Use ShardCloud dashboard to upload your archive
6

Deploy & Monitor

Application automatically builds (if needed) and runs

Common Configuration Examples

ASP.NET Core Web API

Console Application

Pre-built Application