Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7853635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:45:22+00:00 2026-06-02T19:45:22+00:00

Is there any where to get the CLR ID at runtime for the current

  • 0

Is there any where to get the CLR ID at runtime for the current application? I am monitoring my system using Performance Monitors and the name used for the instance is:

ApplicationName.exe_p4952_r15_ad1

I can get all other parameters programmatically but not the r15 which is the runtime ID of the common language runtime (instance) that executes your code. I noticed it is always 15, but it is best to get it dynamically to avoid complications.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:45:24+00:00Added an answer on June 2, 2026 at 7:45 pm

    You can get the whole “suffix”, i.e. the part after Application.exe using the same infrastructure that the .NET framework (e.g. the peformance counters) does.

    There is the method System.Runtime.Versioning.VersioningHelper.MakeVersionSafeName, which can do that. Note that the method is described as being “Infrastructure” and “This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.”, but nevertheless is public. I don’t think there is any “better supported” way to get the information you want. At least it is more robust and resilient to future changes, then reverse engineering the information based on documentation.

    string suffix = System.Runtime.Versioning.VersioningHelper.MakeVersionSafeName("",                         
        System.Runtime.Versioning.ResourceScope.Machine,
        System.Runtime.Versioning.ResourceScope.AppDomain));
    

    This returns _p4472_r16_ad1, for example.

    Of course, you could also directly pass the basename of the performance counter to directly get the full name. The usage of the empty string above is only a trick to just get the “suffix”.

    string str = VersioningHelper.MakeVersionSafeName("Application.exe",
        ResourceScope.Machine, ResourceScope.AppDomain);
    
    // str -> "Application.exe_p4472_r16_ad1".
    

    The class VersioningHelpers also has the private method GetRuntimeId(), but given the above, I don’t think it is neccessary to use reflection on that achieve what you need.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any get() function for this instead? {% for key, value in choices.items
Is there any to get the an AUTO_INCREMENT field of a InnoDB to start
Is there any to get the entire remote repository, say from http://repo1.maven.org/maven2/ , to
Is there any apt-get -like program for use with Cygwin? I've already tried cyg-apt
Is there any way to get the effect of running python -u from within
Is there any way to get the location of a cell phone (i.e. latitude/longitude)
Is there any way I get get the size of an NSWindow (in pixels)
Is there any way to get the local end point of a connected Silverlight
Is there any way to get a map or other data structure of the
Is there any way to get just a part from MySql cell and ignore

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.