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 SDK installed locally. Download it from the official .NET website.
- A Virtus Cloud account — sign up at virtuscloud.app/login using your email or Discord.
- An active paid plan on your account. Browse plans at virtuscloud.app/plans.
.NET version
Virtus Cloud provides the following .NET versions:VERSION value | .NET version |
|---|---|
recommended | 9.0.1 |
latest | 9.0.1 |
Create your config file
Every Virtus Cloud deployment requires avirtuscloud.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
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 theSTART field is set in your config file.
- If
STARTis not set, the platform automatically runs the following two commands in sequence:dotnet restore— restores all NuGet packages declared in your.csprojdotnet run --project MAIN— builds and runs the project file specified inMAIN
- If
STARTis set, the platform executes theSTARTcommand directly, bypassing the default behavior.
Custom start command
For more information on all startup parameters, see the Config File Reference.
Required files
Your ZIP archive must include the following files:| File | Purpose |
|---|---|
virtuscloud.app or virtuscloud.config | Platform configuration |
MyApp/MyApp.csproj (or your .csproj path) | .NET project file |
Your .cs source files | Application source code |
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.Upload your project
Once your files are ready, package them into a.zip archive and upload using your preferred method.
- CLI upload
- Dashboard upload
Install the CLI
If you do not have the Virtus Cloud CLI installed, run the appropriate command for your system:To update an existing installation:
Authenticate
Retrieve your API key from virtuscloud.app/account by clicking Request API Key, then run:
Troubleshooting
The main file is invalid or corrupted
The main file is invalid or corrupted
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.Bad Memory
Bad Memory
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.dotnet restore fails
dotnet restore fails
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.