bitbucket-for-visual-studio icon indicating copy to clipboard operation
bitbucket-for-visual-studio copied to clipboard

VS2017/19 15.9.9 breaks Bitbucket

Open jaltenbernd opened this issue 5 years ago • 36 comments

After updating to VS2017 to version 15.9.9, got the following error from the Bitbucket plugin:

Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "GitClientVS.UI.Views.ConnectSectionView". ---> System.Windows.Markup.XamlParseException: Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an exception. ---> System.Xaml.XamlObjectWriterException: Set property 'System.Windows.ResourceDictionary.Source' threw an exception. ---> System.IO.IOException: Cannot locate resource 'themes/metroheader.xaml'. at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access) at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access) at System.IO.Packaging.PackWebResponse.CachedResponse.GetResponseStream() at System.IO.Packaging.PackWebResponse.GetResponseStream() at System.IO.Packaging.PackWebResponse.get_ContentType() at MS.Internal.WpfWebRequestHelper.GetContentType(WebResponse response) at MS.Internal.WpfWebRequestHelper.GetResponseStream(WebRequest request, ContentType& contentType) at System.Windows.ResourceDictionary.set_Source(Uri value) at System.Windows.Baml2006.WpfSharedBamlSchemaContext.<>c.<Create_BamlProperty_ResourceDictionary_Source>b__342_0(Object target, Object value) at System.Windows.Baml2006.WpfKnownMemberInvoker.SetValue(Object instance, Object value) at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value) at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value) --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject) --- End of inner exception stack trace --- at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value) at MS.Internal.Xaml.Runtime.PartialTrustTolerantRuntime.SetValue(Object obj, XamlMember property, Object value) at System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, Object value, Boolean onParent) at System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx) at System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(ObjectWriterContext ctx) at System.Xaml.XamlObjectWriter.WriteEndMember() at System.Xaml.XamlWriter.WriteNode(XamlReader reader) at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter) at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter) at System.Windows.SystemResources.ResourceDictionaries.LoadDictionary(Assembly assembly, String assemblyName, String resourceName, Boolean isTraceEnabled, Uri& dictionarySourceUri) at System.Windows.SystemResources.ResourceDictionaries.LoadGenericDictionary(Boolean isTraceEnabled) at System.Windows.SystemResources.FindDictionaryResource(Object key, Type typeKey, ResourceKey resourceKey, Boolean isTraceEnabled, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache) at System.Windows.SystemResources.FindResourceInternal(Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference) at System.Windows.FrameworkElement.FindResourceInternal(FrameworkElement fe, FrameworkContentElement fce, DependencyProperty dp, Object resourceKey, Object unlinkedParent, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, DependencyObject boundaryElement, Boolean isImplicitStyleLookup, Object& source) at System.Windows.StaticResourceExtension.FindResourceInAppOrSystem(IServiceProvider serviceProvider, Boolean allowDeferredReference, Boolean mustReturnDeferredResourceReference) at System.Windows.StaticResourceExtension.FindResourceInEnviroment(IServiceProvider serviceProvider, Boolean allowDeferredReference, Boolean mustReturnDeferredResourceReference) at System.Windows.StaticResourceExtension.TryProvideValueImpl(IServiceProvider serviceProvider, Boolean allowDeferredReference, Boolean mustReturnDeferredResourceReference) at System.Windows.ResourceDictionary.SetOptimizedStaticResources(IList1 staticResources, IServiceProvider serviceProvider, StaticResourceExtension staticResourceWorker) at System.Windows.ResourceDictionary.SetKeys(IList1 keyCollection, IServiceProvider serviceProvider) at System.Windows.ResourceDictionary.SetDeferrableContent(DeferrableContent deferrableContent) at System.Windows.Baml2006.WpfSharedBamlSchemaContext.<>c.<Create_BamlProperty_ResourceDictionary_DeferrableContent>b__297_0(Object target, Object value) at System.Windows.Baml2006.WpfKnownMemberInvoker.SetValue(Object instance, Object value) at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value) at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value) --- End of inner exception stack trace --- at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) at GitClientVS.UI.Views.ConnectSectionView.InitializeComponent() at GitClientVS.UI.Views.ConnectSectionView..ctor(IConnectSectionViewModel connectSectionViewModel) --- End of inner exception stack trace --- 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() at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import, RuntimeExport export, Func3 lazyFactory) at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import) at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.<CreateValue>b__10_0(RuntimeImport import) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) 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.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0() at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass55_0.<CreateExportFactoryExport>b__1() at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass54_0.<CreateExportFactory>b__0() at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_01.<As>b__0() at System.ComponentModel.Composition.ExportFactory1.CreateExport() at Microsoft.VisualStudio.Composition.NetFxAdapters.MefV1ExportProvider.ComposablePartDefinitionForExportFactory.CreatePart() at System.ComponentModel.Composition.ReflectionModel.ExportFactoryCreator.LifetimeContext.GetExportLifetimeContextFromExport[T](Export export) at System.ComponentModel.Composition.ReflectionModel.ExportFactoryCreator.<>c__DisplayClass6_02.<CreateStronglyTypedExportFactoryOfTM>b__0() at System.ComponentModel.Composition.ExportFactory1.CreateExport() at Microsoft.TeamFoundation.Controls.WPF.TeamExplorer.Framework.TeamExplorerSectionHost.Create()`

jaltenbernd avatar Mar 18 '19 14:03 jaltenbernd

Similar issue on the "Sync" tab:

Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "GitClientVS.UI.Views.PublishSectionView". ---> System.Windows.Markup.XamlParseException: Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an exception. ---> System.Xaml.XamlObjectWriterException: Set property 'System.Windows.ResourceDictionary.Source' threw an exception. ---> System.IO.IOException: Cannot locate resource 'themes/metroheader.xaml'.
   at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
   at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
   at System.IO.Packaging.PackWebResponse.CachedResponse.GetResponseStream()
   at System.IO.Packaging.PackWebResponse.GetResponseStream()
   at System.IO.Packaging.PackWebResponse.get_ContentType()
   at MS.Internal.WpfWebRequestHelper.GetContentType(WebResponse response)
   at MS.Internal.WpfWebRequestHelper.GetResponseStream(WebRequest request, ContentType& contentType)
   at System.Windows.ResourceDictionary.set_Source(Uri value)
   at System.Windows.Baml2006.WpfSharedBamlSchemaContext.<>c.<Create_BamlProperty_ResourceDictionary_Source>b__342_0(Object target, Object value)
   at System.Windows.Baml2006.WpfKnownMemberInvoker.SetValue(Object instance, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
   --- End of inner exception stack trace ---
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
   at MS.Internal.Xaml.Runtime.PartialTrustTolerantRuntime.SetValue(Object obj, XamlMember property, Object value)
   at System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, Object value, Boolean onParent)
   at System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx)
   at System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(ObjectWriterContext ctx)
   at System.Xaml.XamlObjectWriter.WriteEndMember()
   at System.Xaml.XamlWriter.WriteNode(XamlReader reader)
   at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
   at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter)
   at System.Windows.SystemResources.ResourceDictionaries.LoadDictionary(Assembly assembly, String assemblyName, String resourceName, Boolean isTraceEnabled, Uri& dictionarySourceUri)
   at System.Windows.SystemResources.ResourceDictionaries.LoadGenericDictionary(Boolean isTraceEnabled)
   at System.Windows.SystemResources.FindDictionaryResource(Object key, Type typeKey, ResourceKey resourceKey, Boolean isTraceEnabled, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
   at System.Windows.SystemResources.FindResourceInternal(Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)
   at System.Windows.FrameworkElement.FindResourceInternal(FrameworkElement fe, FrameworkContentElement fce, DependencyProperty dp, Object resourceKey, Object unlinkedParent, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, DependencyObject boundaryElement, Boolean isImplicitStyleLookup, Object& source)
  at System.Windows.StaticResourceExtension.FindResourceInAppOrSystem(IServiceProvider serviceProvider, Boolean allowDeferredReference, Boolean mustReturnDeferredResourceReference)
   at System.Windows.StaticResourceExtension.FindResourceInEnviroment(IServiceProvider serviceProvider, Boolean allowDeferredReference, Boolean mustReturnDeferredResourceReference)
   at System.Windows.StaticResourceExtension.TryProvideValueImpl(IServiceProvider serviceProvider, Boolean allowDeferredReference, Boolean mustReturnDeferredResourceReference)
   at System.Windows.ResourceDictionary.SetOptimizedStaticResources(IList`1 staticResources, IServiceProvider serviceProvider, StaticResourceExtension staticResourceWorker)
   at System.Windows.ResourceDictionary.SetKeys(IList`1 keyCollection, IServiceProvider serviceProvider)
   at System.Windows.ResourceDictionary.SetDeferrableContent(DeferrableContent deferrableContent)
   at System.Windows.Baml2006.WpfSharedBamlSchemaContext.<>c.<Create_BamlProperty_ResourceDictionary_DeferrableContent>b__297_0(Object target, Object value)
   at System.Windows.Baml2006.WpfKnownMemberInvoker.SetValue(Object instance, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
   --- End of inner exception stack trace ---
   at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
   at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at GitClientVS.UI.Views.PublishSectionView.InitializeComponent()
   at GitClientVS.UI.Views.PublishSectionView..ctor(IPublishSectionViewModel vm)
   --- End of inner exception stack trace ---
   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()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import, RuntimeExport export, Func`3 lazyFactory)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.<CreateValue>b__10_0(RuntimeImport import)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   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.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0()
   at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass55_0.<CreateExportFactoryExport>b__1()
   at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass54_0.<CreateExportFactory>b__0()
   at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_0`1.<As>b__0()
   at System.ComponentModel.Composition.ExportFactory`1.CreateExport()
   at Microsoft.VisualStudio.Composition.NetFxAdapters.MefV1ExportProvider.ComposablePartDefinitionForExportFactory.CreatePart()
   at System.ComponentModel.Composition.ReflectionModel.ExportFactoryCreator.LifetimeContext.GetExportLifetimeContextFromExport[T](Export export)
   at System.ComponentModel.Composition.ReflectionModel.ExportFactoryCreator.<>c__DisplayClass6_0`2.<CreateStronglyTypedExportFactoryOfTM>b__0()
   at System.ComponentModel.Composition.ExportFactory`1.CreateExport()
   at Microsoft.TeamFoundation.Controls.WPF.TeamExplorer.Framework.TeamExplorerSectionHost.Create()

