Why does the error still occur after Nuget is used in the VS project to restore the package ?, Vsnuget

Source: Internet
Author: User

Why does the error still occur after Nuget is used in the VS project to restore the package ?, Vsnuget

Nuget official website download Nuget project package command address: https://www.nuget.org/packages

 

Today, I encountered a strange problem. After a long time, I finally got it done:

The problem is: My solution was originally good, but other friends added a project. After I got the latest version, the compilation always reported an error, saying that this project lacks Nuget package reference, however, during compilation, I obviously restored the nuget package referenced by this project, and manually restored the nuget package. The following error is reported:

 

The error message is: The nuget package referenced by Seagull2.YuanXin. WebApi of this project is missing on this computer., Let me use Nuget to restore.

The missing file location is .. \ packages \ Grpc. Core.1.0.0 \ build \ net45 \ Grpc.Core.tar gets. The complete local path is:

Error reported: Project -- parent directory -- packages --...

D: \ SourceCode \ MCSFramework \ 02. Develop \ MobileWebApp \ Seagull2 \ packages \ Grpc. Core.1.0.0 \ build \ net45 \ Grpc.Core.tar gets. bll

 

Solution:

1-Use Project-(right-click) -- manage nuget package tools:

Do you want me to restore it? Then I will restore it. I found the installed Nuget package in the project I reported the error and found that the package has been installed, how can we restore it? It is useless to uninstall, update, and re-install.

2-Use the nuget console-(tool-Nuget Package Manager-package management console)-use the command to install Grpc. Core.1.0.0 to Seagull2.YuanXin. WebApi:

Install-Package Grpc. Core

The system prompts "already exists", "delete", and "reinstallation" fails.

3-Direct Copy:

Doesn't it mean that my file is missing in this path? Then I can directly put the downloaded package in it, right? In my personal test, I still cannot perform the compilation or report an error.

 

Ultimate solution:

Because this project was added by someone else, the nuget package configuration of this project has been killed by someone else's configuration in his solution, so we can (or we can only say) pass, find the solution containing the project in the root directory of the missing file, find the project and compile it directly (the compilation is set to download the missing nuget Package). After the compilation is successful, return to your project and compile it again.

Is it solved? Give me a thumbs up and leave a comment ^

Note:

A -- Before restoring the Nuget package, make sure that you have configured the package source for this project: if you do not have the package, ask for it.

Tool-Option-Nuget Package Manager-package Source

B -- automatically restore the missing nuget package during compilation:

Tools-Option-Nuget Package Manager-General --- Select

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.