question

PatrickRyder avatar image
0 Votes"
PatrickRyder asked JarvanZhang-MSFT edited

Should I Worry About This Build Warning

I have a new warning appearing in my build output, which I think began when Xamarin was last updated in Visual Studio (I am now on 16.10.5).

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(202,41): warning MSB4130: The condition "'$(IsMacEnabled)' == 'true' And '$(IsAppExtension)' == 'true' Or '$(_PlatformName)' == 'macOS'" may have been evaluated incorrectly in an earlier version of MSBuild. Please verify that the order of the AND and OR clauses is written as intended. To avoid this warning, add parentheses to make the evaluation order explicit.

Does anyone know what is causing this and if I should be worried? And ideally how I get rid of it?

Kind wishes - Patrick


dotnet-xamarin
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JarvanZhang-MSFT avatar image
1 Vote"
JarvanZhang-MSFT answered JarvanZhang-MSFT edited

Hello,​

Welcome to our Microsoft Q&A platform!

This is an illustrates warning caused by the new version's release. Please ignore the wraning if it doesn't effect the project's build. You could also try adding parentheses to wrap the conditions sentence as the warning describes.

Condition="'$(IsMacEnabled)' == 'true' And ('$(IsAppExtension)' == 'true' Or '$(_PlatformName)' == 'macOS')"
or
Condition="('$(IsMacEnabled)' == 'true' And '$(IsAppExtension)' == 'true') Or '$(_PlatformName)' == 'macOS'"

I see you reported the problem to the VisualStudio product team, you could follow them on the developer community site for a solution.
https://developercommunity.visualstudio.com/t/xamarin-build-output-cluttered-with-warnings/1562645

Best Regards,

Jarvan Zhang


If the response is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.