Xamarin xbuild: Warning when building .shproj-Files

StephanPalmerStephanPalmer DEMember ✭✭
edited November 2016 in Xamarin.iOS

Hello,

When building a Xamarin Studio solution containing a shared project with xbuild like this:

xbuild /p:Configuration=Release /p:Platform="iPhone" /target:Build iOS/iOS.csproj

The build contains several warnings like the following:

/Users/work/.../GridVisibilityBug/GridVisibilityBug.shproj:  warning : Could not find project file /Library/Frameworks/Mono.framework/External/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.Common.Default.props, to import. Ignoring.
/Users/work/.../GridVisibilityBug/GridVisibilityBug.shproj:  warning : Could not find project file /Library/Frameworks/Mono.framework/External/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.Common.props, to import. Ignoring.
/Users/work/.../GridVisibilityBug/GridVisibilityBug.shproj:  warning : Could not find project file /Library/Frameworks/Mono.framework/External/xbuild/Microsoft/VisualStudio/v/CodeSharing/Microsoft.CodeSharing.CSharp.targets, to import. Ignoring.

When building just the csproj, I do not get the warnings (just building the csproj is not desirable however, because the solution contains other projects):

xbuild /p:Configuration=Release /p:Platform="iPhone" /target:Build iOS/GridVisibilityBug.iOS.csproj

When building with the deprecated mdtool, I do not get the warnings either:

/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool -v build "--configuration:Release|iPhone" GridVisibilityBug.sln

How should I rate this warning? Is it harmless, or is there something serious missing? Can I fix the warning (the referenced files really are not located at the given location)?

I'm using older Xamarin version, due to the project being in a longer release period:

Xamarin Studio
Version 5.10.2 (build 56)
Installation UUID: 09335063-06f8-425b-8e56-2cdecfb3c10c
Runtime:
    Mono 4.2.2 (explicit/996df3c)
    GTK+ 2.24.23 (Raleigh theme)

Apple Developer Tools
Xcode 7.3.1 (10188.1)
Build 7D1014

Xamarin.iOS
Version: 9.4.1.25 (Business Edition)
Hash: 962a050
Branch: master
Build date: 2016-01-29 16:59:11-0500

Operating System
Mac OS X 10.11.6
Darwin Stephans-MacBook-Pro.local 15.6.0 Darwin Kernel Version 15.6.0
    Mon Aug 29 20:21:34 PDT 2016
    root:xnu-3248.60.11~1/RELEASE_X86_64 x86_64 
Tagged:

Answers

  • JohnMillerJohnMiller USForum Administrator, Xamarin Team Xamurai

    @StephanPalmer,

    I left a comment on your SO post. I wasnt able to reproduce this. Can you share a .zip with the files I can use to test with?

  • StephanPalmerStephanPalmer DEMember ✭✭

    @JohnMiller,

    Thank you very much for your response.

    I cannot edit the original question, but this should make it more clear:

    Given a Xamarin Studio solution containing a shared project, and an iOS project referencing the shared project. The warnings occur when building the solution with xbuild like this:

    xbuild /p:Configuration=Release /p:Platform="iPhone" /target:Build GridVisibilityBug.sln
    

    The example project I used is the one attached to https://bugzilla.xamarin.com/show_bug.cgi?id=46501. It was created with the Xamarion Studio / Xamarin iOS versions mentioned in the original question.

    I've also been able to reproduce the problem on the system with newer Xamarin versions. Workflow: Create a new solution via File->New->Solution->Xamarin.Forms App, select shared project and iOS only. Then build the solution with the xbuild command mentioned in the original question. Versions on this system: Xamarin Studio 6.1.1, Mono 4.6.1, Xamarin iOS 10.0.1.8, Mac OS X 10.11.6.

    The shproj xml indeed imports the files mentioned in the warning, and the files are not present on our systems. At least not in the expected location. The build itself works though. My main question is if these warnings can be ignored safely.

Sign In or Register to comment.