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.

Errors when projects target .NET 5

See original GitHub issue

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>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:26 (11 by maintainers)

github_iconTop GitHub Comments

16reactions
slang25commented, Nov 11, 2020

Ah! Ok, the penny has dropped.

So when you run dotnet outdated --version you see 2.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:

dotnet tool uninstall --global dotnet-outdated
dotnet tool install --global dotnet-outdated-tool

As a consumer of this tool, this sucks, please accept my appologies. If you still have this issue then please let us know.

3reactions
VahidNcommented, Nov 9, 2022

It’s happening again with .NET 7.0 RTM. I’m using V 4.3.0.

Read more comments on GitHub >

github_iconTop 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 >

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