4

strong textI reinstalled VS 2015 Update 3 (from Web install) w/Python Tools, but Python Tools don't seem to work anymore. From ActivityLog.xml, the error is:

<record>494</record>
<time>2016/07/04 15:59:16.031</time>
<type>Error</type>
<source>VisualStudio</source>
<description>LegacySitePackage failed for package [Python Tools
             Package]Source:
&apos;Microsoft.VisualStudio.Composition&apos; 
Description: Expected 1 export(s) with contract name
&quot;Microsoft.PythonTools.Interpreter.IInterpreterOptionsService&quot;
but found 0 after applying applicable constraints.
#x000D;&#x000A;
Microsoft.VisualStudio.Composition.CompositionFailedException: 
Expected 1 export(s) with contract name 
&quot;Microsoft.PythonTools.Interpreter.IInterpreterOptionsService&quot; 
but found 0 after applying applicable constraints.&#x000D;&#x000A;   
Microsoft.VisualStudio.Composition.ExportProvider.GetExports
(ImportDefinition importDefinition)&#x000D;&#x000A;   at 
Microsoft.VisualStudio.Composition.ExportProvider.GetExports
[T,TMetadataView](String contractName, ImportCardinality 
cardinality)&#x000D;&#x000A;   at    
Microsoft.VisualStudio.Composition.ExportProvider.GetExport
[T,TMetadataView]       (String contractName)&#x000D;&#x000A;   at
Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T]
(String   contractName)&#x000D;&#x000A;   at    
Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T]
()&#x000D;&#x000A;   at   
Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValue
[T]  ()&#x000D;&#x000A;   at 
Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService
[T]  ()&#x000D;&#x000A;   at
Microsoft.PythonTools.PythonToolsService..ctor(IServiceContainer
container)&#x000D;&#x000A;   at   
Microsoft.PythonTools.PythonToolsPackage.Initialize()&#x000D;&#x000A;
at  
Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.
Interop.IVs    Package.SetSite(IServiceProvider sp)</description>
<guid>{6DBD7C1E-1F1B-496D-AC7C-C55DAE66C783}</guid>
<hr>80131500</hr> <errorinfo></errorinfo>

I de-installed/re-installed VS 2015 Python support (directly from PTVS 2.2.4 VS 2015.msi). Same error.


What to do? The Machine (Win 10) has Python 2.7/x64 in PATH.

There seems to be a real problem for other too. See here: Visual Studio Python Environments window does not display

Interestingly, I have two similar dev machines (Win10/x64), both installed recently, both have VS 2013Pro + VS2015 Community installed. On one box, everything works fine, on the other: see above.

Community
  • 1
  • 1
rubber boots
  • 14,924
  • 5
  • 33
  • 44
  • I received the same error as well when I tried to install the June update for PTVS. It removed the March install and then started giving the error. I didn't choose to install Update 3 yet. – Cindy Jayakumar Jul 12 '16 at 12:39

4 Answers4

15

Had the same issue. Visual Studio 2015 Update 3, PTVS 2.2.4

Resolved it by:

  1. Closing VS
  2. Clearing the content of C:\Users\YOUR_USERNAME\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache folder. * notice the YOUR_USERNAME and replace it with your actual username to get the local path.
  3. Relaunching VS.

Hope this helps

vvvlad
  • 378
  • 2
  • 13
1

Delete the contents from the following folders:

C:\Users{user}\AppData\Local\Microsoft\VisualStudio
C:\Users{user}\AppData\Local\Microsoft\VSCommon

and run Visual Studio 2015 again:

[x64] C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
[x86] C:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE
x19
  • 8,277
  • 15
  • 68
  • 126
0

It seems like they fixed these issues in PTVS 2.2.5: github.com/Microsoft/PTVS/issues/1411 and github.com/Microsoft/PTVS/issues/1415

zss
  • 31
  • 5
-1

Control Panel/Uninstall change Select VS2015, click change

Once the dialog builds, select modify, then select Python tools.

Done.