简体   繁体   中英

Could not resolve this reference. Could not locate the assembly “Microsoft.Practices.EnterpriseLibrary.Common”

I have a project that use the nuget package EnterpriseLibrary.Common version 5.0.505.0, but when I restore the package in another computer the next warning message appear.

Could not resolve this reference. Could not locate the assembly "Microsoft.Practices.EnterpriseLibrary.Common".

I look for the fisical path and I do not found the dll, there is only a xml file. "Microsoft.Practices.EnterpriseLibrary.Common.xml"

It should not be included in the nuget package? or should be in GAC? if so, how do I install it?

This is something specific to your environment. Normally if you have the nuget package EnterpriseLibrary.Common version 5.0.505.0 referenced in your solution and you open the solution on a new machine and restore nuget packages, the dll is also restored.

You can try running this in Package Manager Console:

Update-Package EnterpriseLibrary.Common -Reinstall

and hope that it helps. If it does not, the nuget package itself (*.nupkg) should be located in

packages\\EnterpriseLibrary.Common.5.0.505.0\\EnterpriseLibrary.Common.5.0.505.0.nupkg

Make a copy of this file and change the extension to .zip. Open it with your favorite archive manager (Windows Explorer will do) and find all the dlls it contains in the lib folder inside the archive. Microsoft.Practices.EnterpriseLibrary.Common.dll is one of them.

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