locked
Microsoft.Bcl.Build reference Warning RRS feed

  • Question

  • User123793 posted

    In my Xamarin.IOS solution I have two projects, the first (an IOS project) references the second (which is a PCL 4.5 - profile78 project) . They both have had the Microsoft.Bcl.Build nugget package added.

    However when I build I get this warning

    Warning: All projects referencing FooSecondProject.csproj must install nuget package Microsoft.Bcl.Build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317569. (FooFirstproject)

    I note from this stack overflow question (in a different development environment, but same problem), the advice is to disable the warning.

    http://stackoverflow.com/questions/17180268/warning-all-projects-referencing-myproject-csproj-must-install-nuget-package-m

    I have not tried this yet but wanted to establish that this good advice. What is the cause of the problem, and should I be able to correct it ?

    Thanks

    Tuesday, June 9, 2015 8:15 AM

All replies

  • User18049 posted

    Using the Microsoft.Bcl.Build NuGet package with xbuild on Mono has some problems. There is a bug reported about this. Even if you have all projects correctly referenced the warning still appears. On Windows the same solution will compile without any warnings. So if all projects that reference FooSecondProject.csproj have a reference to the Microsoft.Bcl.Build NuGet package in the packages.config file you can ignore or disable this warning.

    Tuesday, June 9, 2015 8:41 AM
  • User123793 posted

    Thanks for your reply.

    Actually the main project does not contain a reference (either in References or in References/from.Packages) for that package. It does however have the package added. If I try to "Edit References" that package does not appear in any list. The only Microsoft one available is Microsoft.CSharp.

    I would have expected any added package to be automatically referenced.

    Any ideas how to proceed ?

    Tuesday, June 9, 2015 8:48 AM
  • User18049 posted

    Sorry when I said reference I meant a NuGet reference in the packages.config file. The Microsoft.Bcl.Build NuGet package only contains an MSBuild targets file, it has no assemblies.

    Tuesday, June 9, 2015 9:19 AM
  • User123793 posted

    Thanks @mattward. I will ignore that warning then.

    Tuesday, June 9, 2015 9:21 AM
  • User135744 posted

    Any news on this please.

    A year later, the same problem still persists.

    All projects in a solution have Microsoft.Bcl and Microsoft.Bcl.Build packages referenced. However I am still getting this warning

    Warning: All projects referencing .csproj must install nuget package Microsoft.Bcl.Build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317569.

    Thoughts anyone ?

    Wednesday, June 22, 2016 1:16 PM
  • User18049 posted

    Sorry no news on this. The bug is still not fixed.

    Wednesday, June 22, 2016 1:31 PM
  • User51603 posted

    @mattward I also added these packages (Microsoft.Bcl 1.1.10 and Microsoft.Bcl.Build 1.0.21) but I faced an issue when deploying the watch app because of this bug

    Commenting this in .csproj would fix the issue; <Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />

    I am wondering that does it have a side affect on my iOS project because these are referenced but not imported to the project. Thanks.

    Tuesday, June 28, 2016 1:38 PM
  • User18049 posted

    I am not an expert on the Microsoft.Bcl.Build NuGet package. There is this stackoverflow post which suggests it should be OK if it is not imported - assuming your iOS app still works after this change.

    Tuesday, June 28, 2016 2:41 PM
  • User300571 posted

    I just now started getting this error as well in a project that previously did not get this issue. All I did was add Newtonsoft's JSON-package and this started occurring.

    I am on v1.0.21 of the Bcls, and building for Android 7.0 with minimum SDK-version 6.0.

    Wednesday, March 1, 2017 12:48 PM
  • User89693 posted

    same here

    Tuesday, May 16, 2017 5:44 AM
  • User318051 posted

    https://forums.xamarin.com/discussion/100858/microsoft-bcl-build-glitch-and-workaround-for-ensure-that-this-project-has-microsoft-bcl/p1?new=1

    Try this work around :)

    Monday, August 7, 2017 8:26 PM
  • User343770 posted

    @OnurHazar said: @mattward I also added these packages (Microsoft.Bcl 1.1.10 and Microsoft.Bcl.Build 1.0.21) but I faced an issue when deploying the watch app because of this bug

    Commenting this in .csproj would fix the issue; <Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />

    I am wondering that does it have a side affect on my iOS project because these are referenced but not imported to the project. Thanks.

    It works but I did not comment. instead i have replaced the BCL from Microsoft.Bcl.Build.1.0.21 to Microsoft.Bcl.Build.1.1.10

    It seems the csproj did not update the version. you can check the bcl version that you have by right clicking the Microsoft.BCL under Packages folder inside the visual studio

    Tuesday, August 22, 2017 3:01 PM
  • User360607 posted

    I have just update visual studio and it solved. ^^! Wish this method help someone :smiley:

    Wednesday, December 13, 2017 6:13 PM