Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

818
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!