Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

102
Vistas
.NET Core 6.0 standalone binary compilation

I'm trying to create a .NET Core 6.0 binary as a standalone, with all dependencies packaged in one .exe file.

The trouble I am having is that whilst the binary compiles ok it is reliant on the DLLs placed in the Release/Debug folder.

I have tried compiling from the command line with

dotnet publish --standalone

but in that instance I just get a similar issue with a load more DLLs and the binary itself is the same size and needs to be in that folder to run.

Is what I'm looking for even possible and if so how can this be achieved? I have tried with Visual Studio, dotnet cli and Rider so far.

There are a number of old solutions that mention solutions such as ilmerge but this appears to have been long since deprecated and is no longer maintained.

-- EDIT for future me:

Final solution looked like this, thanks to Andrew's answer below.

My final project.csproj file looked like this based on MS Docs

<PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net6.0-windows</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <PublishSingleFile>true</PublishSingleFile>
    <EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
    <PublishReadyToRun>true</PublishReadyToRun>
</PropertyGroup>

Publish either via Visual Studio GUI or:

dotnet publish -c release -r win-x64
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I'd suggest looking at https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file which should hopefully be up to date. I believe the key bit is <PublishSingleFile>true</PublishSingleFile> in the .csproj.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda