Answered by:
Error Visual Studio Community 2019 after adding package C++

Question
-
Hello!
Im from Poland. When I want to open my C ++ project, I get an error. How to repair?
<entry> <record>691</record> <time>2019/11/05 22:23:04.211</time> <type>Information</type> <source>VisualStudio</source> <description>Begin package load [IntelliCodeCppPackage]</description> <guid>{20E71487-2515-4B18-8A25-F6365DC0353F}</guid> </entry> <entry> <record>692</record> <time>2019/11/05 22:23:06.016</time> <type>Error</type> <source>VisualStudio</source> <description>SetSite failed for package [IntelliCodeCppPackage]Source: 'Microsoft.VisualStudio.Composition' Description: Oczekiwano następującej liczby eksportów: 1 z nazwą kontraktu „Microsoft.VisualStudio.VC.RecommendationProvider.IRecommendationProvider”, ale po zastosowaniu odpowiednich ograniczeń znaleziono 0.
Microsoft.VisualStudio.Composition.CompositionFailedException: Oczekiwano następującej liczby eksportów: 1 z nazwą kontraktu „Microsoft.VisualStudio.VC.RecommendationProvider.IRecommendationProvider”, ale po zastosowaniu odpowiednich ograniczeń znaleziono 0.
 w Microsoft.VisualStudio.Composition.ExportProvider.GetExports(ImportDefinition importDefinition)
 w Microsoft.VisualStudio.Composition.ExportProvider.GetExports(String contractName, ImportCardinality cardinality, Type type, Type metadataViewType, IMetadataViewProvider& metadataViewProvider)
 w Microsoft.VisualStudio.Composition.ExportProvider.GetExports[T,TMetadataView](String contractName, ImportCardinality cardinality)
 w Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T,TMetadataView](String contractName)
 w Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T](String contractName)
 w Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T]()
 w Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValue[T]()
 w Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[T]()
 w Microsoft.VisualStudio.IntelliCode.Cpp.IntelliCodeCppPackage.<InitializeIntelliCodeCppAsync>d__4.MoveNext()
--- Koniec śladu stosu z poprzedniej lokalizacji, w której wystąpił wyjątek ---
 w System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
 w System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 w Microsoft.VisualStudio.IntelliCode.Cpp.IntelliCodeCppPackage.<InitializeAsync>d__3.MoveNext()
--- Koniec śladu stosu z poprzedniej lokalizacji, w której wystąpił wyjątek ---
 w System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
 w System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 w Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass19_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext()
--- Koniec śladu stosu z poprzedniej lokalizacji, w której wystąpił wyjątek ---
 w System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
 w System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 w Microsoft.VisualStudio.Threading.JoinableTask.<JoinAsync>d__68.MoveNext()
--- Koniec śladu stosu z poprzedniej lokalizacji, w której wystąpił wyjątek ---
 w System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 w Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)
 w Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)
 w Microsoft.VisualStudio.Services.VsTask.GetResult()</description> <guid>{20E71487-2515-4B18-8A25-F6365DC0353F}</guid> <hr>80131500</hr> <errorinfo></errorinfo> </entry> <entry> <record>693</record> <time>2019/11/05 22:23:06.086</time> <type>Error</type> <source>VisualStudio</source> <description>End package load [IntelliCodeCppPackage]</description> <guid>{20E71487-2515-4B18-8A25-F6365DC0353F}</guid> <hr>80131500</hr> <errorinfo></errorinfo> </entry>
Answers
-
Hi deser1,
Welcome to MSDN forum.
According to this log, the IntelliCode component could be loaded normally. Please have a try these suggestions, then check if it could work.
- go to "C:\Users\[username]\AppData\Local\Microsoft\VisualStudio\16.0_ef41bc86, then delete all files in ComponentModelCache folder
- Open visual studio installer, then repair your visual studio
- If repairing doesn't work, please Modify -> Individual components, then disable the "intelliCode"
Look forward to your feedback.
Best Regards,
Dylan
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com
- Proposed as answer by Dylan Zhu-MSFTMicrosoft contingent staff Thursday, November 7, 2019 9:23 AM
- Marked as answer by deser1 Friday, November 8, 2019 10:35 PM
-
Hi deser1,
I'm glad to hear that it could help you.
>>but I don't know where to do Visual Studio restart in the future to know.
Did you mean the cache path will changed, and you would not find it in the future? If so, the cache path is under "C:\Users\[username]\AppData\Local\Microsoft\VisualStudio\[version mumber]\" from VS 2013 to VS 2019. So it should be here in the future.
And if you worried that this issue still happens in the future, please feel free to contact us, we will try our best to provide solution with you.
BTW, please mark the helpful reply as answer, which will be beneficial to other members with same issue, thank you for cooperation.
Have a nice day.
Best Regards,
Dylan
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com
- Marked as answer by deser1 Friday, November 8, 2019 10:35 PM
All replies
-
Hi deser1,
Welcome to MSDN forum.
According to this log, the IntelliCode component could be loaded normally. Please have a try these suggestions, then check if it could work.
- go to "C:\Users\[username]\AppData\Local\Microsoft\VisualStudio\16.0_ef41bc86, then delete all files in ComponentModelCache folder
- Open visual studio installer, then repair your visual studio
- If repairing doesn't work, please Modify -> Individual components, then disable the "intelliCode"
Look forward to your feedback.
Best Regards,
Dylan
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com
- Proposed as answer by Dylan Zhu-MSFTMicrosoft contingent staff Thursday, November 7, 2019 9:23 AM
- Marked as answer by deser1 Friday, November 8, 2019 10:35 PM
-
-
Hi deser1,
I'm glad to hear that it could help you.
>>but I don't know where to do Visual Studio restart in the future to know.
Did you mean the cache path will changed, and you would not find it in the future? If so, the cache path is under "C:\Users\[username]\AppData\Local\Microsoft\VisualStudio\[version mumber]\" from VS 2013 to VS 2019. So it should be here in the future.
And if you worried that this issue still happens in the future, please feel free to contact us, we will try our best to provide solution with you.
BTW, please mark the helpful reply as answer, which will be beneficial to other members with same issue, thank you for cooperation.
Have a nice day.
Best Regards,
Dylan
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com
- Marked as answer by deser1 Friday, November 8, 2019 10:35 PM