jessehouwing avatar Mar 18 '19 19:03 jessehouwing

Talking to some of the folks at Microsoft, this seems to be a MEF Cache pollution issue. Sometimes the extension loads, but once it breaks, it remains broken until you clear the MEF cache.

jessehouwing avatar Mar 18 '19 20:03 jessehouwing

Thanks! That did the trick. I deleted %localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache and it worked.

jaltenbernd avatar Mar 18 '19 20:03 jaltenbernd

For a while and then it breaks again.

On Mon, 18 Mar 2019, 13:52 John Altenbernd, [email protected] wrote:

Thanks! That did the trick. I deleted %localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache and it worked.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MistyKuu/bitbucket-for-visual-studio/issues/97#issuecomment-474096156, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uS0lAwQeJ-P8zOYFzNXuvfOpI5gUKks5vX_yGgaJpZM4b57fF .

jessehouwing avatar Mar 18 '19 21:03 jessehouwing

Thank you @jessehouwing , clearing %localappdata%\Microsoft\VisualStudio[Version]\ComponentModelCache every time before opening VS works very well. Disabling JetBrains Resharper (or any extension where VS 2019 preview complains at the start about one of your extensions will not be compatible in the future because of this ) without clearing ComponentModelCache also works. I didn't dig in much to see which part of Resharper causing this or the whole existence, but it can be a clue. Tested in 15.9.11 and 16.0.0 Preview 5

