[Python] How to enable type hinting for pythonnet imported .NET library?

Discussão em 'Python' iniciado por Stack, Julho 10, 2025.

  1. Stack

    Stack Membro Participativo

    The general problem is state in the title. To be more specific.

    • I have my own C# .NET project
    • I am able to publish it (build DLLs) and import it in Python via pythonnet
    • I am able to build a Python package via setuptools - i.e. "wrapping" the .NET project into distribuable Python package

    However, I am unable to add type hinting for .NET commands and classes to the Python package.

    What did I try:


    But my editor (PyCharm) is unable to find the stubs folder in my package. I wonder if anyone tried to resolve similar task. Any help or hint is appreciated.

    Continue reading...

Compartilhe esta Página