on 04-10-2007 10:33 AM
Hi all
i'm trying to use the B1 .NET Profiler on my addon. i've ran the start profiling and stop profiling before opening the B1 .NET Profiler window. after opening B1 .NET Profiler window i pressed the test button and some lines appeared in window. but when running my addon no subsequent line appears.
question is why doesn't the profiler window show any lines regarding the actions done in my addon?
appreciate the help
Yoav
Did you try without VS.NET ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I don't understand why it does not work.
Here you have the detailed steps:
1. Call StartProfiling menu in All Programs -> B1 -> Test Tools -> .NET Profiler -> Start Profiling
2. Go to environment variables and press ok to have the value of COR_ENABLE_PROFILING set to 1
2. Start Visual Studio
3. Start .NEt Profiler window
4. Call start profiling in .NET Profiling window
4. Start your addon
And it still doesn't work??
I'm experiencing the same issues as the others!
This is VERY frustrating!
1. The 'Test B1Profiler' sample application profiles well
2.a. Our AddOn doesn't profile, it shows nothing, when started from VS2005
2.b. Our AddOn doesn't profile when started from SBO as an AddOn
3. I also tried sample: SDK\Samples\COM UI\CSharp\01.HelloWorld. It doesn't show anything in the profile window
4. I also tried to start everything from the command line, too, with:
set Cor_Enable_Profiling=0x1
start /wait OurAddOn.exe
This didn't work either.
We are using Business One 2005 SP1 pl29
I am SURE this .NET profiler worked in the past. Maybe there is a problem with DLL versions? Maybe only the 'old' (SP0) DLLs are profiled? I think it worked with SBO 2005 SP0 a year ago when I tried this.
Also, what I have noticed:
Where the B1 Profiler works, there is a file next to the AddOn exe:
Interop.SAPbouiCOM.dll - 94208 bytes (version: 6.7.0.0)
Where the B1 Profiler doesn't work:
Interop.SAPbouiCOM.dll - 147456 bytes (version: 6.8.0.0)
So, somehow, these DLLs are different. It doesn't matter if I build the application in Debug or Release mode, the Interop size is the same. You can get the version of the file by right-clicking on file, properties then the Version tab, and Product Version.
I think I have diagnosed the problem. Now it is up to SAP to fix it!
The problem is that the SAP .NET profiler only works with .NET 1.0/1.1 applications, but not 2.0. This is because Microsoft has changed their profiling API. Profilers need to be updated, or else they won't work!
SAP documentation states:
<i>"This first part is a dynamic library, called B1Profiler.dll. It is a COM C++ library and implements the 2 standard interfaces required by .NET run-time to profile execution.
- ICorProfilerInfo
- ICorProfilerCallBack</i>"
The Microsoft comment, see URL: http://msdn2.microsoft.com/en-us/library/bb384576.aspx
<i>"Profiling Changes in the .NET Framework 2.0
The profiling API was enhanced in the .NET Framework version 2.0 to provide additional capabilities. The new functionality is exposed through two new interfaces: ICorProfilerCallback2 and ICorProfilerInfo2.
<b>A profiler DLL that was written for the .NET Framework version 1.0 or 1.1 will not work correctly in the .NET Framework 2.0 common language runtime (CLR) environment.</b> To update your profiler DLL to work with version 2.0, you must implement the ICorProfilerCallback2 interface. The ICorProfilerInfo2 interface inherits from the ICorProfilerInfo interface and introduces new methods that support enhanced interaction with the CLR. "</i>
OK. If the test button works, it means that the installation is correct and that
your B1 .NET Profiler is working.
Did you start VS.NET before you started the Profiler ? Consider that the Profiler
sets some environment variables. If you start VS.NET before, then when starting
your add-on, this gets inherited the old variables and then it does not activate
the profiling.
Anyway, you don't need VS.NET for profiling. Try this sequence:
1. start profiling
2. run the B1 .NET Profiler Window
3. Click on "Profile in B1 .NET Profiler Window"
At this point you should see the window as attached and you can then start your
addon. Profiling data will appear in the profiling window.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gianluigi
thanx for the tip . but it still isn't working.
you said i don't need to use the vs 2005. but i do need it because i run the addon from it (in debug mode).
do you mean that in order for me to view the addon in the profiler i have to install it as part of SBO and run it from there?
appreciate the help
Yoav
Hi Yechiel,
In order to have your addon profiled you need to follow the steps:
1. Call <b>Programs -> SAP Business One -> Test Tools -> .NET Profiler -> Start Profiling</b> menu
2. <b>Start your addon</b> (if you are running it from VS then you need to start VS after step 1)
3. <b>Start .NET Profiler window</b>
4. <b>Call Start Profiling in the .NET Profiler window</b>
5. Call Programs -> SAP Business One -> Test Tools -> .NET Profiler -> Stop Profiling menu (don't forget to call it at the end otherwise all applications run after the start call will be profiled and your computer will have performance problems)
Are these steps exactly the ones you are following?
Regards
Trinidad.
A few questions:
Is your add-on a .NET add-on ?
How do you start it ? from B1 or stand-alone ?
Which are the lines that appears in the window ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.