cancel
Showing results for 
Search instead for 
Did you mean: 

B1 .NET Profiler doesn't seem to work

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Gianluigi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Did you try without VS.NET ?

Former Member
0 Kudos

Yes i did...

same result: after running the addon no line appear in the profiler window when i start to interact with the addon screens.

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

Last check

Have you restarted your pc?

After restart please check the environment variable COR_ENABLE_PROFILING is set to 1.

Regards

Trinidad.

former_member933888
Active Participant
0 Kudos

Hi All,

This is happening on my machine also..

AND

Our test machine also.

But the B1 Form Checker is working.

Tried; 1. Restart, reinstall, repairing dot net frame work.. result: still the same.

Regards,

Andy Quipit Sayus

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

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??

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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>

Former Member
0 Kudos

Sorry, the error was on my part!

I downloaded both the B1TE for .NET 1.1 and for .NET framework 2.0 versions, but accidentally installed the wrong one (the .NET 1.1 version).

I now reinstalled the correct one (B1TESetup_2005SP01_2.1_F2.0.zip) and everything works fine!

Answers (2)

Answers (2)

Gianluigi
Product and Topic Expert
Product and Topic Expert
0 Kudos

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.

Former Member
0 Kudos

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

Gianluigi
Product and Topic Expert
Product and Topic Expert
0 Kudos

What I meant is that you don't need VS.NET to see your profiling data. Just

start your addon out of VS.NET and see whether it gets profiled.

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

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.

Former Member
0 Kudos

Hi Trinidad

Yes, i did exactly the steps that you mentioned but still no line appear when i start using the addon. what could be causing the problem?

Gianluigi
Product and Topic Expert
Product and Topic Expert
0 Kudos

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 ?

Former Member
0 Kudos

Hi Gianluigi

my addon is a .Net add-on.

i start it from visual studio 2005

the lines in the profiler window are only those which appear when i press the test button in the profiler window .