Microsoft.Bcl.Build reference Warning

MartHughMartHugh USMember ✭✭✭
edited June 2015 in Xamarin.iOS

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

Tagged:

Posts

  • mattwardmattward GBMember Xamurai
    edited June 2015

    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.

  • MartHughMartHugh USMember ✭✭✭

    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 ?

  • mattwardmattward GBMember Xamurai

    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.

  • MartHughMartHugh USMember ✭✭✭

    Thanks @mattward. I will ignore that warning then.

  • MarthughieMarthughie GBMember ✭✭

    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 ?

  • mattwardmattward GBMember Xamurai

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

  • OnurHazarOnurHazar USUniversity ✭✭

    @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.

  • mattwardmattward GBMember Xamurai

    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.

  • QuakeulfQuakeulf NOMember ✭✭✭

    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.

  • MichaelVowlesMichaelVowles USMember ✭✭

    same here

  • ShukeriShukeri MYMember

    @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

  • xuanloclexuanlocle USMember

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

Sign In or Register to comment.