New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.VisualStudio.Composition.CompositionFailedException #484

Closed
cookston opened this Issue Aug 9, 2016 · 14 comments

Comments

Projects
None yet
5 participants
@cookston

cookston commented Aug 9, 2016

Issue occurs regularly, perhaps once or twice day, an exception is displayed in Team Explorer when launching Visual Studio.
Current workaround is to uninstall and re-install GitHub Extension (but currently having to do this often) Extension then works without problem for a few hours.

image

Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "GitHub.VisualStudio.TeamExplorer.Connect.GitHubConnectSection0". ---> System.Windows.Markup.XamlParseException: Set property 'GitHub.VisualStudio.Helpers.SharedDictionaryManager.Source' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'GitHub.UI, Culture=neutral' or one of its dependencies. The system cannot find the file specified.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at System.Windows.Navigation.BaseUriHelper.GetLoadedAssembly(String assemblyName, String assemblyVersion, String assemblyKey)
   at MS.Internal.AppModel.ResourceContainer.GetResourceManagerWrapper(Uri uri, String& partName, Boolean& isContentFile)
   at MS.Internal.AppModel.ResourceContainer.GetPartCore(Uri uri)
   at System.IO.Packaging.Package.GetPartHelper(Uri partUri)
   at System.IO.Packaging.Package.GetPart(Uri partUri)
   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 GitHub.VisualStudio.Helpers.SharedDictionaryManager.set_Source(Uri value) in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\common\SharedDictionaryManager.cs:line 54
   --- 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 GitHub.VisualStudio.UI.Views.GitHubConnectContent.InitializeComponent() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\GitHub.VisualStudio.UI\UI\Views\GitHubConnectContent.xaml:line 1
   at GitHub.VisualStudio.UI.Views.GitHubConnectContent..ctor() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\GitHub.VisualStudio.UI\UI\Views\GitHubConnectContent.xaml.cs:line 16
   at GitHub.VisualStudio.TeamExplorer.Connect.GitHubConnectSection.OnPropertyChange(Object sender, PropertyChangedEventArgs e) in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\GitHub.TeamFoundation.14\Connect\GitHubConnectSection.cs:line 198
   at GitHub.Primitives.NotificationAwareObject.RaisePropertyChanged(String propertyName) in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\GitHub.Exports\Helpers\NotificationAwareObject.cs:line 12
   at GitHub.VisualStudio.Base.TeamExplorerItemBase.set_IsVisible(Boolean value) in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\GitHub.VisualStudio.UI\Base\TeamExplorerItemBase.cs:line 141
   at GitHub.VisualStudio.TeamExplorer.Connect.GitHubConnectSection.Refresh(IConnection connection) in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\GitHub.TeamFoundation.14\Connect\GitHubConnectSection.cs:line 160
   at GitHub.VisualStudio.TeamExplorer.Connect.GitHubConnectSection.UpdateConnection() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\GitHub.TeamFoundation.14\Connect\GitHubConnectSection.cs:line 190
   at GitHub.VisualStudio.TeamExplorer.Connect.GitHubConnectSection..ctor(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder, IConnectionManager manager, IPackageSettings packageSettings, Int32 index) in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\GitHub.TeamFoundation.14\Connect\GitHubConnectSection.cs:line 108
   at GitHub.VisualStudio.TeamExplorer.Connect.GitHubConnectSection0..ctor(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder, IConnectionManager manager, IPackageSettings settings) in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\GitHub.TeamFoundation.14\Connect\GitHubConnectSection0.cs:line 21
   --- 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.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()

Visual Studio 14.0.254.25.01 Update 3
image

Git Hub Extension
1.0.18.6
image

Logs from:
%appdata%\Microsoft\VisualStudio\14.0\ActivityLog.xml
%localappdata%\temp\extension.log
%localappdata%\GitHubVisualStudio\extension.log

logs.zip

@cookston

This comment has been minimized.

Show comment
Hide comment
@cookston

cookston Aug 9, 2016

Seems related to #142

cookston commented Aug 9, 2016

Seems related to #142

@grokys grokys added the bug label Aug 9, 2016

@shana

This comment has been minimized.

Show comment
Hide comment
@shana

shana Aug 9, 2016

Collaborator

@cookston This looks to be the same as #461. So sorry you're getting this, it's a race condition introduced in 1.0.18.3 that wasn't getting triggered until very recently, for some reason 😢

