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:| MAIN Value | Execution Command | Use Case |
|---|---|---|
MyApp.csproj | dotnet run --project MyApp.csproj | Upload source code, platform builds and runs |
MyApp.dll | dotnet MyApp.dll | Upload pre-built DLL |
auto or empty | Auto-detect .dll in bin/ folder | Let platform find your DLL |
| (omitted) | dotnet run | Run from project root |
2. ShardCloud Configuration
- File:
.shardcloud - Purpose: Platform-specific deployment settings
- Requirements: Plain text configuration file in root directory
Deployment Options
Option 1: Upload Source Code (Recommended)
Upload your source code with the.csproj file and let ShardCloud build and run it automatically.
Required files:
*.cssource filesYourApp.csproj.shardcloud
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
Upload via Dashboard
Use ShardCloud dashboard to upload your archive
