ClickOnce and .NET Memory Profiler
ClickOnce and .NET Memory Profiler
Hello there,
I'm evaluating .NET Memory Profiler and I was wondering what are my options to profile ClickOnce application running in production. It's .NET 2.0 application.
Can I use NmpCore.exe, if so what would be the correct substitution for a path?
Thanks,
- ngm
I'm evaluating .NET Memory Profiler and I was wondering what are my options to profile ClickOnce application running in production. It's .NET 2.0 application.
Can I use NmpCore.exe, if so what would be the correct substitution for a path?
Thanks,
- ngm
-
- Posts: 1030
- Joined: Wed Mar 02, 2005 7:53 pm
Re: ClickOnce and .NET Memory Profiler
There is no option for launching a ClickOnce application from the profiler. However, it is still possible to profile a ClickOnce application by profiling the "AppLaunch" program using the "Profile Application" command. To profile your ClickOnce application using AppLaunch you will need to specify which application to launch by providing the correct command line arguments. You can retrieve the command line argument by launching the ClickOnce application and then use the Task manager to extract the command line. For example, you can perform the following to start profiling your application.
- Start your ClickOnce application outside of the profiler (e.g. by clicking a link on your website)
- Start the Task manager, and include the "Command line" column (right click on the columns and choose "Select columns").
- Locate the AppLaunch process and select it in the process list (hopefully there will be only one)
- Copy the AppLaunch info and paste it into an empty text document.
- Now you will see the path to the AppLaunch process and the necessary command line arguments.
Code: Select all
NmpCore /p C:\Windows\Microsoft.NET\Framework\v2.0.50727\AppLaunch.exe /activate "http://clickoncesite.com/ClickOnce.application#ClickOnce.application, Version=2.0.0.5, Culture=neutral, PublicKeyToken=8ee76d1b2ac326f8, processorArchitecture=msil/ClickOnce.exe, Version=2.0.0.5, Culture=neutral, PublicKeyToken=8ee76d1b2ac326f8, processorArchitecture=msil, type=win32"
Best regards,
Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
SciTech Software AB
Re: ClickOnce and .NET Memory Profiler
Hello Andreas,
No luck here.
Our ClickOnce application starts with original *.exe process instead of AppLaunch.exe, that's probably because it works under full-trust.
Although I extracted full application name from the *.appref-ms I was unable to start it via AppLaunch.exe:
AppLaunch.exe /activate "http://server/Deploy/MyApplication.appl ... pplication, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx, processorArchitecture=x86"
I get "Error: An unexpected error occured -- The parameter is incorrect."
I tried adding version and type in the full application name string above like you've got in yours, but that didn't help either.
Also I tried altogether with NmpCore.exe but it resulted with the same error from AppLaunch.exe.
Please advise.
Thanks,
- ngm
No luck here.
Our ClickOnce application starts with original *.exe process instead of AppLaunch.exe, that's probably because it works under full-trust.
Although I extracted full application name from the *.appref-ms I was unable to start it via AppLaunch.exe:
AppLaunch.exe /activate "http://server/Deploy/MyApplication.appl ... pplication, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx, processorArchitecture=x86"
I get "Error: An unexpected error occured -- The parameter is incorrect."
I tried adding version and type in the full application name string above like you've got in yours, but that didn't help either.
Also I tried altogether with NmpCore.exe but it resulted with the same error from AppLaunch.exe.
Please advise.
Thanks,
- ngm
-
- Posts: 1030
- Joined: Wed Mar 02, 2005 7:53 pm
Re: ClickOnce and .NET Memory Profiler
If you are running the application under full trust, then the AppLaunch program is not used. Still you should be able to use the Task manager to get the path to the ClickOnce executable and then run the executable directly. I was able to run my test application using the command line:
Note that I forgot to include the "/r" argument in my last post. The /r argument is needed when profiling a pre-.NET 4.0 process.
Code: Select all
NmpCore.exe /r /p "C:\Users\Andreas\AppData\Local\Apps\2.0\LPCGQJE1.QK1\ZZ5A43J8.KQ1\clic..tion_8ee76d1b2ac326f8_0002.0000_df0839630f7d138f\ClickOnce.exe"
Best regards,
Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
SciTech Software AB
Re: ClickOnce and .NET Memory Profiler
Andreas,
That's what I did at the very beginning, then the application didn't load completely because it uses user.config settings it was unable to find when starting directly like this.
Anyway, I know my options now. Will try some workaround.
Thank you for assistance.
- ngm
That's what I did at the very beginning, then the application didn't load completely because it uses user.config settings it was unable to find when starting directly like this.
Anyway, I know my options now. Will try some workaround.
Thank you for assistance.
- ngm
Who is online
Users browsing this forum: No registered users and 9 guests