I am trying to automate a build for Xamarin.iOS using AppCenter. I have got three projects 4 projects as part of this.
- TestProj (Xamarin Forms Core Project)
- TestProj.iOS
- Notification Service Extension project
- Share Service Extension project
When I build the project, appcenter fails to restore the nuget for the "Notification Service Extension" project. The error that I get is :
NotificationService.cs(2,7): error CS0246: The type or namespace name 'Com' could not be found (are you missing a using directive or an assembly reference?)
Note: Com is the "Com.OneSignal" nuget package.
The configuration for the project is as follows:
- Project : TestProj.iOS.csproj
- Configuration : Release
- SDK version: Xamarin.iOS 13.2
- Xcode version : 11.2.1
- Build type : Device build
- Build frequency : Manually choose when to run builds
Note: I have added all provisioning profiles and I also have Pre-build script added to the project which is automatically detected. Script has the code to restore nuget for the solution.
#!/usr/bin/env bash
find $APPCENTER_SOURCE_DIRECTORY -name '*.sln' -print0 | xargs -0 -n1 nuget restore -DisableParallelProcessing
I would appreciate if someone could help me with this