-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
script failing on appcenter (cannot find nuget) #87
Comments
The
NOTE: I put the Your script installs a newer Mono, so I'd suggest printing out |
drum rolls
So it seems fine :_| |
In the same place you printed this, if you just run |
gosh nuget is running just fine captain !
|
Maybe try not updating Mono at all, just update Xamarin.iOS, Xamarin.Android, .etc? Updating Mono would only really affect the MSBuild version you're building with, so probably wouldn't change the resulting app. |
So I commented out getting latest mono preview and got latest xamarin android.
nuget is now working fine, but as expected, it fails to compile c# 9 (since only mono preview supports c# 9). |
I also tried latest mono and latest xamarin android, back to the nuget issue...
Result:
|
nope, latest stable mono doesn't support C# 9... |
This is a hack, but maybe your script could make a symbolic link in the current directory. Untested: ln -s /Library/Frameworks/Mono.framework/Versions/Current/Commands/nuget nuget I'm not sure which one goes first off the top of my head, the source or the destination. |
I reached the support of appcenter, we'll see what they can do. |
So finally the answer was to add the script for retrieving mono preview at the Pre-build step and not at the Post-clone step. |
I have boots installing --preview mono in the pre-build script and I'm now I'm seeing the NETSDK1005 errors. |
I tried the My appcenter-post-clone.sh looks like this.
The juicy outputs of all of this is
This still resulted in nuget not found when it tries to do a restore like so
As far as I can tell the linked file wouldn't work because it executes Moving the build file from
This should be Mono 16.12 and Xamarin.Android 11.3.0.1. So it appears neither solution works for AppCenter build? Unsure if its an AppCenter problem or a boots problem, I think I'm leaning towards AppCenter though. For me, this is an issue where Android 11 builds can be built from AppCenter but can't be deployed to a device. So back to their repo to report the problem. |
After lots of tests and tricks, i get the exact same results. But my motivation is different: there is a bug in the latest mono distributions: they include a nuget app which is unable to restore a UWP project. And the restore happens even if the UWP project is not used in the current solution configuration. So i would like to go back to 6.12.0.145. But in the post clone step (as appcenter executes nuget restore between post clone and pre build). But if i do that, i get the "nuget not found" error above too and nothing works (reinstalling nuget, updating it, replacing by symbolic links, ...). |
@mwerickson @softlion try to add: echo "Update nuget (fix NETSDK1005)" at the end of your |
Already tried. @roubachof |
Also having the same Xamarin Forms and App Center issues as @softlion, and the post-clone script also doesn't work for me with the same some people reporting removing the UWP project allows the App Center builds to work (as a temporary fix). the mono update bug is referenced in mono/issues/21180 |
@CallumHoughton I removed the uwp apps from the solution and it works great. |
@softlion No problem and that's a really good idea! Would you mind sharing your post clone script please? |
SLN_PATH="$APPCENTER_SOURCE_DIRECTORY/xxxxx.sln"
#sed on mac requires a backup extension (here:'')
sed -i '' '6,15d' $SLN_PATH
sed -i '' '/ABCDEFAB-1234-1234-1234-99885E1AC6B5/d' $SLN_PATH
sed -i '' '/ABCDEFAB-1234-1234-1234-99885E1AC6B5/d' $SLN_PATH
sed -i '' '/ABCDEFAB-1234-1234-1234-99885E1AC6B5/d' $SLN_PATH
sed -i '' '/ABCDEFAB-1234-1234-1234-99885E1AC6B5/d' $SLN_PATH |
@softlion and @CallumHoughton My problem also that I have XF 5 app and UWP project in solution. Build fails now with the mono/iOS/Android combos available in AppCenter. My solution that I can use also in future (scripts can be always in iOS and Android folders) was to use following bash script as appcenter-post-clone.sh (using dotnet sln to remove UWP project): |
@Haapsaari-Juha Thanks for sharing, that also worked for me 🥳 That was odd, I'm building Android and iOS csproj and not sln, but still having UWP as part of sln was failing restore. |
Hi Jonathan !
I tried to use boots to be able to compile C# 9 on appcenter and used it like this:
The post clone step is doing fine and retrieve successfully the 2 sdks.
BUT, when it hits the nuget restore step, it fails with the following logs:
Maybe I need to install a nuget command line with boots ?
The boots step is breaking the usage of nuget ?
I must be missing something.
The text was updated successfully, but these errors were encountered: