VS Version: 28526.9.d16.0stg
Python Tool Version: 16.0.19026.2
Repro step:
1.Create an IronPython WPF Application
2.Drag & drop a button to the Design view
3.Check the IntelliSense in the .py file
a. From System.Windows import MessageBox
b. In the Button_Click handler, add a call to MessageBox.Show()
c. Signature info tooltip shows all overloads
expect result:
a. code coloring with Messagebox
b. when type MessageBox. , Show() should appear automatically
c. signature info tooltip shows with MessageBox
actual result:
a. no code coloring with Messagebox
b. no completions when type MessageBox.
c. no signature info tooltip shows with MessageBox

Some standard library modules have completions (json) but others don't (sys).
It works on modules implemented in Python (e.g. json, os), but fails with anything that's built-in/.NET (e.g. sys, nt).
any news on this?
any news?
As an interim solution, it sure would be nice to have the ability to supplement with auto-complete stubs like Visual Studio Code can do. Can we just get a folder where we can put stubs?
@AtomicZ you could try placing them under the typeshed that we install in the Python extension folder (searching for typeshed under the VS install folder should find it). They probably need to go under typeshed/third_party/2
The location of the typeshed folder is supposed to be customizable, but this is an option that is not regularly tested anymore, and I am not sure of its current status. It can be set in tools/options/python/language server. You could take the typeshed in the install dir, copy it somewhere else and then add whatever you need to it, and put the location in tools/options. That way, you don't mess with the contents of the install dir, but again, not sure how well that works.
We are not going to do any additional work specifically for IronPython; usage is too low and there are alternatives that work with Python 3.
We are planning on having much better support for type stubs in the future (sometime in first half of 2020). So I am going to rename this issue and change it to be about that.
Can you confirm that this is the same issue reported at https://github.com/IronLanguages/ironpython2/issues/615? There are pointers from that one to this one, but I cannot decipher this issue to figure out what the heck it is about. I thought https://github.com/IronLanguages/ironpython2/issues/615 was pretty clear; this one not so much.
@dbmercer yes that is the same issue as the one you linked.
Hey there @dbmercer, @zhouwangyang and @AtomicZ. I would love to learn more about your use-cases with IronPython in Visual Studio. Do you mind emailing ptvshelp @ microsoft.com so we can continue a more detailed conversation there? Thank you!
@Anapo14 I'd like to do that. What detailed information do you need to send by email?
Has someone solved it???
@mmfontana Not as far as I know.
Is fixing the "unresolved import" issues with IronPython still being worked on? And any guess what release to target? I would like to use VS 2019 but have to stay on 2017 till this gets resolved.
The "much better support for type stub" is being actively worked on, and will go in as part of the new language server & integration work.
https://github.com/microsoft/PTVS/issues/5210#issuecomment-618714754
That is still many months away.
@GLantaff does it perfectly work in VS 2017?
@GLantaff does it perfectly work in VS 2017?
No not perfect but mostly OK. In 2019 every line that has an import statement is flagged as an error.
2017:

2019:

In 2019 you end up with so many warnings it's hard to find the real issues.
My request was never to fix intellisense (which would be great) but to fix all the false warnings about "unresolved import xxx"
There's an option to turn off unresolved import warnings:

That does help. Thanks. Still miss the color highlighting to show it found the class but this is a good work around for now.
Is there any updates?
I'm working on Ironpython project in visual studio 2019, expecting to call function in COM type library .dll
But, even import clr doesn't work.
Will visual studio still support python or ironpython any longer ?
@gramster
We are not going to do any additional work specifically for IronPython; usage is too low and there are alternatives that work with Python 3.
Would you explain what alternative that currently work with python 3?
And how could we do it?
I need to call function in COM typed library .dll
In version 2015 everything looks fine, even the intellisens we just need to add the interop library on reference browse tab.
But now, even in VS2017, the browse button isn't shown in add reference dialog.
You can import clr like this :
Change name clr for other library
You can import clr like this :
- Run cmd as administrator
- Go to ipy.exe directory (c:program filesIronPython 2.7 for example)
- run "ipy -X:Frames -m ensurepip "
- run "ipy -X:Frames -m pip install clr"
> Change name clr for other library
Most helpful comment
You can import clr like this :
Change name clr for other library