Skip to content

An error occurred while upgrading... but no error message #251

Closed

Description

@r30e

When running this against some of my solutions I'm getting an error message:

An error occurred while upgrading [Project Name here]

There is not information to help me diagnose why I'm getting this error. Is it possible to log out RunStatus.Output to provide some hope of solving this?

Possibly, this could be behind a --verbose flag to prevent it littering the logs for everyone?

Activity

  1. jeffward01 commented on Mar 28, 2022

    @jeffward01

    I also have this error, its strange, if I run:

    > dotnet-outdated -u

    I will receive that error 'alert', but no message or details. Even when I output the results to a file, no error or issues are mentioned.

    The strange part is if I upgrade or run a command like:

    > dotnet add <project> package

    the package will update without issue.

    I am not able to update my project in some random cases with using nukeeper or dotnet-outdated, but if I run the standard dotnet command as I displayed above, it executes without issue.

  2. spaasis commented on Apr 26, 2022

    @spaasis

    Same here - running the tool in Azure pipelines occasionally fails without error messages

  3. p1971 commented on May 30, 2022

    @p1971

    Got a similar error message.
    I uninstalled global and local, then reinstalled as local and it worked.

  4. specialforest commented on Jun 8, 2022

    @specialforest

    For me the issue was coming from DotNetRunner having hardcoded 20 seconds timeout for adding a package (and restoring them):
    https://github.com/dotnet-outdated/dotnet-outdated/blob/master/src/DotNetOutdated.Core/Services/DotNetRunner.cs#L36

    As workaround could try "--no-restore" option.

  5. mechelewskim commented on Aug 24, 2022

    @mechelewskim

    We're having the same issue occasionally when using the tool in our workflow in Github Actions and upgrading packages stored in Github Packages.

  6. mishioo commented on Oct 19, 2022

    @mishioo

    I'm also experiencing this problem. I'm getting the An error occurred while upgrading ... notification for each package in my project. I'm keeping my PackageReferences in Directory.Build.targets file instead of .csproj, could that be the cause?

    Edit: anyway, some way of seeing what kind of error occurred would be helpful.

  7. reduckted commented on Nov 27, 2022

    @reduckted
    Contributor

    I'm experiencing this as well. I have a very large solution and due to antivirus software that I'm unable to do anything about, a restore takes more than 20 seconds. That makes dotnet-outdated completely unusable for me. 😢

  8. mpdunlop commented on Aug 17, 2023

    @mpdunlop

    I setup dotnet outdated today on a build machine and ran into this issue. A configurable timeout would be solve this issue for us.

    In the meantime I've started running dotnet restore prior to dotnet outdated to give it a chance to finish.

  9. reduckted commented on Aug 17, 2023

    @reduckted
    Contributor

    I wonder if a --no-restore option would be easier to implement, rather than a configurable timeout. 🤔

  10. mpdunlop commented on Aug 17, 2023

    @mpdunlop

    Both options sound good, as long as the error messaging is updated to better communicate the error.

  11. reduckted commented on Aug 20, 2023

    @reduckted
    Contributor

    @slang25 Do you have a preference between a configurable timeout vs a --no-restore option? #248 adds a configurable timeout. I'm happy to implement a --no-restore option if that's preferred.

  12. r30e commented on Aug 20, 2023

    @r30e
    Author
  13. reduckted commented on Aug 20, 2023

    @reduckted
    Contributor

    I just realized that there's already a --no-restore option 🤦‍♂️. It's used for skipping package restore when updating packages.

    I've come up with a different solution in #468. Rather than having a fixed timeout of 20 seconds for running the dotnet process, the timeout only applies from the time when output from the dotnet process was last received. So as long as the dotnet process is still writing something to stdout or stderr, dotnet-outdated will continue to wait for it to complete. If it doesn't output anything for 20 seconds, then the process is aborted.

  14. martincostello commented on Aug 21, 2023

    @martincostello
    Contributor

    Using --no-restore didn't solve the issue for me. The 20 second timeout still gets hit when dotnet msbuild is invoked to retrieve the dependency graph here:

    string[] arguments = { "msbuild", $"\"{projectPath}\"", "/t:Restore,GenerateRestoreGraphFile", $"/p:RestoreGraphOutputPath=\"{dgOutput}\"" };

  15. timabell commented on Jun 11, 2026

    @timabell
    Contributor

    This issue isn't resolved for me

    $ dotnet outdated --version                     
    A .NET Core global tool to list outdated Nuget packages.
    4.8.1+9730dd4f48fe1df7e30f35a0c6ed826107f4a547
    
    $ dotnet outdated --version-lock Major --upgrade
    Discovering projects...
    Analyzing project(s)...
    Analyzing dependencies...
    » BackendAccountService.Api
      [net8.0]
      SonarAnalyzer.CSharp  9.30.0.95878 -> 9.32.0.97167
    
    ...
    
    Upgrading package SonarAnalyzer.CSharp...
    An error occurred while upgrading BackendAccountService.Api
    
    An error occurred while upgrading BackendAccountService.Api.UnitTests
    
    An error occurred while upgrading BackendAccountService.Core
    
    ...
    

    The merged PR may have resolved one cause of errors, but this issue is asking for a --verbose that stops dotnet-updated from swallowing stdout/stderr from the underlying processes attempting (and failing) the package changes.

    I vote to re-open.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions