Closed carlospence closed 4 years ago
Hi,
Did you try to restart VS/OS ? Please also try to clear MEF cache with this extension https://marketplace.visualstudio.com/items?itemName=MadsKristensen.ClearMEFComponentCache
UPDATE: Cleaning Temp
directory (%USERPROFILE%\AppData\Local\Temp\
) could also help here.
Please let me know if that solved the issue.
Hi,
I have the same problem.
Things I've tried:
Nevertheless, I get to following exception: Microsoft.VisualStudio.ExtensibilityHosting.InvalidMEFCacheException: The Visual Studio component cache is out of date (assembly: MappingGenerator, Version=1.14.356.0, Culture=neutral, PublicKeyToken=null). Please restart Visual Studio.
 at Microsoft.VisualStudio.ExtensibilityHosting.FaultCatchingAssemblyLoader.<>c__DisplayClass17_0.<LoadAssembly>b__0(AssemblyName assemblyNameParam)
 at Microsoft.VisualStudio.ExtensibilityHosting.Utilities.SafeGetOrAdd[TKey,TValue](IDictionary
2 dictionary, TKey key, Object lockObj, Func2 valueFactory)
 at Microsoft.VisualStudio.ExtensibilityHosting.FaultCatchingAssemblyLoader.LoadAssembly(AssemblyName assemblyName)
 at Microsoft.VisualStudio.Composition.Reflection.ResolverExtensions.GetManifest(Resolver resolver, AssemblyName assemblyName)
 at Microsoft.VisualStudio.Composition.Reflection.ResolverExtensions.TryUseFastReflection(TypeRef typeRef, Module& manifest)
 at Microsoft.VisualStudio.Composition.Reflection.ResolverExtensions.Resolve(MethodRef methodRef)
 at Microsoft.VisualStudio.Composition.Reflection.MethodRef.Resolve()
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
--- End of stack trace from previous location where exception was thrown ---
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
 at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_0
1.<As>b0()
at System.Lazy1.CreateValue()
 at System.Lazy
1.LazyInitValue()
at System.Lazy`1.get_Value()
at Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.<>c__DisplayClass5_0.<DistributeLanguages>b0()
at System.Lazy1.CreateValue()
 at System.Lazy
1.LazyInitValue()
at System.Lazy1.get_Value()
 at Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.<>c.<.ctor>b__4_4(Lazy
2 lz)
at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext()
 at System.Linq.Buffer
1..ctor(IEnumerable1 source)
 at System.Linq.Enumerable.ToArray[TSource](IEnumerable
1 source)
at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable1 items)
 at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource](IEnumerable
1 items)
at Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.<>cDisplayClass4_1.<.ctor>b__3()
at System.Lazy1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
 at System.Lazy
1.get_Value()
at Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.GetProviders(Document document)
at Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.<GetRefactoringsAsync>d12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Roslyn.Utilities.TaskExtensions.WaitAndGetResult_CanCallOnBackground[T](Task1 task, CancellationToken cancellationToken)
 at Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionsSourceProvider.SuggestedActionsSource.GetRefactorings(ITextBufferSupportsFeatureService supportsFeatureService, ISuggestedActionCategorySet requestedActionCategories, Workspace workspace, Document document, Nullable
1 selectionOpt, Func2 addOperationScope, CancellationToken cancellationToken)
 at Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionsSourceProvider.SuggestedActionsSource.GetSuggestedActions(ISuggestedActionCategorySet requestedActionCategories, SnapshotSpan range, IUIThreadOperationContext operationContext, CancellationToken cancellationToken)
 at Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionsSourceProvider.SuggestedActionsSource.GetSuggestedActions(ISuggestedActionCategorySet requestedActionCategories, SnapshotSpan range, IUIThreadOperationContext operationContext)
 at Microsoft.VisualStudio.Language.Intellisense.Implementation.LightBulbSession.<>c__DisplayClass40_4.<TryGetSuggestedActionSets>b__1()
 at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint[T](Object errorSource, Func
1 call, T valueOnThrow, Predicate1 exceptionToIgnore, Predicate
1 exceptionToHandle)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)`
Funny is that the exception states that I have the version 1.14.356.0 installed. But I definitely have the version 1.16.405 installed (downloaded from the GitHub releases page).
I'm running VisualStudio 16.6.2
Thanks. I've just reported this issue to Microsoft. I will provide a link to the ticket when I get confirmation.
@carlospence @mrdavidkovacs is it still an issue with the latest MappingGenerator and VS 16.7.2?
@cezarypiatek It worked for me yesterday using the latest version of the extension and Visual Studio 16.7.2. Thank you very much.
I just updated to Visual Studio 16.6 and the Quick Actions stopped working, anytime I click on the Quick Actions the error below is displayed. I have update the MappingGenerator to the latest version and still having the same issue. Whenever I disable the plugin, every works as expected.