Skip to content

Instantly share code, notes, and snippets.

@guitarrapc guitarrapc/Program.cs
Last active Aug 18, 2019

Embed
What would you like to do?
Single Executable with csproj
using System;
namespace SimpleSingleExecutable
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<OutputType>Exe</OutputType>
<PublishSingleFile>true</PublishSingleFile>
<IncludeSymbolsInSingleFile>true</IncludeSymbolsInSingleFile>
</PropertyGroup>
<PropertyGroup Condition="'$(SelfContained)' == 'true'">
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.