cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Cannot inspect Sap B1 objects while debugging in Visual Studio 2019

Former Member
0 Likes
1,280

Hello,

I am working with Visual Studio 2019 Community Edition Version 16.7.2

I have referenced the SapBusinessOneSDK.dll inside a Console Application to access SAP B1 vis DI API and I am not able to inspect the Sap B1 COM Objects while debugging.

This are the project properties of the mentioned Console App in the Debug Section:

And this are the Visual Studio Options relevant to Debugging:

How should I proceed?

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

PierreBrothier
Contributor

Hi Jean Pierre,

i got it, you'll have to add the attribute [STATThread] on you main function.


        [STAThread]
        static void Main(string[] args)
        {

Former Member
0 Likes

Wonderful! It works! Thank you.

Answers (1)

Answers (1)

PierreBrothier
Contributor
0 Likes

I,

i can reproduce the problem too. It's seems that it's more related to Visual studio 2019 behaviour than SAP B1 library.

By clicking the little icon, i can trigger evaluation of the property.

I'v no solution for th whole object to be evaluated.

Former Member
0 Likes

In a computer with both Visual Studio 2015 Community Edition and SAP B1 SDK installed it works. What version of Visual Studio are you using in your answer?

PierreBrothier
Contributor
0 Likes

Hi,

the screenshot came from Visual Studio Community 2019 version 16.7.2

We currently use Visual Studio Enterprise 2017 for our development. I Guess the switch with 2019 will wait.