amay077 / Xamarin.Forms.GoogleMaps

Map library for Xamarin.Forms using Google maps API
https://www.nuget.org/packages/Xamarin.Forms.GoogleMaps/
MIT License
546 stars 350 forks source link

Build fails on AzureDevOps pipeline & AppCenter #684

Open abdu292 opened 4 years ago

abdu292 commented 4 years ago

VERSIONS

PLATFORMS

ACTUAL BEHAVIOR

Build fails on AzureDevOps pipeline and on AppCenter with the following error as soon as I add Xamarin.Forms.GoogleMaps nuget package to the projects.

Sharing violation on path /Users/runner/.nuget/packages/xamarin.google.ios.maps/3.5.0/lib/xamarinios10/Google.Maps.dll [/Users/runner/runners/2.163.1/work/1/s/src/AlFalaahMobile/AlFalaahMobile.iOS/AlFalaahMobile.iOS.csproj]

ACTUAL SCREENSHOTS/STACKTRACE

AzureDevOpsError

2019-12-27T10:33:15.5258380Z 
2019-12-27T10:33:15.5258420Z 
2019-12-27T10:33:15.5258920Z "/Users/runner/runners/2.163.1/work/1/s/src/AlFalaahMobile/AlFalaahMobile.iOS/AlFalaahMobile.iOS.csproj" (default target) (1) ->
2019-12-27T10:33:15.5259310Z (_XamariniOSBuildResourceRestore target) -> 
2019-12-27T10:33:15.5259460Z   /Users/runner/.nuget/packages/xamarin.build.download/0.7.1/buildTransitive/Xamarin.Build.Download.targets(79,3): error : Sharing violation on path /Users/runner/.nuget/packages/xamarin.google.ios.maps/3.5.0/lib/xamarinios10/Google.Maps.dll [/Users/runner/runners/2.163.1/work/1/s/src/AlFalaahMobile/AlFalaahMobile.iOS/AlFalaahMobile.iOS.csproj]
2019-12-27T10:33:15.5259650Z /Users/runner/.nuget/packages/xamarin.build.download/0.7.1/buildTransitive/Xamarin.Build.Download.targets(79,3): error :   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <ba70b91736bd40cb990a357097dba9c3>:0  [/Users/runner/runners/2.163.1/work/1/s/src/AlFalaahMobile/AlFalaahMobile.iOS/AlFalaahMobile.iOS.csproj]
2019-12-27T10:33:15.5259850Z /Users/runner/.nuget/packages/xamarin.build.download/0.7.1/buildTransitive/Xamarin.Build.Download.targets(79,3): error :   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) [0x00000] in <ba70b91736bd40cb990a357097dba9c3>:0  [/Users/runner/runners/2.163.1/work/1/s/src/AlFalaahMobile/AlFalaahMobile.iOS/AlFalaahMobile.iOS.csproj]
2019-12-27T10:33:15.5260570Z /Users/runner/.nuget/packages/xamarin.build.download/0.7.1/buildTransitive/Xamarin.Build.Download.targets(79,3): error :   at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare) [/Users/runner/runners/2.163.1/work/1/s/src/AlFalaahMobile/AlFalaahMobile.iOS/AlFalaahMobile.iOS.csproj]
2019-12-27T10:33:15.5260780Z /Users/runner/.nuget/packages/xamarin.build.download/0.7.1/buildTransitive/Xamarin.Build.Download.targets(79,3): error :   at Mono.Cecil.ModuleDefinition.GetFileStream (System.String fileName, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) [0x00006] in <be358b898f7b4f70a597f036aed20add>:0  [/Users/runner/runners/2.163.1/work/1/s/src/AlFalaahMobile/AlFalaahMobile.iOS/AlFalaahMobile.iOS.csproj]
2019-12-27T10:33:15.5260960Z /Users/runner/.nuget/packages/xamarin.build.download/0.7.1/buildTransitive/Xamarin.Build.Download.targets(79,3): error :   at Mono.Cecil.ModuleDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00006] in <be358b898f7b4f70a597f036aed20add>:0  [/Users/runner/runners/2.163.1/work/1/s/src/AlFalaahMobile/AlFalaahMobile.iOS/AlFalaahMobile.iOS.csproj]
2019-12-27T10:33:15.5261140Z /Users/runner/.nuget/packages/xamarin.build.download/0.7.1/buildTransitive/Xamarin.Build.Download.targets(79,3): error :   at Mono.Cecil.AssemblyDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00000] in <be358b898f7b4f70a597f036aed20add>:0  [/Users/runner/runners/2.163.1/work/1/s/src/AlFalaahMobile/AlFalaahMobile.iOS/AlFalaahMobile.iOS.csproj]
2019-12-27T10:33:15.5261300Z /Users/runner/.nuget/packages/xamarin.build.download/0.7.1/buildTransitive/Xamarin.Build.Download.targets(79,3): error :   at Mono.Cecil.AssemblyDefinition.Write (System.String fileName) [0x00007] in <be358b898f7b4f70a597f036aed20add>:0  [/Users/runner/runners/2.163.1/work/1/s/src/AlFalaahMobile/AlFalaahMobile.iOS/AlFalaahMobile.iOS.csproj]
2019-12-27T10:33:15.5261650Z /Users/runner/.nuget/packages/xamarin.build.download/0.7.1/buildTransitive/Xamarin.Build.Download.targets(79,3): error :   at Xamarin.Build.Download.BaseXamarinBuildResourceRestore.MergeResources (Mono.Cecil.IAssemblyResolver resolver, System.String originalAsmPath, System.String mergedAsmPath, System.String assemblyName, System.Collections.Generic.List`1[T] resourceItems) [0x000fc] in <66f83d9fd7c44458903be8336b64122d>:0  [/Users/runner/runners/2.163.1/work/1/s/src/AlFalaahMobile/AlFalaahMobile.iOS/AlFalaahMobile.iOS.csproj]
2019-12-27T10:33:15.5261880Z 
2019-12-27T10:33:15.5261950Z     409 Warning(s)
2019-12-27T10:33:15.5262000Z     1 Error(s)
2019-12-27T10:33:15.5262060Z 
2019-12-27T10:33:15.5262110Z Time Elapsed 00:00:39.86
2019-12-27T10:33:15.6281740Z ##[error]Xamarin.iOS task failed with error Error: /Library/Frameworks/Mono.framework/Versions/Current/Commands/msbuild failed with return code: 1. For guidance on setting up the build pipeline, see https://go.microsoft.com/fwlink/?LinkId=760847.
2019-12-27T10:33:15.6293470Z ##[section]Finishing: Build Xamarin.iOS solution **/*iOS.csproj

EXPECTED BEHAVIOR

Build runs successfully on both Azure DevOps pipeline & AppCenter

HOW TO REPRODUCE

  1. Add this nuget to a new Xamarin.Forms Project
  2. Upgrade all the packages to Latest versions including Xamarin.Forms (currently 4.4.0)
  3. Create build pipeline on AzureDevOps/configure a Build on AppCenter (with latest versions, screen shot below)
  4. Run the build.

image

abdu292 commented 4 years ago

@amay077 Any help/ direction would be super useful. Thanks for all that you do for the community.

Dali2579 commented 4 years ago

I think this is the same than https://github.com/amay077/Xamarin.Forms.GoogleMaps/issues/666

Pietervdw commented 4 years ago

Also seeing exactly the same. Gone through all the steps detailed in #666 but no luck. Builds fine on local machine but not in AppCenter. Were you able to find a solution @abdu292 ?

Pietervdw commented 4 years ago

I got this to work by downgrading Xamarin.Build.Download to version 0.4.11.

abdu292 commented 4 years ago

thanks @Pietervdw. Yes, I did the same to get it to working.