question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"dotnet paket --version" hangs until forcefully closed

See original GitHub issue

Description

Short version

Some threads hang at dotnet paket --version and never moves on. This results in builds hanging because some projects never gets build; Visual Studio won’t unload projects or ReSharper fails to load; possibly also causing other faulty behaviors.

Longer version

We’ve found that having the CPU max out sometimes causes dotnet paket --version commands to hang a process. It seems to be some kind of timing issue, but we are uncertain if the issue is in dotnet faulting on the output from paket, og if paket simply never exists correctly.

The problem seems to only happen when using the new SDK project format (which is the one leveraging dotnet to begin with), as we do not have the same issue with our large Full Framework projects that have not yet been upgraded.

Also, having anti virus monitoring file changes, as well as using ReSharper, seems to increase the likelyhood dramatically of it happening.

We started noticing dotnet processes not closing down again after calling dotnet paket --version, and they seem to be what is blocking all the processes. Even more odd is, that when inspecting the process with Process Explorer and going to the Threads tab, the process finally closes down. What exactly causes the process to close down from that inspection we have still not uncovered, as listing the threads of the process via PowerShell does not yield the same result.

Repro steps

  1. Have a large solution (in our case 230 projects) in Full Framework, but in the new SDK format.
  2. Have ReSharper active in Visual Studio.
  3. Work for a bit in Visual Studio, building and navigating around for 4-5 minutes.
  4. Attempt to unload the solution

Expected behavior

Visual Studio should simply unload the solution.

Actual behavior

Unloads hangs at “Unloading project 0 of 230 …” and never quits (have tried leaving it for multiple hours). In Process Explorer a process will be running with the command dotnet paket --version.

Known workarounds

Either:

  1. Shut down the hanging process by going to the threads tab, or forcing the process to exit. Or:
  2. Removing the part in the paket.targets file that actually calls dotnet paket --version, and replacing it with calling the local paket.exe always instead. This get overridden however when paket install/update is called, and must be corrected again, and there are no switches to prevent it from happening.

Final thoughts

This issue has been downright cripling for our development department, as everything slowed down to an almost standstill. Different developers saw the bug more or less frequently, but some had an unresponsive Visual Studio for 10-15 minutes at a time.

We do not know, however, if the error is with dotnet instead of directly with paket, but it is only in combination of the two we have the error.

The best solution, for us right now, I believe is to have some sort of flag, that would brevet paket to get asked all the time.

I hope the issue makes somewhat sense, and that a more permanent solution can be found, rather than we manually fix the targets file, time and time again… 😃

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

6reactions
JohnyWScommented, Nov 9, 2019

You’re welcome. Awesome product! 😃 And now I’ve forced 40 developers to use it here, so I’d better make sure it works for them. 😉 I’ve opened #3706 that should be a good first step to solving it.

0reactions
forkicommented, Nov 9, 2019

I’m happy about all the help that we can get. It’s extremely tricky to get those things working on all the platforms. Thanks for jumping in.

Johny Woller Skovdal notifications@github.com schrieb am Sa., 9. Nov. 2019, 14:26:

This also seems to be an error:

<PaketExePath Condition=" '$(PaketExePath)' == '' AND '$(OS)' != 'Windows_NT' AND Exists('$(PaketBootStrapperExeDir)') ">$(PaketBootStrapperExeDir)paket.exe</PaketExePath>

Shouldn’t “paket.exe” be included in the “Exists” test? I’ll be changing that in the PR to begin with, and we’ll see where it leads us… 😃

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fsprojects/Paket/issues/3705?email_source=notifications&email_token=AAAOANBQDFZ3T33IMOL2JSDQS23CHA5CNFSM4JLAUE2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDUGD4A#issuecomment-552100336, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOANFOPRBJCS625FFN3X3QS23CHANCNFSM4JLAUE2A .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Started to get "This project is targeting a version of .NET ...
This project is targeting a version of .NET which is not installed. Then there's an Install link to the right of the warning...
Read more >
Can't get paket to work for the simplest case : r/fsharp
I think you need to run `dotnet paket restore`; this will ensure that the package is actually restored and available to your app....
Read more >
Visual Studio hangs or crashes, several times per week
Visual Studio hangs or crashes, several times per week. This most often occurs while debugging XAML code or after modifying code while debugging...
Read more >
Unable to Download nuGet Package 'System.Runtime. ...
An existing connection was forcibly closed by the remote host Failed to download package 'System.Runtime.CompilerServices.Unsafe.6.0.0' from ' ...
Read more >
Can I automatically increment the file build version when ...
In visual Studio 2008, the following works. Find the AssemblyInfo.cs file and find these 2 lines: [assembly: AssemblyVersion("1.0.0.0")] ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found