How to identify components that need removing when upgrade to VS 15.6?

JohnHardmanJohnHardman GBUniversity mod

Having (foolishly, based on experience so far) upgraded to Visual Studio 15.6, I'm getting the message about Xamarin Components:

I've been through the csproj files and removed any that are clearly Components. Followed the instructions on the linked documentation page. Still getting the message though. Is there anywhere that Visual Studio 15.6 logs or outputs what it considers to be the problem components? The message being displayed is an example of really bad UI - tell the user there's a problem, but not identify the problem properly. That's right up there with engine management lights on cars (surely a device primarily intended to raise money for car mechanics/franchises).

I have a solution with multiple projects, many of which make use of third-party plugins etc. Stripping everything down and adding bits back to find the cause is going to make the whole upgrade of Visual Studio leave an even worse taste than it already has, so I'm hoping there's a detailed log somewhere that tells me what VS thinks is the problem.

cc @DavidOrtinau

Best Answers

  • JohnHardmanJohnHardman GB mod
    edited August 2018 Accepted Answer

    [Deleted - thought I'd found the problem, but apparently not]

  • JohnHardmanJohnHardman GB mod
    edited August 2018 Accepted Answer

    @JGoldberger - Ok, I've found the cause.

    My solution has 19 projects in it (it used to be 20, but when the UML tools in VS were deprecated, I split the UML project out into a separate solution for use in VS2015). By trial and error, I rounded the problem down to the Android project. That took a while given the number of projects.

    After that, it wasn't so hard to spot. The culprit is Xamarin.InAppBilling, which when installed using NuGet (it's still available even now), results in the following two lines being added into the Android csproj file:

      <Import Project="..\packages\xamstore-xamarin.inappbilling.1.5\build\monoandroid\xamstore-xamarin.inappbilling.props" Condition="Exists('..\packages\xamstore-xamarin.inappbilling.1.5\build\monoandroid\xamstore-xamarin.inappbilling.props')" />
    
        <Error Condition="!Exists('..\packages\xamstore-xamarin.inappbilling.1.5\build\monoandroid\xamstore-xamarin.inappbilling.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xamstore-xamarin.inappbilling.1.5\build\monoandroid\xamstore-xamarin.inappbilling.props'))" />
    

    Uninstalling that package and ensuring those lines are removed stops the message about Components from appearing. Of course, I now need to unwire in-app billing code and re-implement it. I was planning to do that eventually anyway, but this has annoyingly brought that forward. I have to say that the message that was appearing was of no use whatsoever - if that check is going to remain in future updates to VS, the message needs to be made helpful (cc. @DavidOrtinau ), which it is not currently. The documentation didn't help either in this particular case. Grrr

Answers

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    @JohnHardman

    I assume this is the doc that is linked in the dialog: https://docs.microsoft.com/en-us/xamarin/cross-platform/troubleshooting/component-nuget?tabs=vswin

    Did you look through the IDE logs? Visual Studio log files can be found from Help->Xamarin->Open Logs (or Zip Logs... to get a zip of the log files)

    I'd have to look, but maybe there is something in there?

    Do you have an example project that is still showing that dialog even though you removed all component references? Would you be able to send that? You can open a support case if you like so that you have a channel to securely and privately send a test project, etc.

  • JohnHardmanJohnHardman GBUniversity mod

    Yes, that's the one.

    @JGoldberger said:
    Did you look through the IDE logs? Visual Studio log files can be found from Help->Xamarin->Open Logs (or Zip Logs... to get a zip of the log files)

    I'd have to look, but maybe there is something in there?

    Have checked all of the different log files - nothing mentioning components in there.

    Do you have an example project that is still showing that dialog even though you removed all component references?

    I'd have to send the entire solution, as the message box that pops up doesn't even identify which project it is referring to. If there's nothing else to check, I'll copy the entire solution and then start deleting projects one-by-one.

  • JohnHardmanJohnHardman GBUniversity mod
    edited August 2018 Accepted Answer

    [Deleted - thought I'd found the problem, but apparently not]

  • JohnHardmanJohnHardman GBUniversity mod
    edited August 2018 Accepted Answer

    @JGoldberger - Ok, I've found the cause.

    My solution has 19 projects in it (it used to be 20, but when the UML tools in VS were deprecated, I split the UML project out into a separate solution for use in VS2015). By trial and error, I rounded the problem down to the Android project. That took a while given the number of projects.

    After that, it wasn't so hard to spot. The culprit is Xamarin.InAppBilling, which when installed using NuGet (it's still available even now), results in the following two lines being added into the Android csproj file:

      <Import Project="..\packages\xamstore-xamarin.inappbilling.1.5\build\monoandroid\xamstore-xamarin.inappbilling.props" Condition="Exists('..\packages\xamstore-xamarin.inappbilling.1.5\build\monoandroid\xamstore-xamarin.inappbilling.props')" />
    
        <Error Condition="!Exists('..\packages\xamstore-xamarin.inappbilling.1.5\build\monoandroid\xamstore-xamarin.inappbilling.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xamstore-xamarin.inappbilling.1.5\build\monoandroid\xamstore-xamarin.inappbilling.props'))" />
    

    Uninstalling that package and ensuring those lines are removed stops the message about Components from appearing. Of course, I now need to unwire in-app billing code and re-implement it. I was planning to do that eventually anyway, but this has annoyingly brought that forward. I have to say that the message that was appearing was of no use whatsoever - if that check is going to remain in future updates to VS, the message needs to be made helpful (cc. @DavidOrtinau ), which it is not currently. The documentation didn't help either in this particular case. Grrr

Sign In or Register to comment.