As the title says, when I use a custom installed IronPython directory (not the installed MSI), intellisense can't find the clr module. I encountered this in a non-clean machine, so I fired up a fresh VM and did the following on a Windows 8.1 VM. All default
Installed Visual Studio 2013
Installed Python 2.7 (C:\Python27)
Installed IronPython 2.7 from the MSI
Installed (Copied) IronPython to a custom directory from the .zip file, C:\CustomDir\IronPython
Installed all updates and such, so I'm on "the most recent" that's not beta.
So I make a new project, iPyConsoleTest, an IronPython Console Application. I ensure that the default environment is "IronPython 64-bit 2.7" and have done "Refresh DB" on it. The default script has this:
I type "import " and clr comes up in the intellisense. Fine. And I import it, and then do "clr." and again, intellisense is working for the module members.
So then I add a new environment through Tools->Options->Python Tools->Environment Options menu. I click "Add Environment" and name it "Custom IronPython". And I fill in the following:
- Path: C:\CustomDir\IronPython\ipy64.exe
- Windows Path: C:\CustomDir\IronPython\ipyw64.exe
- Library Path: C:\CustomDir\IronPython\Lib
- Architecture: x64
- Language Version: 2.7
- Path Environment Variable: IRONPYTHONPATH
Note that the IRONPYTHONPATH environment variable does not exist on this machine, and these settings, except for the directories, are identical to the "detected" settings for the "IronPython 64-bit 2.7" profile. I made sure to click "Refresh
DB" for it and it appeared successful.
So then I change the project "Python Environments" to have ONLY "Custom IronPython" in it, and delete the last two lines, and try "import " and clr isn't found. I do "clr." and there is no intellisense at all for it.
I can run it and it succeeds, but intellisense is completely blind.
So what's the deal? Detected environments can see "clr" and such, but if you point it at a directory, it can't? Or does the installer package have things that aren't in the .zip from the website? Or is there some other setting I should be doing to
ensure that my .zip install dir for IronPython works?
Bonus: If you bring up the interactive environment, "import" doesn't find CLR for intellisense, but once it succeeds, intellisense DOES work for the clr members on the next interactive line.