简体   繁体   中英

C# Git Project Missing Nuget Packages

I have been facing an issue on my other machine where I clone my project from GitHub faced with the following missing references

参考缺失

which I try to restore from NuGet but no use or success then I copy from the source machine and put it here but still unsuccessful

There are many ways this problem can be assisted by the following.

  1. You may not have the same versions of .Net framework.

  2. You may be able to do this in the following way you can clean bin and obj then

    1. Right click on the Solution -> Clean solution
    2. Right click on the Solution -> Rebuild solution

1.In VS2015 and above, VS requires you to download corresponding framework when loading the project.

在此处输入图片说明

So at least you've installed the corresponding framework. For System.dll,System.core.dll... , they are assemblies from .net framework. You can close the solution=>restart VS and reload the solution to resolve the warnings about system.xxx assemblies. If the warning persists, try repairing your .net framework .

2.For EntityFramework.dll and EntityFramework.SqlServer.dll , they're coming from EntityFramework package. Please check your project file(xx.csproj) and make sure there's statements like these:

在此处输入图片说明

Then navigate to the hintpath to check if the required assembly exists there. (solution dir/packages/xxx). If you restore the packages to other specific path, just modify the hintpath element and make VS can find those assemblies, the warning would go away.

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