CLI What replace deprecated Bootstrap ? LO 6.02

All SDK samples use Bootstrap to connect to a running LO :

    private unoidl.com.sun.star.uno.XComponentContext m_xContext;
    /** Connect to a running office that is accepting connections.
    @return  The ServiceManager to instantiate office components. */
    private XMultiServiceFactory connect( String [] args ) 
{
    
    m_xContext = uno.util.Bootstrap.bootstrap();
    
    return (XMultiServiceFactory) m_xContext.getServiceManager();
}

But it is not working and I assume it is related to the «deprecated» note on this page

So what is supposed to be used instead now ?

I’m using LO 6.02 + SDK under an ironpython environment. I’m able to load cli_uno, cli_basetypes, cli_cppuhelper, cli_oootypes, cli_ure, cli_uretypes using clr and seem to be able to access to all other component like XComponentContext.getServiceManager().

Edit 06.04.2018 :
It looks like a pretty old issue according to this stackoverflow subject : c# - Bootstrap Uno API LibreOffice exception - Stack Overflow. Should we report it on a bug tracker or something like this ?

Edit 2 : Apparently, it is already on buggtracker https://bugs.documentfoundation.org/show_bug.cgi?id=94265

Edit 3 : adding following code allow me to apparently use uno.util.Bootstrap.bootstrap() but an object is returned instead of an XComponentContext :

# coding: utf8
import sys
import clr
import os
sys.path.append(r"C:\Program Files\LibreOffice\sdk\cli")
clr.AddReference("cli_basetypes")
clr.AddReference("cli_cppuhelper")
clr.AddReference("cli_oootypes")
clr.AddReference("cli_ure")
clr.AddReference("cli_uretypes")
from unoidl.com.sun.star.uno import XComponentContext
lo_path = r"C:\Program Files\LibreOffice\program"

if lo_path not in os.environ["PATH"]:
    os.environ["PATH"] = "{}{};".format(os.environ["PATH"],lo_path)

from uno.util import Bootstrap
xcontext = Bootstrap.bootstrap()
print(type(xcontext)) # -> object

Caveat: I have never tried IronPython with UNO. Instead, I would recommend either Python-UNO or C#, both of which are more common than IronPython-UNO and therefore more likely to be reliable. However, since no one else has ventured to post an answer, here is my best guess.

If I’m reading the docs correctly, the non-deprecated interface is com.sun.star.comp.helper.Bootstrap. The note you read is for com.sun.star.configuration.bootstrap.BootstrapContext instead. So that looks like a rabbit trail.

The following C# SDK sample should work.

private unoidl.com.sun.star.uno.XComponentContext m_xContext;
m_xContext = uno.util.Bootstrap.bootstrap();        
return (XMultiServiceFactory) m_xContext.getServiceManager();

If it’s not working, my guess is that the path has not been set correctly. Did you try the solutions described in the stackoverflow link in the question? Or, the syntax for IronPython is incorrect; for example, perhaps the cast (XMultiServiceFactory) should be removed. Be sure to use 32-bit LibreOffice and 32-bit SDK as noted in the bug report.

Calling type(uno_interface) is probably not helpful. Such objects are typically complex UNO interfaces that pass calls to a deeper layer. To drill down to the underlying type, use an UNO introspection tool such as MRI.

About my first post. As you said I was looking at the wrong bootstrap ^^. I figured it out after (cf. my edit).
Thanks for your answer. Unfortunatly python-uno cannot be used as it involves some .pyd files which cannot be used in ironpython (unless maybe with IronClad). I’m confortable to read C# but not to write it and compile it. I’ll give it a try maybe I will be able to make a C# wrapper for ironpython.