Single File -

Create or edit a (e.g., targeting a folder).

Select a specific (e.g., win-x64 ); this cannot be "Portable" for single-file builds. Check the Produce single file box. Click Save and then Publish . Method 2: Editing the .csproj File Single File

Set to Self-contained (includes the .NET runtime) or Framework-dependent . Create or edit a (e

You can enable this feature either through the or by directly editing your project file ( .csproj ). Method 1: Using Visual Studio Create or edit a (e.g.

your project in the Solution Explorer and select Publish .

Add the following properties to your project's :