Errors when projects target .NET 5
See original GitHub issueI’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>
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:26 (11 by maintainers)
Top Results From Across the Web
Troubleshoot .NET Framework targeting errors
To resolve the error, make sure that your application targets a .NET version that's compatible with the version that's targeted by the projects...
Read more >An error message appeared when building the core project ...
An error message appeared when building the core project after changed the Target Framework from .NET Core 3.1 to .NET 5,0. Exception
Read more >.net - Error building Multi-target-project for net5.0 and ...
0-windows and the UseWpf-flag. So my idea was to create a multi-target solution with the following configuration <TargetFrameworks>net5.0- ...
Read more >Problem with compiling my solution with .Net5 as the ...
My project file contains the correct target framework. When I open and compile the solution with Visual Studio I get no error, everything...
Read more >Building a project that target .NET Framework 4.5 in Visual ...
So, the fix is simple: just copy the files from that package to C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.