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

118
Vistas
Is csproj runtime ignored by dotnet publish?

I've been hardening our build pipelines and moved the runtime into the csproj to ensure local builds and command line build/publish (in the pipeline) have the same runtime.

However I'm now questioning myself, as the published output when publishing locally does not have the runtime in the folder path (unlike how it is documented).

If not specified, it defaults to [project_file_folder]/bin/[configuration]/[framework]/publish/ for a framework-dependent executable and cross-platform binaries. It defaults to [project_file_folder]/bin/[configuration]/[framework]/[runtime]/publish/ for a self-contained executable.

https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish#arguments

It is leading me to think that the runtime in csproj is just for nuget restores? i.e. is dotnet build --runtime [runtime] actually just passed to dotnet restore --runtime [runtime]

Whereas the runtime for dotnet publish is for the actual framework independent self-contained builds?

Background

The reason I haven't noticed this sooner is that I am doing explicit:

NuGetAuthenticate (Azure Pipeline task for authenticating private feeds) dotnet restore dotnet build dotnet publish -self-contained --no-build

I assumed the publish was using the RuntimeIdentifiers in the csproj, but I think now perhaps it's a cross platform platform build and possibly self containing under the current runtime of the build agent!

over 4 years ago · Santiago Trujillo
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