Starts in:
2 DAYS
0 HR
15 MIN
24 SEC
Starts in:
2 D
0 H
15 M
24 S
Open Closed

How we can get current abp app version and show it to in UI #883


User avatar
0
safi created

Hi,

I want to show current abp version into my application so is there any way to get this. Please let me know.

Thanks,


4 Answer(s)
  • User Avatar
    0
    Moyaoxiang created

    Hi safi, You can get the file version through GetFileVersion() and return it to the front-end page.

    var version = typeof(AbpModule).Assembly.GetFileVersion();
    

  • User Avatar
    0
    safi created

    Hi

    We are adding this code into Host project and all pages are available into Blazor project so If I am adding this into host so I am getting version but If I am adding the same code into blazor then getting error like FileVersion is not supported error in console so please suggest me.

    Thanks,

  • User Avatar
    0
    alper created
    Support Team Director

    Maybe Blazor didn't implement this because it runs in your browser. Also Blazor is a client and you also have a host. So these projects have different versions. The best practise is storing Blazor client version in a const variable and get the host version via API call. Create a new application service like ApplicationInfoAppservice and return the version from this service...

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06