cankutaksoy avatar Apr 07 '19 09:04 cankutaksoy

Same thing for me on VS 2019.

gbritton1 avatar Apr 10 '19 13:04 gbritton1

Same issue for me on VS 2019 and VS 2017. Any update ?

mayureshs avatar May 03 '19 12:05 mayureshs

After upgrading to VS2019 16.1.2 the issue has gone, can anyone confirm? Not sure about VS2017

MistyKuu avatar Jun 05 '19 18:06 MistyKuu

Closing due to inactivity, please reopen if still doesn't work.

MistyKuu avatar Jun 13 '19 19:06 MistyKuu

Still getting the same error on VS2019 16.1.2 and bitbucket-for-visual-studio v1.4.1.

mayureshs avatar Jun 14 '19 20:06 mayureshs

No issues here for a long time since clearing the ComponentModelCache.

On Fri, 14 Jun 2019, 22:17 Mayuresh, [email protected] wrote:

Still getting the same error on VS2019 16.1.2 and bitbucket-for-visual-studio v1.4.1.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MistyKuu/bitbucket-for-visual-studio/issues/97?email_source=notifications&email_token=AA724S5IAAT5ZVXJ46NTD4TP2P4FFA5CNFSM4G7HW7C2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXX3NII#issuecomment-502249121, or mute the thread https://github.com/notifications/unsubscribe-auth/AA724S4JZI74TUSCVHOHFWTP2P4FFANCNFSM4G7HW7CQ .

