Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

128
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda