Skip to content
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

Xamarin iOS project builds fine in VS2019 but Azure Devops Xamarin.iOS build on same mac fails #53

Closed
charristti opened this issue Aug 5, 2019 · 2 comments · Fixed by #57
Labels
bug Something isn't working outdated

Comments

@charristti
Copy link

Describe the bug

When building using a build agent on mac. Pharmacist fails with the following exception:

"/Users/fmsdeveloper/myagent/_work/1/s/SourceFTAApp/FTAApp/FTAApp.iOS/FTAApp.iOS.csproj" (default target) (1:7) ->
"/Users/fmsdeveloper/myagent/_work/1/s/SourceFTAApp/FTAApp/FTAApp/FTAApp.csproj" (default target) (3:10) ->
"/Users/fmsdeveloper/myagent/_work/1/s/SourceFTAApp/FTAApp/FTAApp.Events/FTAApp.Events.csproj" (default target) (8:6) ->
(GeneratePharmacist target) -> 
  /Users/fmsdeveloper/.nuget/packages/pharmacist.msbuild/1.0.118/buildTransitive/netstandard2.0/Pharmacist.MSBuild.targets(46,5): error : PharmacistNuGetTask: System.TypeInitializationException: The type initializer for 'Pharmacist.Core.NuGet.NuGetPackageHelper' threw an exception. ---> System.MissingMethodException: Method not found: System.Collections.Generic.IEnumerable`1<NuGet.Configuration.Settings> NuGet.Configuration.XPlatMachineWideSetting.get_Settings() [/Users/fmsdeveloper/myagent/_work/1/s/SourceFTAApp/FTAApp/FTAApp.Events/FTAApp.Events.csproj]
/Users/fmsdeveloper/.nuget/packages/pharmacist.msbuild/1.0.118/buildTransitive/netstandard2.0/Pharmacist.MSBuild.targets(46,5): error :    --- End of inner exception stack trace --- [/Users/fmsdeveloper/myagent/_work/1/s/SourceFTAApp/FTAApp/FTAApp.Events/FTAApp.Events.csproj]
/Users/fmsdeveloper/.nuget/packages/pharmacist.msbuild/1.0.118/buildTransitive/netstandard2.0/Pharmacist.MSBuild.targets(46,5): error :   at Pharmacist.Core.Extractors.NuGetExtractor.Extract (System.Collections.Generic.IReadOnlyCollection`1[T] targetFrameworks, System.Collections.Generic.IReadOnlyCollection`1[T] packages, System.String packageOutputDirectory) [0x00011] in <02068e4e71d14f93bcb53e5fe98ec7dc>:0  [/Users/fmsdeveloper/myagent/_work/1/s/SourceFTAApp/FTAApp/FTAApp.Events/FTAApp.Events.csproj]
/Users/fmsdeveloper/.nuget/packages/pharmacist.msbuild/1.0.118/buildTransitive/netstandard2.0/Pharmacist.MSBuild.targets(46,5): error :   at Pharmacist.Core.ObservablesForEventGenerator.ExtractEventsFromNuGetPackages (System.IO.TextWriter writer, System.Collections.Generic.IReadOnlyCollection`1[T] packages, System.Collections.Generic.IReadOnlyCollection`1[T] frameworks, System.String packageOutputFolder) [0x00090] in <02068e4e71d14f93bcb53e5fe98ec7dc>:0  [/Users/fmsdeveloper/myagent/_work/1/s/SourceFTAApp/FTAApp/FTAApp.Events/FTAApp.Events.csproj]
/Users/fmsdeveloper/.nuget/packages/pharmacist.msbuild/1.0.118/buildTransitive/netstandard2.0/Pharmacist.MSBuild.targets(46,5): error :   at Pharmacist.MsBuild.PharmacistNuGetTask.Execute () [0x0014b] in <d801f7198a52487083dbe2f636ec67bf>:0  [/Users/fmsdeveloper/myagent/_work/1/s/SourceFTAApp/FTAApp/FTAApp.Events/FTAApp.Events.csproj]

Steps To Reproduce

Build Xamarin Forms iOS project using Xamarin.iOS Azure Devops Task.

Expected behavior

Should build without error.

Works fine when building in the VS2019 environment with the same mac paired

Screenshots

Environment

  • OS:
  • Version
  • Device:

Additional context

@charristti charristti added the bug Something isn't working label Aug 5, 2019
@open-collective-bot
Copy link

open-collective-bot bot commented Aug 5, 2019

Hey @charristti 👋,

Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider contributing financially.

https://opencollective.com/reactiveui

PS.: We offer priority support for all financial contributors. Don't forget to add priority label once you start contributing 😄

An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms!

@glennawatson
Copy link
Contributor

Thanks. This is due to mono not having until recently strict nuget resolution. So it's msbuild uses a different version of the nuget library where they have breaking API and the first DLL version loaded is the one used for the nuget package.

They turned on strict resolution on mono 6 so even if a DLL with the same name is loaded if the versions don't match it will do a load of the correct version.

I will be upgrading soon to nuget 5 the version msbuild is using anyway.

@lock lock bot added the outdated label Nov 24, 2019
@lock lock bot locked and limited conversation to collaborators Nov 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working outdated
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants