Skip to content
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

[NBug] Could not load file or assembly 'mscorlib, Version=4.0.0.0,... #11676

Closed
drewnoakes opened this issue Apr 10, 2024 · 8 comments
Closed

Comments

@drewnoakes
Copy link
Member

Environment

  • Git Extensions 4.2.1.17611
  • Build b0c0b28
  • Git 2.44.0.windows.1
  • Microsoft Windows NT 10.0.22631.0
  • .NET 6.0.28
  • DPI 144dpi (150% scaling)
  • Portable: False

Issue description

System.IO.FileNotFoundException: Could not load file or assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
File name: 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
   at async Task<bool> GitUI.VisualStudioIntegration.TryOpenFileInRunningInstanceAsync(string filePath)
   at void System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start<TStateMachine>(ref TStateMachine stateMachine)
   at Task<bool> GitUI.VisualStudioIntegration.TryOpenFileInRunningInstanceAsync(string filePath)
   at async void GitUI.VisualStudioIntegration.OpenFile(string filePath)+(?) => { } in C:/projects/gitextensions/GitUI/VisualStudioIntegration.cs:line 42
   at async Task GitUI.TaskManager.HandleExceptionsAsync(Func<Task> asyncAction, Func<Exception, Task> handleExceptionAsync) in C:/projects/gitextensions/GitExtUtils/GitUI/TaskManager.cs:line 38

Steps to reproduce

Right-clicked an unstaged file in FormCommit and selected "Open in Visual Studio".

Did this work in previous version of GitExtensions?

I haven't seen this before, and I used the feature from time-to-time.

It's possible I was running the VS installer during this time.

Diagnostics

No response

Copy link

💡 The issue has been fixed in v4.2-rc1. Please update your version.

Copy link

Potential duplicates:

  • #7606
  • #8089
  • #8187
  • #8325
  • #8476
  • #9920
  • #9922
  • #10363
  • #10367
  • #10368
  • #10376
  • #10381
  • #10392
  • #10412
  • #10413
  • #10476
  • #10528
  • #10530
  • #10551
  • #10555
  • #10562
  • #10565
  • #10569
  • #10596
  • #10609
  • #10623
  • #10624
  • #10625
  • #10627
  • #10628
  • #10631
  • #10650
  • #10652
  • #10734
  • #10738
  • #10771
  • #10772
  • #10803
  • #10804
  • #10813
  • #10874
  • #10875
  • #10876
  • #11047
  • #11066
  • #11100
  • #11153
  • #11214
  • #11228
  • #11291
  • #11298
  • #11302
  • #11304
  • #11322
  • #11355
  • #11359
  • #11361
  • #11546

@drewnoakes
Copy link
Member Author

Actually, based on the variety of these issues, I'm going to reopen. Someone who knows this bot and the issue tracker a bit will know better whether to close it.

@drewnoakes drewnoakes reopened this Apr 10, 2024
@pmiossec
Copy link
Member

It's possible I was running the VS installer during this time.

All the "Could not load" issue reports on "features that were working well before" that we got at the moment are linked to assemblies updated by Windows update.

So restarting GE is enough.

@drewnoakes
Copy link
Member Author

Thanks, I'll close this then.

Wonder if there's a better experience we can offer here though.

@mstv
Copy link
Member

mstv commented Apr 11, 2024

Wonder if there's a better experience we can offer here though.

It is caused by Windows updating .NET...
A workaround might be that GE should asynchronously load all DLLs which it might ever use.
I doubt GE is the only affected app.

@RussKie
Copy link
Member

RussKie commented Apr 12, 2024

We can hardlock all the assemblies. Or block the Windows Update 😈😈😈😈

@mstv
Copy link
Member

mstv commented Apr 12, 2024

We can hardlock all the assemblies. Or block the Windows Update

🤔 A reboot is anyway required after a .NET update. So the assemblies should rather be replaced during that reboot.

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

No branches or pull requests

4 participants