Comments (21)
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.
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.
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.
@AmaluThomas Yes, TestFlight is reporting the iOS 17 SDK
and it was approved by Apple.
from appcenter.
Is there any update on this incident?
I also have this problem.
from appcenter.
@AngelAndresM not yet. As a workaround I published the app building with a local mac
from appcenter.
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.
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.
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.
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.
@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.
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.
@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.
@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.
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.
Thanks @jdinnen that worked for me! I had tried adding those to the
pre-build
script before without luck but thepost-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.
@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 /
Maybe I do something wrong, but it doesn't work for me. I've tried to insert it into pre-build script for android and for ios but build is steal crashing.
from appcenter.
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..
It's a pity, but it doesn't work for me.
Should I add something more in the post-clone script?
from appcenter.
Thanks @jdinnen that worked for me.
A little note...
If you point to ".sln", the appcenter-post-clone.sh must be located in directory of ".sln" file.
If you point to ".prj", the appcenter-post-clone.sh must be located in directory ".prj" file.
from appcenter.
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..
Ive added the post clone script, appcenter tells me the sdk is not available on agent.
[command]/bin/bash /Users/runner/runners/3.240.1/scripts/select-xamarin-sdk.sh 6_12_25
Xamarin SDK not available on agent.
==> Downloading https://download.visualstudio.microsoft.com/download/pr/ceb0ea3f-4db8-46b4-8dc3-8049d27c0107/3960868aa9b1946a6c77668c3f3334ee/xamarin.ios-16.4.0.23.pkg
==> Installing Cask xamarin-ios
Warning: macOS's Gatekeeper has been disabled for this Cask
==> Running installer for xamarin-ios with sudo; the password may be necessary.
installer: Package name is Xamarin.iOS
installer: Installing at base path /
installer: The install was successful.
🍺 xamarin-ios was successfully installed!
Then i still receive the exact same error when it's trying to restore nugets for android...
from appcenter.
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..It's a pity, but it doesn't work for me. Should I add something more in the post-clone script?
in appcenter in build configuration under build app section. set project combo on .csproj not the sln.
this action solved my problem with that post clone script
from appcenter.
Related Issues (20)
- Add button to download all errors/crashes of an app
- Harsh HOT 1
- Full MAUI support HOT 1
- Appcenter CLI not working HOT 2
- Keep App Center alive HOT 11
- Open Source for Self-hosting AppCenter. HOT 6
- App Center Retirement: How to handle UWP / MAUI Apps? HOT 4
- AppCenter Retirement: How to handle .NET MAUI Apps? HOT 9
- App Center Retirement: How to handle WPF Apps? HOT 2
- App Center Retirement: open-source/license distribution platform? HOT 2
- App Center Retirement: Redirect appcast url
- App Center Retirement: Application Insights integration HOT 4
- Appcenter login is not working through Github actions HOT 2
- Connection is not private appcenter website HOT 5
- I am directed to the login page for public groups. HOT 9
- Add XCode 15.3 in iOS build agent HOT 3
- Continue support for Xamarin.UITest and add .NET 8 support HOT 3
- Update Xamarin.UITest to support iOS 17 permission request dialogs HOT 4
- Can Xamarin.UITest work on .net 8? when updating my project I get the following error on Android
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appcenter.