简体   繁体   中英

nuget “Unable to resolve dependency” after fixing typo in nuspec file

I have two Visual Studio (2010) solutions. One solution, SolutionAlpha, has two projects, ProjA and ProjB, both of which have nuspec files, both of which have package build enabled, and for both of which a nupkg file is generated. I added a dependency in the nuspec file for ProjB pointing to ProjA, but I accidentally had a bunch of spaces in the name, so it looked like:

<depedencies>
    <dependency>Pro      jA</depedency>
</dependencies>

I put both of the nupkg files for ProjA and ProjB in a directory, which Visual Studio is set up to use as a nuget repository. In SolutionNumeric's Proj1, I tried to add a Nuget reference to ProjA and to ProjB, but I kept getting Unable to resolve dependency 'Pro jA .

I corrected the nuspec file in ProjA, copied it to the directory, confirmed that it was correct using NuGet Package Explorer, and cleared the recent packages and package cache through Visual Studio, yet I still get the error.

How can I resolve this?

Thanks!

edit:

This works from a solution for which nuget has never been used.

When I start the package manager console, I get Package Manager Console Host Version 2.0.30619.9119 .

Of course, after way too much time trying to figure this one out, and immediately after asking the question here, I figure out that the answer is to remove the related folders from the packages directory in my solution. I had tried doing full-text searches of the solution directory for the bad name, or even just the part of the name after the spaces, but got nothing that I was able to make sense of. It must have been in some binary file somewhere in packages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM