且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

找不到 Microsoft.web.Infrastructure.dll - Visual Studio 2015

更新时间:2022-06-13 06:21:25

请检查项目参考中是否存在 Microsoft.web.Infrastructure.dll.如果没有,请尝试使用 Win 的建议,通过以下命令在包管理器控制台中重新安装包:

Please check whether the Microsoft.web.Infrastructure.dll is exist in the Project References. If not, please try Win’s suggestion to reinstall your package in the Package Manager Console by following command:

更新包 - 重新安装 Microsoft.Web.Infrastructure

Update-Package –reinstall Microsoft.Web.Infrastructure

因为NuGet Restore 仅将基于 package.config 文件的包还原到包目录,而不会添加对您项目的引用强> 默认情况下.所以我们需要强制重新安装包以将引用和内容文件添加到项目中.

Because the NuGet Restore only restores packages based on the package.config file to the packages directory, but does not add the reference to your project by default. So we need to force reinstall the package to add references and content files into project.

如果您的项目引用中已经存在该dll,您需要检查Copy Local"的属性值.Copy Local 属性确定是否将引用复制到本地 bin 路径.如果要将引用复制到 bin 文件夹,则应设置 CopyLocal=True.有关更多信息,请参阅设置复制本地属性细节.

If the dll is already existed in your Project References, you need to check the property value of "Copy Local". The Copy Local property determines whether a reference is copied to the local bin path. The CopyLocal=True should be set if the reference want to be copied to bin folder. See Set the Copy Local Property for more detail.