LegacySitePackage failed for package [Python Tools Package]Source: 'Microsoft.VisualStudio.Composition' Description: Expected 1 export(s) with contract name "Microsoft.PythonTools.Interpreter.IInterpreterOptionsService" but found 0 after applying applicable constraints. Microsoft.VisualStudio.Composition.CompositionFailedException: Expected 1 export(s) with contract name "Microsoft.PythonTools.Interpreter.IInterpreterOptionsService" but found 0 after applying applicable constraints. at Microsoft.VisualStudio.Composition.ExportProvider.GetExports(ImportDefinition importDefinition) at Microsoft.VisualStudio.Composition.ExportProvider.GetExportsT,TMetadataView at Microsoft.VisualStudio.Composition.ExportProvider.GetExportT,TMetadataView at Microsoft.VisualStudio.Composition.ExportProvider.GetExportT at Microsoft.VisualStudio.Composition.ExportProvider.GetExportT at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValueT at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetServiceT at Microsoft.PythonTools.PythonToolsService..ctor(IServiceContainer container) at Microsoft.PythonTools.PythonToolsPackage.Initialize() at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)
Just deleted folder of VS appdata (c:\Users\root\AppDataLocal\Microsoft\VisualStudio\14.0), and started VS again. Also was required to restore all else extensions.
For future reference, you only need to delete the AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache folder to resolve this error.
@zooba
you saved my life too
tnx man
When we are trig to open project in VS 2015 we are getting message as "Expected 1 export(s) with contract name Microsoft.Internal.VisualStudio.PlatformUI.ISolution Attached Collection Service but found 0 after applying applicable constraints".
However we are facing this issue. This issue reflecting after windows update.
Thanks zooba, I just faced the problem with VS 2017 and sold by your help. I just deleted the folder - AppDataLocal\Microsoft\VisualStudio\15.0\ComponentModelCache
Thanks again.
Rashed
@zooba You saved my time by coming from 2016.
Thank you very much.
Yes, its working fine now after deleted the ComponentModelCache folder, thank you so much!
Most helpful comment
For future reference, you only need to delete the
AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCachefolder to resolve this error.