Skip to main content
Virtus Cloud supports C# and .NET applications using the official .NET SDK. When you deploy your project, the platform automatically runs dotnet restore to install NuGet dependencies and then starts your application with dotnet run --project, compiling and executing your code in one step. Whether you are deploying an ASP.NET Core web API, a console application, or a background worker, this guide walks you through the full configuration and deployment process.

Prerequisites

Before you deploy, make sure you have the following:

.NET version

Virtus Cloud provides the following .NET versions:
VERSION value.NET version
recommended9.0.1
latest9.0.1
Use VERSION=recommended for all production deployments.

Create your config file

Every Virtus Cloud deployment requires a virtuscloud.app configuration file at the root of your project. Set MAIN to the path of your .csproj file, including its parent directory if applicable.

Config File Reference

Learn every available parameter — MAIN, MEMORY, VERSION, DISPLAY_NAME, SUBDOMAIN, START, and more.
virtuscloud.app
MAIN=MyApp/MyApp.csproj
MEMORY=512
VERSION=recommended
DISPLAY_NAME=My C# App
In the example above, MyApp/MyApp.csproj means the .csproj file is inside a subfolder named MyApp. If your project file is at the root of your archive, you can use just the filename: MAIN=MyApp.csproj.

Startup behavior

Virtus Cloud determines how to start your application based on whether the START field is set in your config file.
  • If START is not set, the platform automatically runs the following two commands in sequence:
    1. dotnet restore — restores all NuGet packages declared in your .csproj
    2. dotnet run --project MAIN — builds and runs the project file specified in MAIN
  • If START is set, the platform executes the START command directly, bypassing the default behavior.
Custom start command
START=dotnet run --project MyApp/MyApp.csproj --configuration Release
For more information on all startup parameters, see the Config File Reference.

Required files

Your ZIP archive must include the following files:
FilePurpose
virtuscloud.app or virtuscloud.configPlatform configuration
MyApp/MyApp.csproj (or your .csproj path).NET project file
Your .cs source filesApplication source code
The virtuscloud.app config file must be at the root of the ZIP archive. If it is inside a subfolder, Virtus Cloud cannot find it during deployment.
If your .csproj file is inside a subdirectory (which is standard for .NET solutions), set the full relative path in the MAIN field. For example: MAIN=src/MyApp/MyApp.csproj.
You do not need to include a bin/ or obj/ build output directory. Virtus Cloud compiles your project fresh at startup with dotnet run.

Upload your project

Once your files are ready, package them into a .zip archive and upload using your preferred method.
1

Install the CLI

If you do not have the Virtus Cloud CLI installed, run the appropriate command for your system:
curl -fsSL https://cli.virtuscloud.app/install | bash
To update an existing installation:
virtuscloud update
2

Authenticate

Retrieve your API key from virtuscloud.app/account by clicking Request API Key, then run:
virtuscloud login
3

Deploy

From your project directory, run:
virtuscloud upload
Or pass the path to an existing ZIP file:
virtuscloud upload my-project.zip

Troubleshooting

This error appears when the path in your MAIN parameter does not point to a valid .csproj file in your ZIP archive. Check that the directory structure and filename are correct. The path must be relative to the root of the ZIP archive — for example, MAIN=MyApp/MyApp.csproj.
The minimum RAM for a bot is 256 MB and for a website or API is 512 MB. .NET applications and the compilation step can be memory-intensive. Increase the MEMORY value in your config file if your application crashes at startup or during operation. See the LACK_OF_RAM troubleshooting guide for details.
If NuGet package restoration fails, check that all package references in your .csproj file are correct and that the packages are available on NuGet.org. Run dotnet restore locally to confirm your dependency graph resolves cleanly before uploading.
If you continue to experience issues after reviewing this guide, contact the Virtus Cloud support team.