Visual Studio Python Environments window does not display - visual-studio

I have installed Win10, Visual Studio 2015, Python 2.7, Python 3.5 and PTVS 2.2.3.
Unfortunately PTVS does not work at all. I can not load any Python projects that were loading previously in Visual Studio. It worked before I installed Python 3.5. I tried to uninstall Python 2.7 and get an error saying that the uninstall didn't success. After several tries, the problem appears to be around pip which is somehow blocking both install and uninstall of Python 2.7.
When trying to open Python Tools from Tools menu, nothing happens. Neither window opens nor any error message is displayed. Python Environments window does not open even with the shortcut.
In Tools > Options > Python Tools, the only text shown is: "An error occurred loading this property page".
When I try to load/reload the Python project, the message is: "error : Expected 1 export(s) with contract name "Microsoft.PythonTools.Interpreter.IInterpreterOptionsService" but found 0 after applying applicable constraints." This has already been posted for 11 days ago, but no one has answered.
To solve this, I would like to know how to make the Python Environment window appearing in Visual Studio.
Thanks for any help.

VS keeps a cache of loaded assemblies that doesn't always get
invalidated when it should.
If you delete
C:\Users\You\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
and restart you should be fine.
src: https://github.com/Microsoft/PTVS/issues/1388

You'll need to open the ActivityLog.xml (%APPDATA%\Microsoft\VisualStudio\14.0\ActivityLog.xml) and see if there's any exceptions there related to PTVS.
It sounds like you have a pretty messed up configuration at this point. You could try uninstalling PTVS and re-installing it, but my guess is your messed up Python installs are somehow throwing PTVS off and causing it to crash somewhere.

I`m also having similar issues, first installation path:
Visual Studio 2015 Pro with Update 1
Installed PTVS using the VS2015 installation setup later on
Everything work fine
The issues started:
Installed a DEV version of PTVS from their github page
My pyproj stopped loading saying a migration needed
Noticed that after new PTVS installation, I`ve installed VS2015 Update 2
Not being able to reload my project after trying to debug the issue, I`ve decided to:
Uninstall PTVS and
Reinstall PTVS through VS2015 setup
Now the issue was different, while trying to load my previous pyproj or even creating different Python projects using multiple templates. I was getting this error:
"There is a missing project subtype. Subtype: '{1b580a1a-fdb3-4b32-83e1-6407eb2722e6}' is unsupported by this installation."
Not finding anything around this, I`ve:
Uninstalled Visual Studio 2015 (having Update 2)
Reinstalled Visual Studio 2015 with Update 1 (without checking PTVS, who requires VS 2015 Update 2 to be installed as well, I suspected it has something to do with it)
Installed PTVS latest stable version from their Github
Now Visual Studio is crashing while trying to load the past mentioned pyproj, with the same error as OP:
SetSite failed for package [Python Tools Package][Expected 1 export(s) with contract name "Microsoft.PythonTools.Interpreter.IInterpreterOptionsService" but found 0 after applying applicable constraints.]
Still trying to fix it at the moment.
Maybe these steps will help debugging the issue.
Update / Fixed
After installing VS 2015 with Update 1 and PTVS 2.2 for VS 2015, I was still having issues opening the pyproj causing VS to just crash (unfortunately nothing in ActivityLog.xml).
I've tried repairing Visual Studio through it's setup, still the same issue.
Finally, I've decided to re-update Visual Studio 2015 to Update 2, causing also to update PTVS to March release, all through VS setup utility.
And now my pyproj correctly opens. Probably some versions miss match during the initial steps where I've installed a DEV version of PTVS. Not sure which step actually corrected my issue but it did.
Hope this will help somehow other people with similar issues.

Thanks for your posts.
My problem was fixed after I installed VS 2015 update 3 which included a new release of PTVS (June 2.2.40623).

Related

Cannot install any Visual Studio program

I have been trying to install Visual Studio for a couple of days now and none have operated. First I tried Visual Studio Community 2017 and the installer was installed and then the vs was installed but when I try and run it I got an error message that directed me to the ActivityLog file. I've tried uninstalling it then reinstalling it but that didn't work. I came across a solution that required me to try opening it using the Developer Command Prompt which I wanted to do but when I clicked on it from the Start menu it said that the link is missing. There was another Visual Studio program that had also installed and when I tried loading that one, it also directed me an ActivityLog file.
So I uninstalled the 2017 version and tried installing an earlier version hoping that it would work. I can reinstall for whomsoever would want to see the error message as well as the log file.
I then tried the 2013 version (since that is the one we use at school anyway). After downloading the file, I do not even get to an installation screen. A pop-up appears that says that the program requires the Microsoft .NET framework to work
Installation pop up window
The first time I tried it gave me options to accept and continue or cancel so I clicked on accept and continue and that was the end of it. Nothing happened after that. Now when I click on the installation file it just appears as in the picture above with no options. I tried to follow the instructions on Cannot install Visual Studio 2017 Community since that is the closet to my problem that I have found but it still didn't work.
Please help. I really need at least one Visual Basic to work.

PTVS - general IntelliSense problems - no error highlighting, no recognition of modules from other projects

