Installing specific version of Xamarin.Mac

IvanIcinIvanIcin USMember ✭✭✭

Right now I am blocked in the App Store approval process because of this bug reappearing in Xamarin.Mac: https://github.com/xamarin/xamarin-macios/issues/4337

As you can see from the bug, there was a version available at the start of the December 2018 that worked properly. As I didn't have any other particular problem with this version to have any motivation to use the newer version, for now I would like to keep with it until the problem (hopefully) resolves.

The problem is that the only thing I could do was to uninstall Visual Studio 2019 and install Visual Studio 2017, but it brought me back just to the version of February 2019 which seems to have the same problem.

Unfortunately I don't see how to get some earlier version than that. I've seen only documentation on how to install earlier Visual Studio for Windows and even there only for Professional and Enterprise, not Community edition.

I would appreciate some suggestions, thanks.

Answers

  • IvanIcinIvanIcin USMember ✭✭✭
    edited June 5

    @ChrisHamons said:
    Let me drop you a few previous versions to try:
    Those will bring you all the way back to fall of last year.

    Hi first and foremost, you are amazing @ChrisHamons ! Really many thanks for your efforts.

    I will definitely find the version where it breaks and report in the issue, hopefully it will make it easy to fix.

    One thing though - as I have removed the share feature from the app (possibly I wouldn't, but it was published the same they that you have provided the links) I am not sure if it is a good idea to bring them back this way. It depends on one thing - how likely is that the bug will be fixed till the version that brings support for macOS 10.15 APIs? If it isn't likely I guess it is better that I just report all the details I can about the bug and wait for it to be fixed... I understand that you can't grant 100% for that but I believe you can provide a good estimate. Thanks again.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    It is hard to tell - we are likely to be busy for the summer with WWDC stuff but if something regressed like this it tends to be prioritized.

    It somewhat depends on how easy it is to reproduce and fix.

  • IvanIcinIvanIcin USMember ✭✭✭

    After installing that old Xamarin.Mac version I can see it in Visual Studio/About, but when building I get:

    /Users/ivanicin/Projects/SpeechCentral/_git/SpeechCentral/SpeechCentralMac/SpeechCentralMac.csproj(3,3): Error MSB4019: The imported project "/Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/xbuild/Xamarin/Mac/Xamarin.Mac.CSharp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. (MSB4019) (SpeechCentralMac)

    I've tried to check csproj file but there is no such path there...?

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    Make sure to restart VSfM after each reinstall.

    There are some uncommon errors like that which can pop up due to msbuild caching.

  • IvanIcinIvanIcin USMember ✭✭✭

    @ChrisHamons said:
    Make sure to restart VSfM after each reinstall.

    There are some uncommon errors like that which can pop up due to msbuild caching.

    No success yet. I haven't run VS while installing this. If it is a cache problem I have also tried to restart the Mac and delete 'bin' and 'obj' folders, but to no success. I have tried another version you have provided and still the same.

    The only thing that comes to my mind is do I need to run VS 2017 for this? Any other suggestions if not?

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    Oh wait! Are you on Windows?

  • IvanIcinIvanIcin USMember ✭✭✭

    I do edit some parts of the project on VS for Windows, but I am not sure if that can affect this.

    But I did tried those links on the Mac, I don't think they would work on the Windows.

    If it was confusing that I used VS 2017 term, I am not sure if that was the name for the previous major version of VS on the Mac, but I referred to it. I think it was called like that when I tried to reinstall it few weeks ago but go be that I mixed up the names.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai
    edited June 7

    We tend to refer to the version number found in Visual Studio (for Mac) -> About. I'm on 8.0.5 for example.

    The version of Visual Studio should matter zero for an issue of this type. You can even install a package from the command line:

    sudo installer -pkg foo.pkg -target /

    and then build from the command line

    msbuild -t:Clean;Compile fool.sln

    and it should be consistent.

  • IvanIcinIvanIcin USMember ✭✭✭

    Good news is that for whatever reason (could be some of the updates) I can install the old version of Xamarin.Mac and build the app.

    The bad news is that it doesn't work even with that.

    So I am not sure what caused the miracle for this to work during few months. If you have some idea on what could cause it to work it would be great.

    But right now if I create the new project, add the share extension and reference it in the main project it works. As soon as I sandbox it and sign it (with proper bundle ids) it appears as the new extension in the share menu but doesn't work at all.

  • IvanIcinIvanIcin USMember ✭✭✭
    edited June 20

    I could build with old Xamarin.Mac for whatever reason now (could be some Visual Studio update that came in the meantime, not sure).

    Surprisingly, I couldn't launch the extension with the old version either, so after some test (like ensuring that the simplest project works which wasn't working last year) I got it that the problem was in my code. I forgot that I have added some minor changes to it and placed few lines from iOS version that worked there to the improper location...

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    Bisecting issues is hard, specially when the operating system does not give you much feedback on what it's doing.

    Good to hear you figured it out!

  • IvanIcinIvanIcin USMember ✭✭✭

    Regarding that it would be great if App Center Crashes supported Xamarin.Mac, hopefully it will happen soon.

Sign In or Register to comment.