dotnet-outdated: Errors when projects target .NET 5
I’m using dotnet-outdated v2.11.0
and after updating the TFM of my projects to net5.0
and running dotnet outdated
to analyze the packages to migrate, I’m getting the errors below:
Errors occurred while analyzing dependencies for some of your projects. Are you sure you can connect to all your configured NuGet servers?
Unable to find DOTNET_HOST_PATH environment variable. If you use credential providers for your NuGet sources you need to have this set to the path to the `dotnet` executable.
I have a nuget.config
at the root the repo pointing to nuget.org exclusively thus I don’t think it’s the case of not being able to connect to nuget servers.
DOTNET_HOST_PATH
is indeed not defined (not sure why… Probably something missing in the .NET 5 SDK install process).
My nuget.config
:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<disabledPackageSources>
<clear />
</disabledPackageSources>
<fallbackPackageFolders>
<clear />
</fallbackPackageFolders>
</configuration>
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 26 (11 by maintainers)
Ah! Ok, the penny has dropped.
So when you run
dotnet outdated --version
you see2.11....
, this is the original tool that was abandoned and de-listed from nuget.org.This repository is the official continuation of that project, however has a different nuget id.
In order to have the latest version which should not have this issue please run the following:
As a consumer of this tool, this sucks, please accept my appologies. If you still have this issue then please let us know.
It’s happening again with .NET 7.0 RTM. I’m using V 4.3.0.
@slang25 Ah, perfect! That explains it. Uninstalling the outdated
dotnet-outdated
😄 and installing the new one resolved the issue. Thank you so much for the help troubleshooting it!ps: As a suggestion, it would be nice if @jerriep could transfer the ownership of the old nuget package to the
dotnet-outdated
organization on nuget.org to allow you to do one last release of a tool that just prints the instructions above on the Console to guide devs on moving to the new one.I’ve also just release a new version, 3.1.0, that targets .NET 5. That might also be a confounding factor. But if you have any more issues @weitzhandler please raise an issue.
I have now done som emore investigations and solved the problem, this is how.
When running
dotnet list package --outdated
I got the following warning The plugin credential provider could not acquire credentials. Authentication may require manual action. Consider re-running the command with --interactive fordotnet
, /p:NuGetInteractive=“true” for MSBuild or removing the -NonInteractive switch forNuGet
.After running
dotnet list package --outdated --interactive
and logging in,dotnet-outdated
started worked again.If possible, it would be nice if dotnet-outdated could surface this information to me in some way.
@slang25 all good now on 4.3.2. thanks for the quick update!
v4.3.1 and v4.3.0 both seem to have issues with .NET 7, reverting to v4.2.0 seems to be a temporary workaround.
Thanks @augustoproiete 😃, for comparison mine is:
I’ll disable the offline cache and see if I get the same 🤞
I’m unable to replicate the issue with the csprojs or nuget.config from above. Could you try setting
DOTNET_HOST_PATH
(see here) and see if that works around this issue?Ran into the same problem when migrating to .net 5