Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

An exception was thrown while initializing part "GitHub.Infrastructure.ExportedHttpClient" #2186

Closed

Description

@MarkLStewart

Versions

  • GitHub Extension for Visual Studio version: 2.7.0.6566
  • Visual Studio version: 14.0.25431.01 Update 3

What happened

I receive the error below when attempting to open Team Explorer. This extension was updated today and have been experiencing this error ever since it was installed. Uninstalling the extension makes the error go away. When I reinstalled the ext. the issue came back.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to Team Explorer

Expected behavior

I expected to see my GitHub project (Changes, Branches, etc.)

Screenshots

Logs

2019-01-18 12:17:22.377 [18072] EROR [08] TeamExplorerNavigationItemBase
System.AggregateException: One or more errors occurred. ---> Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "GitHub.Infrastructure.ExportedHttpClient". ---> System.MissingMethodException: Method not found: 'System.Net.Http.HttpMessageHandler Octokit.Internal.HttpMessageHandlerFactory.CreateDefault()'.
at GitHub.Infrastructure.ExportedHttpClient..ctor()
--- 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.b__0()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.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.WhereSelectEnumerableIterator2.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.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_01.b__0()
at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue()
at System.Lazy1.get_Value() at GitHub.Api.SimpleApiClient.<HasWikiInternal>d__22.MoveNext() in C:\projects\visualstudio\src\GitHub.Api\SimpleApiClient.cs:line 123 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at GitHub.Api.SimpleApiClient.<GetRepositoryInternal>d__19.MoveNext() in C:\projects\visualstudio\src\GitHub.Api\SimpleApiClient.cs:line 74 --- End of stack trace from previous location where exception was thrown --- 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.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.b__10_0(RuntimeImport import)
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.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.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.b__0()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.b__0()
at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_01.<As>b__0() at System.Lazy1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Lazy1.get_Value() at GitHub.Api.SimpleApiClient.<IsEnterpriseInternal>d__23.MoveNext() in C:\projects\visualstudio\src\GitHub.Api\SimpleApiClient.cs:line 138 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at GitHub.Api.SimpleApiClient.<IsEnterprise>d__21.MoveNext() in C:\projects\visualstudio\src\GitHub.Api\SimpleApiClient.cs:line 106 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at GitHub.VisualStudio.Base.TeamExplorerItemBase.<GetRepositoryOrigin>d__18.MoveNext() in C:\projects\visualstudio\src\GitHub.VisualStudio.UI\Base\TeamExplorerItemBase.cs:line 144 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at GitHub.VisualStudio.Base.TeamExplorerItemBase.<IsAGitHubRepo>d__19.MoveNext() in C:\projects\visualstudio\src\GitHub.VisualStudio.UI\Base\TeamExplorerItemBase.cs:line 155 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at GitHub.VisualStudio.Base.TeamExplorerNavigationItemBase.<InvalidateAsync>d__4.MoveNext() in C:\projects\visualstudio\src\GitHub.TeamFoundation.14\Base\TeamExplorerNavigationItemBase.cs:line 52 --- End of inner exception stack trace --- ---> (Inner Exception #0) Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "GitHub.Infrastructure.ExportedHttpClient". ---> System.MissingMethodException: Method not found: 'System.Net.Http.HttpMessageHandler Octokit.Internal.HttpMessageHandlerFactory.CreateDefault()'. at GitHub.Infrastructure.ExportedHttpClient..ctor() --- 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() --- 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.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.b__10_0(RuntimeImport import)
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.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.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.b__0()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.b__0()
at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_01.<As>b__0() at System.Lazy1.CreateValue()
at System.Lazy1.LazyInitValue() at System.Lazy1.get_Value()
at GitHub.Api.SimpleApiClient.d__22.MoveNext() in C:\projects\visualstudio\src\GitHub.Api\SimpleApiClient.cs:line 123
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at GitHub.Api.SimpleApiClient.d__19.MoveNext() in C:\projects\visualstudio\src\GitHub.Api\SimpleApiClient.cs:line 74
--- End of stack trace from previous location where exception was thrown ---
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.b__0()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.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.WhereSelectEnumerableIterator2.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.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_01.b__0()
at System.Lazy1.CreateValue() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Lazy1.get_Value()
at GitHub.Api.SimpleApiClient.d__23.MoveNext() in C:\projects\visualstudio\src\GitHub.Api\SimpleApiClient.cs:line 138
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at GitHub.Api.SimpleApiClient.d__21.MoveNext() in C:\projects\visualstudio\src\GitHub.Api\SimpleApiClient.cs:line 106
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at GitHub.VisualStudio.Base.TeamExplorerItemBase.d__18.MoveNext() in C:\projects\visualstudio\src\GitHub.VisualStudio.UI\Base\TeamExplorerItemBase.cs:line 144
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at GitHub.VisualStudio.Base.TeamExplorerItemBase.d__19.MoveNext() in C:\projects\visualstudio\src\GitHub.VisualStudio.UI\Base\TeamExplorerItemBase.cs:line 155
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at GitHub.VisualStudio.Base.TeamExplorerNavigationItemBase.d__4.MoveNext() in C:\projects\visualstudio\src\GitHub.TeamFoundation.14\Base\TeamExplorerNavigationItemBase.cs:line 52<---

Activity

  1. mjohnson1122 commented on Jan 18, 2019

    @mjohnson1122

    I had this happen to me as well yesterday. You beat me to it.

  2. meaghanlewis commented on Jan 18, 2019

    @meaghanlewis
    Contributor

    @MarkLStewart thanks for letting us know about this issue. I'm currently unable to reproduce this. We'll have to look into it more to see what might be going wrong.

    @MarkLStewart @mjohnson1122 just curious if you updated to version 2.7.0 from the previous release 2.6.1? Just trying to get an idea of how we can repro this.

  3. mjohnson1122 commented on Jan 18, 2019

    @mjohnson1122

    Mine was updated from version 2.2. It was set to automatically update so I'm not really sure why it was such a drastic jump in version numbers and why it wasn't from version 2.6.

  4. jcansdale commented on Jan 21, 2019

    @jcansdale
    Collaborator

    @MarkLStewart, @mjohnson1122,

    Thanks for the report. I've dug into this but it isn't obvious what's going wrong.

    I'm interested to know the following:

    • Are you both using Visual Studio 2015?
    • Do you have any other versions of Visual Studio installed?
    • Does the extension work on any other installed version?

    Sometimes when updating an extension, Visual Studio's MEF cache doesn't get refreshed correctly. I wonder is this is the problem in this case? Could you try installing the extension again and see if you get the same error? You can simply download and install over the top of whatever version you have installed. Here is a download link:
    https://visualstudio.github.com/

    Thanks!

  5. shana commented on Jan 21, 2019

    @shana
    Contributor

    Also, if you're still having this issue, what other extensions do you have installed in VS 2015? A list is available in Help -> About.

  6. grokys commented on Jan 22, 2019

    @grokys
    Contributor

    Another thing you could do to help us: could you try attaching another instance of the VS debugger and checking the version/path to Octokit.dll and System.Net.Http? If you can let us know those versions and paths that might help diagnose the problem.

  7. jcansdale commented on Jan 22, 2019

    @jcansdale
    Collaborator

    @mjohnson1122, @MarkLStewart,

    Could you try creating and running a console app with the following method:

            static void Main()
            {
                Console.WriteLine(Assembly.Load("System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"));
                Console.ReadLine();
            }

    I'm interested to know if it outputs System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a or throws an exception.

  8. jcansdale commented on Jan 22, 2019

    @jcansdale
    Collaborator

    @mjohnson1122, @MarkLStewart could you try the build linked at the top of this PR #2191. If you could comment there on whether it works or not, that would be much appreciated. 🙏

  9. Ashley2525 commented on Jan 22, 2019

    @Ashley2525

    I'm seeing this too... was working great at around 3am, today at about 10am, open VS, click Team Explorer pane, crash. I didn't look frame-for-frame but I think it's the same stack...

    Microsoft.VisualStudio.Composition.CompositionFailedException
      HResult=0x80131500
      Message=An exception was thrown while initializing part "GitHub.Infrastructure.ExportedHttpClient".
      Source=Microsoft.VisualStudio.Composition
      StackTrace:
       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.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
       at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_0`1.<As>b__0()
       at System.Lazy`1.CreateValue() in f:\dd\ndp\clr\src\BCL\system\Lazy.cs:line 463
       at System.Lazy`1.LazyInitValue() in f:\dd\ndp\clr\src\BCL\system\Lazy.cs:line 410
       at System.Lazy`1.get_Value() in f:\dd\ndp\clr\src\BCL\system\Lazy.cs:line 339
       at GitHub.Api.SimpleApiClient.<IsEnterpriseInternal>d__23.MoveNext() in C:\projects\visualstudio\src\GitHub.Api\SimpleApiClient.cs:line 138
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 184
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 156
       at GitHub.Api.SimpleApiClient.<IsEnterprise>d__21.MoveNext() in C:\projects\visualstudio\src\GitHub.Api\SimpleApiClient.cs:line 106
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 184
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 156
       at GitHub.VisualStudio.Base.TeamExplorerItemBase.<GetRepositoryOrigin>d__18.MoveNext() in C:\projects\visualstudio\src\GitHub.VisualStudio.UI\Base\TeamExplorerItemBase.cs:line 144
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 184
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 156
       at GitHub.VisualStudio.Base.TeamExplorerItemBase.<IsAGitHubRepo>d__19.MoveNext() in C:\projects\visualstudio\src\GitHub.VisualStudio.UI\Base\TeamExplorerItemBase.cs:line 155
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 184
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\TaskAwaiter.cs:line 156
       at GitHub.VisualStudio.TeamExplorer.Home.GitHubHomeSection.<RepoChanged>d__9.MoveNext() in C:\projects\visualstudio\src\GitHub.TeamFoundation.14\Home\GitHubHomeSection.cs:line 67
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state) in f:\dd\ndp\clr\src\BCL\system\runtime\compilerservices\AsyncMethodBuilder.cs:line 1018
       at Microsoft.VisualStudio.Threading.JoinableTaskFactory.SingleExecuteProtector.TryExecute()
       at Microsoft.VisualStudio.Threading.JoinableTaskFactory.SingleExecuteProtector.<>c.<.cctor>b__20_0(Object state)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs:line 954
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs:line 901
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) in f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs:line 890
       at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    
    Inner Exception 1:
    MissingMethodException: Method not found: 'System.Net.Http.HttpMessageHandler Octokit.Internal.HttpMessageHandlerFactory.CreateDefault()'.
    
  10. Ashley2525 commented on Jan 22, 2019

    @Ashley2525

    @mjohnson1122, @MarkLStewart,

    Could you try creating and running a console app with the following method:

            static void Main()
            {
                Console.WriteLine(Assembly.Load("System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"));
                Console.ReadLine();
            }

    I'm interested to know if it outputs System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a or throws an exception.

    @jcansdale it throws for me...

    Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 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.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
       at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.Load(String assemblyString)
       at ConsoleApp.Program.Main(String[] args) in c:\MyConsoleApp\ConsoleApp\ConsoleApp\Program.cs:line 10
    Press any key to continue . . .
    
  11. Ashley2525 commented on Jan 22, 2019

    @Ashley2525

    @jcansdale fuslogvw.exe produces...

    *** Assembly Binder Log Entry  (1/22/2019 @ 11:24:24 AM) ***
    
    The operation failed.
    Bind result: hr = 0x80070002. The system cannot find the file specified.
    
    Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
    Running under executable  C:\MyConsoleApp\ConsoleApp\ConsoleApp\bin\Debug\ConsoleApp.exe
    --- A detailed error log follows. 
    
    === Pre-bind state information ===
    LOG: DisplayName = System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
     (Fully-specified)
    LOG: Appbase = file:///c:/MyConsoleApp/ConsoleApp/ConsoleApp/bin/Debug/
    LOG: Initial PrivatePath = NULL
    LOG: Dynamic Base = NULL
    LOG: Cache Base = NULL
    LOG: AppName = ConsoleApp.exe
    Calling assembly : ConsoleApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
    ===
    LOG: This bind starts in default load context.
    LOG: Using application configuration file: c:\MyConsoleApp\ConsoleApp\ConsoleApp\bin\Debug\ConsoleApp.exe.Config
    LOG: Using host configuration file: 
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
    LOG: Post-policy reference: System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    LOG: GAC Lookup was unsuccessful.
    LOG: Attempting download of new URL file:///c:/MyConsoleApp/ConsoleApp/ConsoleApp/bin/Debug/System.Net.Http.DLL.
    LOG: Attempting download of new URL file:///c:/MyConsoleApp/ConsoleApp/ConsoleApp/bin/Debug/System.Net.Http/System.Net.Http.DLL.
    LOG: Attempting download of new URL file:///c:/MyConsoleApp/ConsoleApp/ConsoleApp/bin/Debug/System.Net.Http.EXE.
    LOG: Attempting download of new URL file:///c:/MyConsoleApp/ConsoleApp/ConsoleApp/bin/Debug/System.Net.Http/System.Net.Http.EXE.
    LOG: All probing URLs attempted and failed.
    
    
  12. Ashley2525 commented on Jan 22, 2019

    @Ashley2525

    I just tried Visual Studio Repair ... no dice, same issue.

  13. Ashley2525 commented on Jan 22, 2019

    @Ashley2525

    Another thing you could do to help us: could you try attaching another instance of the VS debugger and checking the version/path to Octokit.dll and System.Net.Http? If you can let us know those versions and paths that might help diagnose the problem.

    @grokys ...

    image

    image

  14. Ashley2525 commented on Jan 22, 2019

    @Ashley2525

    Also, I reverted to 2.6.0 problem went away. I'll try to use that for now. Thanks.

  15. MarkLStewart commented on Jan 24, 2019

    @MarkLStewart
    Author

    @mjohnson1122, @MarkLStewart,
    Could you try creating and running a console app with the following method:
    static void Main()
    {
    Console.WriteLine(Assembly.Load("System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"));
    Console.ReadLine();
    }
    I'm interested to know if it outputs System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a or throws an exception.

    Here's what I got:

    An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
    
    Additional information: Could not load file or assembly 'System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
    
  16. MarkLStewart commented on Jan 24, 2019

    @MarkLStewart
    Author

    Just installed 2.7.1.6591 and all is well in the world again. Thank you!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions