0

I recently ran into an issue with an old Visual Studio solution/project where I couldn't build the solution because NuGet was reporting the following:

"Unable to find version '0.1.0' of package 'ElmahJS' on <NuGet feed>..."

How can I resolve this issue?

2 Answers 2

1

For older projects, I've found that this error may actually mean what it says - the Nuget package no longer exists on Nuget.

In some cases, the package reference you need may already exist in the solution - i.e. the package restore is not necessary to restore the reference needed.

In that case, open the packages.config file in the root of the project, and comment out the line(s) with the problematic packages.

If the NuGet package doesn't exist AND the corresponding reference doesn't exist in the checked-in solution, then you may have to go on a hunt outside of Nuget to find if the package still exists (i.e. Google).

If it no longer exists anywhere, replace with a suitable alternative.

Sign up to request clarification or add additional context in comments.

1 Comment

thanks for sharing your solution here, you could mark it as the answer, so it could help other community members who get the same issues.
0

seems like your pakage is no loge exists you can update your package from package manager console using following command

# Updates a specific package using its identifier, in this case ElmahJS
Update-Package ElmahJS

if above dont work than try

# Uninstalls the Elmah package and all its unused dependencies
Uninstall-Package Elmah -RemoveDependencies 

# Add the Elmah package to the default project as specified in the console's project selector
Install-Package Elmah

for details check here : https://learn.microsoft.com/en-us/nuget/tools/package-manager-console#updating-a-package

3 Comments

This works in cases where there is an update, but not when the package has been completely removed from Nuget (ElmahJS is no longer a valid package name)
@Coruscate5 - updatd answer with more details
Thanks - Potentially valid as well, however, if the package is actually used in the project, this would require a refactor (because the library is no longer compatible with the new Elmah version). In my case this would have been a lot more work then just removing the package restore reference (because ElmahJS.dll was already in the project), but we should leave this answer here as well since it may apply to others

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.