简体   繁体   中英

Projects with Microsoft.Bcl installed still give warning “Project must install nuget package Microsoft.Bcl”

Our solution has 43 C# projects, targeting .Net Framework 4.0. When building the solution (in Visual Studio 2015), we are getting a lot of warnings saying "Project must install nuget package Microsoft.Bcl". When we check the NuGet packages for those projects, Microsoft.Bcl is installed. Restore NuGet packages says "All packages are already installed and there is nothing to restore".

In VS2013 Microsoft.Bcl warnings when package is installed suggested solution is to install the package Microsoft BCL Portability Pack, but I can not find a package with that name.

Why are we getting these warnings when the package is installed?

Why do we get these warnings multiple times per project?

Why do some warnings ask for Microsoft.Bcl version 1.1.8, while most ask for version 1.1.10?

First, please uninstall the packages. Second, reinstall them through nuget.

Please try it out. Hope it's helpful.

I did this and it worked. Make sure your packages.config has this entries:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Microsoft.Bcl" version="1.1.10" targetFramework="net40" />
  <package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
  <package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" />
</packages>

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