I have used PTVS for two years now, and I remember (am I going crazy?) that PTVS always highlighted errors when working on a .py file in Visual Studio.
As of ~ Oct 10th (possible connected with v15.4 of VS2017), there have been issues with PTVS. In my frustration, I have completely reinstalled windows and wiped the entire computer clean. After installing drivers, I installed VS using the Visual Studio 2017 Community installer with the following options:
I then open Visual Studio, create a new empty python project, and type some garbage. No. Error. Correcting.
Am I going mad?
My python environment autocompletion / intellisense database is refreshed, by the way.
Meanwhile, the "View->Error List" window shows errors, even though they aren't highlighted.
Uninstalled the "Python native development tools" extension, still does not work. Installed with bare minimum python options (python language support, python 3.6, templates). Doesn't work.
Not sure if this is related (it probably is), Intellisense fails to recognize modules from other projects using any method. This was fine a week ago: (note green squiggles are Intellisense "Cannot resolve" errors)
I got the same issue as yours, but it could show the Red color in VS2015.
For this issue, I help you report this issue to the developer community site:
https://developercommunity.visualstudio.com/content/problem/132688/ptvs-general-intellisense-problems-no-error-highli.html
You could add your comment there.
For the second issue, about the module reference. Not the real Python team members, but maybe you could find a way here:
How to import functions from other projects in Python?
One thread for one issue, maybe you could start a new python issue for it.
This is a bug that fixed on 31 October 2017 with Update 15.4.2
Source
There was a bug in VS 2017 15.4, and apparently it will be fixed upon next release. For anyone experiencing these issues, VS 2015's Python Tools work if you need any of these functionalities.

Visual Studio 2017 Installation Issue

I am trying to install Visual Studio 2017 on my machine, that already has Visual Studio 2015 installed. But when I try to install I get following error:
And when I try to give alternate path to the file, it gives error: Wrong package.
Any help is appreciated greatly.
I would do a complete uninstall of both visual studio's, if you need vs studio 2015 make sure you install this before you install 2017.
One thing I know with most Microsoft software always install them in year order with no traces of other installations left behind, also I have found it is bad to install 64 bit and 32 bit versions together although I find that issue less as time goes on.
See: https://blogs.msdn.microsoft.com/heaths/2015/07/17/removing-visual-studio-components-left-behind-after-an-uninstall/
First you can try to run this tool from Microsoft and see if it cleans out broken installations. You might have to manually initiate the uninstalls for the packages that won't uninstall - see the quote below for a description from the user who actually ran the tool (I never did).
I believe this tool is Microsoft's replacement for the old MSI cleanup-tool based on MsiZap.exe that has been deprecated for quite some time. Remember to leave a comment if this fix works so others know.
This issue seems to have been discussed on MSDN as well: https://social.msdn.microsoft.com (shortened link). Here is the core of it: "... I used this tool to uninstall the packages that the vs_community 2017 installer was complaining it could not uninstall. As I uninstalled the packages and retried the vs installer, I would hit another package that could not be uninstalled. Eventually, after 4 or 5 packages were uninstalled, the installer completed successfully and it seems to work. "
Just for reference: The latest supported Visual C++ downloads.

Trying to install VS 2015 w/ update 1 after update 2 was causing major issues

Last week update 2 was officially released for Visual Studio 2015. In a desire to stay up-to-date I installed it and when I did I started having some functionality broken with visual studio. I removed the update through add/remove programs but was still getting the stalling out and some broken functionality. I tried to roll back using windows restore to before last Friday (when I installed it), this made functionality much worse so I had to uninstall.
I wrote it off as a glitch with the upgrade and grabbed a fresh install online of VS2015 preloaded with update 2. Sadly I still had issues, particularly now with doing migrations.
I decided I had enough, it wasn’t worth the hassle of getting Update 2 to work, so now I am trying to install visual studio with update 1 (what I had on there before Friday) it doesn't work. I can open and run the installer for VS2015 with update 2 and that works fine, but when open the same installer I used a few months ago that had update 1 I select the modules I want and click install that's when I get this error:
"Setup detected an issue during the operation. please click below to check for a solution and help us improve the set up experience" (but it only gives me the option to close program)
I tried running the visual studio 2015 installer with the “/uninstall /force” flags in case it left something. I went to the “program files (x86)” folder and deleted what’s left of the visual studio 14.0 folder (which is 2015) but to no avail. In a last ditch effort I even tried removing all visual studio settings out of the user/appdata/roaming and user/appdata/local folders. I uninstalled ANYTHING that was installed in my programs since last Friday.
Lastly, I am looking at the log of one of the failed install attempts and the only line with the word “error” is this one:
[15BC:1528][2016-04-06T22:48:02]e000: MUX: ERROR: Object reference not set to an instance of an object.
I don’t know what that means. I see people having that error WHILE in visual studio, but I'm getting it for the installer.
TL:DR I want to install VS2015 U1 after upgrading to VS2015 U2 and having to uninstall but it won't let me install.
Edit: someone suggested system restore to restore my computer to a date in before I upgraded to update 2 but with all the installing and uninstalling attempts yesterday I blew away anything before then

visual studio 2012 incompatiblity and editor package not loading correctly?

I used to use vs 2012 for some month without any problem, today when I want to open my c# project , I got this error message:
This program has known compatibility issues
Visual Studio 2012 Express for Windows Desktop is incompatible with this version of Windows.
when I click Run program I got this error:
'Microsoft.VisualStudio.Editor.Implementation.EditorPackage' package did not load correctly
When I continue with this error message, another error message shows: Visual Studio has stopped working. I need to get it work as soon as posible, any idea?
I had a similar problem, installing this patch solved it: KB2781514
I just got this error in VS2013 after installing a VS extension. I fixed it by closing all instances of Visual Studio, then removing %LOCALAPPDATA%\Microsoft\VisualStudio\12.0\ComponentModelCache
Happened to me today on VS 2012. The Update mentioned by Jarek didn't install (it complained I already have more stuff installed). Deleting the folder mentioned by squeaky didn't work.
Finally fixed after I installed VS 2012 Update 4 : http://www.microsoft.com/en-us/download/details.aspx?id=39305

Resources