We have a fix for it in version 2.0.14, which is due out today and is already available in our custom gallery feed (https://visualstudio.github.com/releases/feed.rss), from our releases page, or directly from https://ghfvs-installer.github.com/releases/stable/2.0.14.0/GitHub.VisualStudio.vsix

Could you try it out and see if it fixes things for you? It fixes this on our testing, but the more confirmation the better.

Collaborator

shana commented Aug 9, 2016

@cookston This looks to be the same as #461. So sorry you're getting this, it's a race condition introduced in 1.0.18.3 that wasn't getting triggered until very recently, for some reason 😢

We have a fix for it in version 2.0.14, which is due out today and is already available in our custom gallery feed (https://visualstudio.github.com/releases/feed.rss), from our releases page, or directly from https://ghfvs-installer.github.com/releases/stable/2.0.14.0/GitHub.VisualStudio.vsix

Could you try it out and see if it fixes things for you? It fixes this on our testing, but the more confirmation the better.

@shana

This comment has been minimized.

Show comment
Hide comment
@shana

shana Aug 9, 2016

Collaborator

2.0.14.1 is live in the Visual Studio gallery with a fix for this.

Collaborator

shana commented Aug 9, 2016

2.0.14.1 is live in the Visual Studio gallery with a fix for this.

@cookston

This comment has been minimized.

Show comment
Hide comment
@cookston

cookston Aug 9, 2016

Great - thank you! So far it is working well.

cookston commented Aug 9, 2016

Great - thank you! So far it is working well.

@cookston

This comment has been minimized.

Show comment
Hide comment
@cookston

cookston Aug 9, 2016

I spoke too soon.
The problem remains with 2.0.14.1:

image

cookston commented Aug 9, 2016

I spoke too soon.
The problem remains with 2.0.14.1:

image

@shana

This comment has been minimized.

Show comment
Hide comment
@shana

shana Aug 9, 2016

Collaborator

😢

There's a few more things I can think of doing to track this down, I'll get a patch going and link you to a new build in a bit.

Collaborator

shana commented Aug 9, 2016

😢

There's a few more things I can think of doing to track this down, I'll get a patch going and link you to a new build in a bit.

@shana

This comment has been minimized.

Show comment
Hide comment
@shana

shana Aug 9, 2016

Collaborator

Does the Connect page start failing randomly after working for a while? Or does it only fail when you first go to it after starting VS?

Collaborator

shana commented Aug 9, 2016

Does the Connect page start failing randomly after working for a while? Or does it only fail when you first go to it after starting VS?

@shana

This comment has been minimized.

Show comment
Hide comment
@shana

shana Aug 9, 2016

Collaborator

I suspect this got introduced in 1.0.18.3. If that's the case, then you can try downgrading to https://github.com/github/VisualStudio/releases/tag/v1.0.18.2 while we investigate.

Collaborator

shana commented Aug 9, 2016

I suspect this got introduced in 1.0.18.3. If that's the case, then you can try downgrading to https://github.com/github/VisualStudio/releases/tag/v1.0.18.2 while we investigate.

@cookston

This comment has been minimized.

Show comment
Hide comment
@cookston

cookston Aug 9, 2016

OK thanks - I have reverted. Will let you know if the problem occurs with v1.10.18.2

cookston commented Aug 9, 2016

OK thanks - I have reverted. Will let you know if the problem occurs with v1.10.18.2

shana added a commit that referenced this issue Aug 9, 2016

@shana shana closed this in #488 Aug 9, 2016

@shana shana reopened this Aug 9, 2016

@shana

This comment has been minimized.

Show comment
Hide comment
@shana

shana Aug 9, 2016

Collaborator

@cookston There is a new build, 2.0.14.2, which includes a potential fix to the issue you're seeing 🙏

You can download it from http://ghfvs-installer.github.com/releases/2.0.14.2/GitHub.VisualStudio.vsix or from the releases page.

Please do let us know if this fixes things, we can't currently repro the issue so it's hard for us to be 100% confident that we've covered all the edge cases here.

Collaborator

shana commented Aug 9, 2016

@cookston There is a new build, 2.0.14.2, which includes a potential fix to the issue you're seeing 🙏

You can download it from http://ghfvs-installer.github.com/releases/2.0.14.2/GitHub.VisualStudio.vsix or from the releases page.

Please do let us know if this fixes things, we can't currently repro the issue so it's hard for us to be 100% confident that we've covered all the edge cases here.

@shana

This comment has been minimized.

Show comment
Hide comment
@shana

shana Aug 19, 2016

Collaborator

Should be fixed in 2.0.14.2 and above.

Collaborator

shana commented Aug 19, 2016

Should be fixed in 2.0.14.2 and above.

@shana shana closed this Aug 19, 2016

@cookston

This comment has been minimized.

Show comment
Hide comment
@cookston

cookston Aug 19, 2016

Yes - thanks the issue has not returned since the upgrade.

Yes - thanks the issue has not returned since the upgrade.

@IT-CASADO

This comment has been minimized.

Show comment
Hide comment
@IT-CASADO

IT-CASADO Oct 11, 2016

Is this really fixed!? I got exactly this error in Visual Studio last days. My installed version is 2.0.15.1.

Is this really fixed!? I got exactly this error in Visual Studio last days. My installed version is 2.0.15.1.

@JohnnyBravo75

This comment has been minimized.

Show comment
Hide comment
@JohnnyBravo75

JohnnyBravo75 Mar 31, 2017

My installed version is 2.2.0.8 and I get:

Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "GitHub.Services.VSGitServices". ---> System.NullReferenceException: Object reference not set to an instance of an object.
at GitHub.VisualStudio.GitHubProviderDispatcher.GetServiceT in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\GitHub.VisualStudio\Services\GitHubServiceProvider.cs:line 63
at GitHub.Services.VSGitServices..ctor(IGitHubServiceProvider serviceProvider) in Y:\jenki....

My installed version is 2.2.0.8 and I get:

Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "GitHub.Services.VSGitServices". ---> System.NullReferenceException: Object reference not set to an instance of an object.
at GitHub.VisualStudio.GitHubProviderDispatcher.GetServiceT in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\GitHub.VisualStudio\Services\GitHubServiceProvider.cs:line 63
at GitHub.Services.VSGitServices..ctor(IGitHubServiceProvider serviceProvider) in Y:\jenki....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment