Nuget package installed but references not resolved

前端 未结 7 1072
后悔当初
后悔当初 2020-12-03 06:47

I have a multi-project solution with Prism Nuget packages installed in several projects. I then attempted to add a Prism Mef extensions package to one of the projects using

相关标签:
7条回答
  • 2020-12-03 07:26

    I recently encountered this error on visual studio 2012, solution for me was to delete .nupkg file from nuget cache. Nuget cache location can be found from nuget settings > general > browse.

    Note: I did not clear cache, I just deleted a specific file from cache directory and reinstalled the nuget package.

    0 讨论(0)
  • 2020-12-03 07:27

    You may want to check the .NET version of the package vs. your project.

    I had an instance where my project was .NET 4.6.1, and the package I was attempting to install was using version 4.6.2. After updating my project to the same .NET version, the reference showed up.

    0 讨论(0)
  • 2020-12-03 07:29

    Within the Package Manager Console run the following command:

    Update-Package -reinstall
    

    This will reinstall each nuget package within that project which should resolve any missing references.

    If you know you're missing a specific reference:

    Update-Package -reinstall <Package-Name>
    
    0 讨论(0)
  • 2020-12-03 07:30

    I just closed Visual Studio and reopened it and references are resolved...!

    0 讨论(0)
  • 2020-12-03 07:34

    You need to follow this procedure.

    1. Update-package

    2. Update-Package -reinstall

    3. Restart visual studio.

    0 讨论(0)
  • 2020-12-03 07:37

    Delete all the <assemblyBinding> references from your .config file, then run this command from the Nuget Package Manager:

    Get-Project -All | Add-BindingRedirect
    
    0 讨论(0)
提交回复
热议问题