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

821
Visualizações
Published version WPF .NET Core

I am looking to use the format as below, but in a .net core WPF C# application. Here is how I used to use it.

public static string GetVersion()
{
   if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
   {
      Version myVersion = ApplicationDeployment.CurrentDeployment.CurrentVersion;
      return $"Version {myVersion}";
   }
   return "Version not deployed";
}

Is there a matching process in .net core please? Thanks

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

There is a closed issue around this issue and ClickOnce deployment.

ApplicationDeployment class is not available - that class is implemented in System.Deployment assembly that is not part of .NET Core 3.1 or .NET 5.

We will have a way to expose some of the properties that the class enables, i.e. URL parameters and update status. But, that work could not be completed for .NET 5 release. We will enable it in one of .NET 6 previews. Here are the tracking issues: #27 and #53

Use of ApplicationDeployment class in your deployed ClickOnce application is not possible, but main ClickOnce experience is available. It includes: creating ClickOnce deployment (manifests), publishing the application, creating and publishing updates. Your application will get automatic update check (and update, if user accepts it) - this part is handled by ClickOnce runtime and the new Launcher tool that becomes the entry point of ClickOnce deployment for .NET Core 3.1 and .NET 5 applications.

Consequently, as for now there does not seem to be a way to do this in .NET Core directly.

over 4 years ago · Santiago Trujillo Relatório

0

You should be able to get the assembly version using System.Reflection.Assembly.GetExecutingAssembly().GetName().Version, as shown in Reading Assembly version information of WPF application

For more click-once capabilities not ported to .net core3.1/5/6, look here https://github.com/derskythe/WpfSettings

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