Project problem Summary 1: Nuget cannot install the package dll. The prompt is: this package has been installed, nugetdll
Problem description:
During the project process, we will inevitably use Nuget to install some dll released by other systems to complete our business Code. However, we encountered a problem during the use process, that is, the reference is invalid for some reason, and its performance is as follows:
There are many reasons for this. One of the reasons I want to talk about is that the referenced dll has been deleted and we need to re-install it in Nuget, when we find the desired dll, it shows that it has been installed, as shown in:
However, we searched for the Installed Package and found that there was no such package, as shown in
In addition, we cannot find the target dll in the project file directory of the solution. Is it swollen? I can't help it because we have already installed it! The "murderer" must be found "!
Problem Analysis:How Nuget manages dll is nothing more than configuration files. The problem must be in the configuration file. Then I will find the package configuration file in the project where the problem is located. config. This file will be automatically created in the corresponding project file as long as you have added a reference using Nuget. For example:
Open this file and we will see which packages (dll files) the project references through Nuget, such as comparison with what we see in the Nuget Package Manager (for example ), we will find the problem
ITOO. examEvalConfigure. viewModel dll is not installed, but in packages. the config file contains its configuration information, which leads to the problem that the dl package has been installed and cannot be reinstalled when we search for the dl package in Nuget.
Solution:Delete the invalid configuration information in the packages. config file and regenerate it to reinstall it in Nuget, as shown in
Summary:When debugging code or solving the problem, we use the most common method, or the method to solve the problem, and try it right away when we think about it, this is understandable for our group of inexperienced cainiao, but we also need to try reasoning and analysis, and then lock the root cause of the problem. A single blow is a must! To achieve this level, we need our experience and understanding more. This is the direction of every one of us.