jessehouwing avatar Jun 14 '19 20:06 jessehouwing

I have tried clearing the ComponentModelCache and it resolves for the first time VS is opened. But following that it still errors out. I also have Resharper extension installed in VS2019.

mayureshs avatar Jun 14 '19 20:06 mayureshs

Thanks, after clearing of the ComponentModelCache it can be used again (VS 2019 Version 16.1.3).

Paul2701 avatar Jun 17 '19 14:06 Paul2701

Today it does not work again. The file Microsoft.VisualStudio.Default.err in ComponentModelCache:

  1. System.TypeLoadException: Could not load type 'Microsoft.VisualStudio.Language.Intellisense.SmartTag' from assembly 'Microsoft.VisualStudio.Language.Intellisense, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
  2. ReflectionTypeLoadException while enumerating types in assembly "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\EXTENSIONS\MICROSOFT\ADL TOOLS\2.3.9000.1\Microsoft.Cosmos.ScopeStudio.VsExtension.EditorMarginExtension.SqlIP.dll". Results will be incomplete.

I reported it to Microsoft.

The new version 1.41.1 seems to work again.

Paul2701 avatar Jun 18 '19 07:06 Paul2701

Still not working. No fix?

ghost avatar Jul 09 '19 09:07 ghost

Still having the same issue. VS 2019, using Bitbucket server. Clearing of ComponentModelCache did not change anything

zloivan avatar Jul 12 '19 12:07 zloivan

Today I got this error as well. Deleted all content inside the ComponentModelCache folder and it worked... Dunno for how long, though... Tested on both VS2017 & 2019 on the same machine.

CesarD avatar Sep 05 '19 17:09 CesarD

For me it doesn't work either on VS 2017 while using Resharper (2019.2) even when deleting the ComponentModelCache folder content. I'm getting the same error right away.

monsieur-d avatar Sep 09 '19 10:09 monsieur-d

Also happening for me using VS Community 2019 (v16.2.5) and Bitbucket extension (1.41.2). For the record I also have ReSharper (Ultimate 2019.2.2) and GitHub extension (2.9.1.7781) installed. I saw it once, next time I reloaded/rebooted it cleared (with no manual clearing cache). Now I'm seeing it again.

Stacktrace on Team Explorer Connect and Sync pages are identical:

Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "GitClientVS.UI.Views.PublishSectionView". ---> System.Windows.Markup.XamlParseException: Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an exception. ---> System.Xaml.XamlObjectWriterException: Set property 'System.Windows.ResourceDictionary.Source' threw an exception. ---> System.IO.IOException: Cannot locate resource 'themes/metroheader.xaml'.
   at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
   at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
   at System.IO.Packaging.PackWebResponse.CachedResponse.GetResponseStream()
   at System.IO.Packaging.PackWebResponse.GetResponseStream()
   at System.IO.Packaging.PackWebResponse.get_ContentType()
   at MS.Internal.WpfWebRequestHelper.GetContentType(WebResponse response)
   at MS.Internal.WpfWebRequestHelper.GetResponseStream(WebRequest request, ContentType& contentType)
   at System.Windows.ResourceDictionary.set_Source(Uri value)
   at System.Windows.Baml2006.WpfSharedBamlSchemaContext.<>c.<Create_BamlProperty_ResourceDictionary_Source>b__342_0(Object target, Object value)
   at System.Windows.Baml2006.WpfKnownMemberInvoker.SetValue(Object instance, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
   --- End of inner exception stack trace ---
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
   at MS.Internal.Xaml.Runtime.PartialTrustTolerantRuntime.SetValue(Object obj, XamlMember property, Object value)
   at System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, Object value, Boolean onParent)
   at System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx)
   at System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(ObjectWriterContext ctx)
   at System.Xaml.XamlObjectWriter.WriteEndMember()
   at System.Xaml.XamlWriter.WriteNode(XamlReader reader)
   at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
   at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter)
   at System.Windows.SystemResources.ResourceDictionaries.LoadDictionary(Assembly assembly, String assemblyName, String resourceName, Boolean isTraceEnabled, Uri& dictionarySourceUri)
   at System.Windows.SystemResources.ResourceDictionaries.LoadGenericDictionary(Boolean isTraceEnabled)
   at System.Windows.SystemResources.FindDictionaryResource(Object key, Type typeKey, ResourceKey resourceKey, Boolean isTraceEnabled, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
   at System.Windows.SystemResources.FindResourceInternal(Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)
   at System.Windows.FrameworkElement.FindResourceInternal(FrameworkElement fe, FrameworkContentElement fce, DependencyProperty dp, Object resourceKey, Object unlinkedParent, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, DependencyObject boundaryElement, Boolean isImplicitStyleLookup, Object& source)
   at System.Windows.StaticResourceExtension.FindResourceInAppOrSystem(IServiceProvider serviceProvider, Boolean allowDeferredReference, Boolean mustReturnDeferredResourceReference)
   at System.Windows.StaticResourceExtension.FindResourceInEnviroment(IServiceProvider serviceProvider, Boolean allowDeferredReference, Boolean mustReturnDeferredResourceReference)
   at System.Windows.StaticResourceExtension.TryProvideValueImpl(IServiceProvider serviceProvider, Boolean allowDeferredReference, Boolean mustReturnDeferredResourceReference)
   at System.Windows.ResourceDictionary.SetOptimizedStaticResources(IList`1 staticResources, IServiceProvider serviceProvider, StaticResourceExtension staticResourceWorker)
   at System.Windows.ResourceDictionary.SetKeys(IList`1 keyCollection, IServiceProvider serviceProvider)
   at System.Windows.ResourceDictionary.SetDeferrableContent(DeferrableContent deferrableContent)
   at System.Windows.Baml2006.WpfSharedBamlSchemaContext.<>c.<Create_BamlProperty_ResourceDictionary_DeferrableContent>b__297_0(Object target, Object value)
   at System.Windows.Baml2006.WpfKnownMemberInvoker.SetValue(Object instance, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
   --- End of inner exception stack trace ---
   at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
   at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at GitClientVS.UI.Views.PublishSectionView.InitializeComponent()
   at GitClientVS.UI.Views.PublishSectionView..ctor(IPublishSectionViewModel vm)
   --- End of inner exception stack trace ---
   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()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import, RuntimeExport export, Func`3 lazyFactory)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.<CreateValue>b__10_0(RuntimeImport import)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   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.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0()
   at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass55_0.<CreateExportFactoryExport>b__1()
   at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass54_0.<CreateExportFactory>b__0()
   at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_0`1.<As>b__0()
   at System.ComponentModel.Composition.ExportFactory`1.CreateExport()
   at Microsoft.VisualStudio.Composition.NetFxAdapters.MefV1ExportProvider.ComposablePartDefinitionForExportFactory.CreatePart()
   at System.ComponentModel.Composition.ReflectionModel.ExportFactoryCreator.LifetimeContext.GetExportLifetimeContextFromExport[T](Export export)
   at System.ComponentModel.Composition.ReflectionModel.ExportFactoryCreator.<>c__DisplayClass6_0`2.<CreateStronglyTypedExportFactoryOfTM>b__0()
   at System.ComponentModel.Composition.ExportFactory`1.CreateExport()
   at Microsoft.TeamFoundation.Controls.WPF.TeamExplorer.Framework.TeamExplorerSectionHost.Create()

ianleeder avatar Sep 19 '19 02:09 ianleeder

Same issue for me in Visual Studio Pro 2017(2) Version 15.9.16: -login page empty -error message like above when open Manage connections Window I completely delete the folder ComponentModelCache

sorryb avatar Sep 26 '19 06:09 sorryb

Same issue for me - Deleting ComponentCache every time resolves it. Is there any progress?

Paul-Coombs avatar Oct 10 '19 08:10 Paul-Coombs

Any progress on this. Latest VS2019 Community 16.3.5 Visual Studio Bitbucket Extension 1.41.2

Paul-Coombs avatar Oct 22 '19 12:10 Paul-Coombs

I'm using Clear MEF Component Cache extension of Mads Kristensen, which adds a button under tools-menu to automate the job 1) close visual studio, 2) open explorer to go c:\users.. what was the folder again? and 3) restart visual studio. You may need to re-login after clean-up. @sorryb if you see login popup as as a blue rectangle, try to move your mouse over it, you may can discover username and password text-boxes. which are there but didn't rendered correctly, i presume because of some missing wpf libraries in my gac. this is how I logged in just a few minutes ago. enter key works to submit.

version 1.41.2 with VS2019 16.4.0 Preview 2.0 and Resharper 2019.2

cankutaksoy avatar Oct 29 '19 13:10 cankutaksoy

I just installed the latest update and I am seeing Microsoft.VisualStudio.Composition.CompositionFailedException. On startup, all my solutions fail saying "Visual Studio encountered a non-fatal exception". The projects build, but I cannot target .NET 3.0 or get the compiler to make my code colorful based on keywords or click on the source or implementations of any method. All files appear like plain text files. This seems to be beyond just bitbucket.

chinmaysr avatar Oct 31 '19 19:10 chinmaysr

I have the same issue with Visual Studio 2019 Version 16.3.9 on Windows 10 1909

AhmedHemdan21 avatar Nov 18 '19 17:11 AhmedHemdan21

Not sure but this project looks abandoned. Last checkin was 5 months ago.

gbritton1 avatar Nov 18 '19 20:11 gbritton1

Sorry, I haven't had a chance to perform any development in this project and it doesn't look like I will in the nearest future. I'm happy to accept any PRs with fixes.

MistyKuu avatar Nov 22 '19 21:11 MistyKuu

I also get this intermittently. It seems the plugin uses a "lazy" connection to the server, not connecting unless requested. But, it also seems that some operations try to execute when a connection has not yet been established, leading to this error. For example, if I try to push a branch or create a PR, without first ensuring there is a connection, e.g. by going to the "Manage Connections" page, the plugin always crashes with the above message. It might be the visiting the corresponding page when a connection has not yet been established, not the action per se.

C057A5 avatar Dec 18 '19 14:12 C057A5

Disabling JetBrains Resharper makes this plugin work in VS2019

mayureshs avatar Feb 04 '20 13:02 mayureshs

I'm using Clear MEF Component Cache extension of Mads Kristensen, which adds a button under tools-menu to automate the job 1) close visual studio, 2) open explorer to go c:\users.. what was the folder again? and 3) restart visual studio. You may need to re-login after clean-up. @sorryb if you see login popup as as a blue rectangle, try to move your mouse over it, you may can discover username and password text-boxes. which are there but didn't rendered correctly, i presume because of some missing wpf libraries in my gac. this is how I logged in just a few minutes ago. enter key works to submit.

version 1.41.2 with VS2019 16.4.0 Preview 2.0 and Resharper 2019.2

It works now, thank you.

sorryb avatar Feb 26 '20 10:02 sorryb