GithubHelp home page GithubHelp logo

Comments (20)

jdinnen avatar jdinnen commented on June 25, 2024 8

I was experiencing a similar issue, it was the nuget restore for solution failing as it was trying to restore things for Android also, even though I am building the iOS csproj.

##[group]Runner Image
Image: macos-13
Version: 20240405.2
Included Software: https://github.com/actions/runner-images/blob/macos-13/20240405.2/images/macos/macos-13-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/macos-13%2F20240405.2

This is the error in the nuget restore

/Users/runner/work/1/s/JobTask/JobTask.Android/JobTask.Android.csproj(321,11): error MSB4226: The imported project "/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/xbuild/Xamarin/Android/Xamarin.Android.CSharp.targets" was not found. Also, tried to find "Xamarin/Android/Xamarin.Android.CSharp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "/Library/Frameworks/Mono.framework/External/xbuild/" . These search paths are defined in "/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/MSBuild.dll.config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths.

Anyway the work around was to add an appcenter-post-clone.sh to the iOS directory and add the following to it, since it seems to be missing something to do with Android...

#!/bin/bash

brew install --cask xamarin-ios 
brew install --cask xamarin-android

Now it installs xamarin-android... FWIW, you can just have the android install as the build scrip will install xamarin-ios later if it is missing. This works for me at least..

from appcenter.

juanpgallardo avatar juanpgallardo commented on June 25, 2024 1

Thanks @jdinnen. I can confirm that your solution works. The issue, as you mentioned, was caused by errors during the nuget restore for the Android projects, so, installing the xamarin-android cask on the appcenter-post-clone.sh seems to workaround this issue.

I think this is probably an Appcenter bug, as it doesn't make sense that we need to worry about the android projects during the iOS build. Also, it only happens when upgrading to XCode 15.0.1 Preview, SDK version: Xamarin.iOS 16.4.

from appcenter.

noahcolvin avatar noahcolvin commented on June 25, 2024 1

@AmaluThomas Yes, TestFlight is reporting the iOS 17 SDK and it was approved by Apple.

from appcenter.

follesoe avatar follesoe commented on June 25, 2024

As a bare minimum, Microsoft should ensure AppCenter stays alive and supports the last Xamarin releases, preventing developers from having to waste time on yet a migration (from AppCenter to another build service), and rather can focus on migrating from Xamarin to MAUI.

from appcenter.

AngelAndresM avatar AngelAndresM commented on June 25, 2024

Is there any update on this incident?

I also have this problem.

from appcenter.

victorbeltranpinol avatar victorbeltranpinol commented on June 25, 2024

@AngelAndresM not yet. As a workaround I published the app building with a local mac

from appcenter.

follesoe avatar follesoe commented on June 25, 2024

One possible solution is to use pre-build scripts to try and install Xcode 15 and the latest Xamarin.iOS versions.

I have also submitted an issue for the macos-12 runner, which is what AppCenter uses, to get the latest Xamarin tools included: actions/runner-images#9512

from appcenter.

follesoe avatar follesoe commented on June 25, 2024

I used a similar work-around to install the latest version of Xamarin.Android, to build against Android 34. See comment in issue #2611 for the script.

from appcenter.

cjrvdev avatar cjrvdev commented on June 25, 2024

Honestly doubt there will be support in a long time. I personally raised a ticket in the past to support this and they had it planned for like 1 month later (And when I asked it was already way too late so...)

from appcenter.

EmmanVazz avatar EmmanVazz commented on June 25, 2024

One possible solution is to use pre-build scripts to try and install Xcode 15 and the latest Xamarin.iOS versions.

I have also submitted an issue for the macos-12 runner, which is what AppCenter uses, to get the latest Xamarin tools included: actions/runner-images#9512

@follesoe Can you post the pre-build script you used here? I think many of us will need it. Thanks!

from appcenter.

follesoe avatar follesoe commented on June 25, 2024

@EmmanVazz I believe Xcode 15 is installed already. I have not done manual installs of Xamarin.iOS yet, but this is how I did it for Xamarin.Android:

#!/usr/bin/env bash
PKG_URL="https://dl.xamarin.com/MonoforAndroid/Mac/xamarin.android-13.2.2.0.pkg"
PKG_NAME=${PKG_URL##*/}
curl -4fsLo "${PKG_NAME}" "${PKG_URL}"
sudo installer -pkg "${PKG_NAME}" -target /

from appcenter.

noahcolvin avatar noahcolvin commented on June 25, 2024

Not sure the above pre-build script (modified for Xamarin.iOS) will work here. My build is already installing xamarin.ios-16.4.0.23.pkg and is using the macos-13 image, not 12 like stated above. I'm getting the same errors as OP so there might be more to it.

from appcenter.

AjitKRuin avatar AjitKRuin commented on June 25, 2024

@victorbeltranpinol , how do you update Xamarin.iOS to 16.4 in cs proj or code level in Xamarin iOS project? do we need to change any package as for me I kept Xamarin.IOS as reference only how can we update?

from appcenter.

rafageist avatar rafageist commented on June 25, 2024

@AjitKRuin You don't need to change your project. Migrate to Github Actions with:

  • Macos-14
  • XCode 15.1
  • Dotnet 6.0.x
  • Xamarin.iOS using dotnet boots
  • Download and get msbuild from visual studio for mac 17.6.x .dmg image
  • Use mono and msbuild.dll to restore Nugets and build your .ipa
  • Use your Github secrets to sign and publish with xcrun altool

happy hacking

from appcenter.

noahcolvin avatar noahcolvin commented on June 25, 2024

Thanks @jdinnen that worked for me! I had tried adding those to the pre-build script before without luck but the post-clone did the trick. I hadn't noticed any errors in the logs related to Android but this did something. TestFlight is reporting the iOS 17 SDK and I'm not seeing any issues running the app.

from appcenter.

AmaluThomas avatar AmaluThomas commented on June 25, 2024

Thanks @jdinnen that worked for me! I had tried adding those to the pre-build script before without luck but the post-clone did the trick. I hadn't noticed any errors in the logs related to Android but this did something. TestFlight is reporting the iOS 17 SDK and I'm not seeing any issues running the app.

Are you able to upload app to testflight with sdk 17 for ios?

from appcenter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.