Forum Libraries, Components, and Plugins

Adding Xamarin.Google.iOS.SignIn results in a native linking error (MT5209)

I wanted to replace the Google.Plus library from an existing app with the Xamarin.Google.iOS.SignIn library using the Google Sign-In for iOS component (https://components.xamarin.com/view/googleiossignin).

However... when adding it and replacing the old code with the new (slightly different code) it results in a compile error:

/projectdir/MTOUCH: Error MT5209: Native linking error: file not found: /projectdir/obj/iPhoneSimulator/Debug/mtouch-cache/libOpenInChrome.a (MT5209) (Immo.Vlan.Touch)
/projectdir/MTOUCH: Error MT5202: Native linking failed. Please review the build log. (MT5202) (Immo.Vlan.Touch)

Here is the relevant part from the build log:

MTOUCH:  warning MT1302: Could not extract the native library 'libOpenInChrome.a' from '/projectdir/obj/iPhoneSimulator/Debug/mtouch-cache/libOpenInChrome.a'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').
MTOUCH:  warning MT1302: Could not extract the native library 'libGTMOAuth2_external.a' from '/projectdir/obj/iPhoneSimulator/Debug/mtouch-cache/libGTMOAuth2_external.a'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').
MTOUCH:  warning MT1302: Could not extract the native library 'libGTMOAuth2_internal.a' from '/projectdir/obj/iPhoneSimulator/Debug/mtouch-cache/libGTMOAuth2_internal.a'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').
MTOUCH:  warning MT1302: Could not extract the native library 'libSignIn.a' from '/projectdir/obj/iPhoneSimulator/Debug/mtouch-cache/libSignIn.a'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').
MTOUCH:  warning MT1302: Could not extract the native library 'libGIPNSURL+FIFE.a' from '/projectdir/obj/iPhoneSimulator/Debug/mtouch-cache/libGIPNSURL+FIFE.a'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').
MTOUCH:  warning MT1302: Could not extract the native library 'libGTM_AddressBook.a' from '/projectdir/obj/iPhoneSimulator/Debug/mtouch-cache/libGTM_AddressBook.a'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').
MTOUCH:  warning MT1302: Could not extract the native library 'libGTM_core.a' from '/projectdir/obj/iPhoneSimulator/Debug/mtouch-cache/libGTM_core.a'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').
MTOUCH:  warning MT1302: Could not extract the native library 'libGTM_DebugUtils.a' from '/projectdir/obj/iPhoneSimulator/Debug/mtouch-cache/libGTM_DebugUtils.a'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').
MTOUCH:  warning MT1302: Could not extract the native library 'libGTM_GTMURLBuilder.a' from '/projectdir/obj/iPhoneSimulator/Debug/mtouch-cache/libGTM_GTMURLBuilder.a'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').
MTOUCH:  warning MT1302: Could not extract the native library 'libGTM_iPhone.a' from '/projectdir/obj/iPhoneSimulator/Debug/mtouch-cache/libGTM_iPhone.a'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').
MTOUCH:  warning MT1302: Could not extract the native library 'libGTM_KVO.a' from '/projectdir/obj/iPhoneSimulator/Debug/mtouch-cache/libGTM_KVO.a'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').
MTOUCH:  warning MT1302: Could not extract the native library 'libGTM_NSData+zlib.a' from '/projectdir/obj/iPhoneSimulator/Debug/mtouch-cache/libGTM_NSData+zlib.a'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').
MTOUCH:  warning MT1302: Could not extract the native library 'libGTM_NSDictionary+URLArguments.a' from '/projectdir/obj/iPhoneSimulator/Debug/mtouch-cache/libGTM_NSDictionary+URLArguments.a'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').

Any suggestions on how to tackle this?

Niels

«13

Posts

  • nielsrnielsr BEMember

    Since there is no reaction here I've added the question to StackOverflow: http://stackoverflow.com/questions/35984575/adding-xamarin-google-ios-signin-results-in-a-native-linking-error-mt5209

    Niels

  • BillHolmesBillHolmes USXamarin Team Xamurai

    @nielsr Can you please tell us more about your setup? Would it be possible for you to post a bugzilla bug with a sample zipped showing the problem?

    @IsraelSoto fyi

  • RichardSevioraRichardSeviora CAMember ✭✭
    edited March 2016

    I am seeing a similar problem with my app, however I am using the Xamarin.Google.iOS.Core (1.3.2.1) and Xamarin.Google.iOS.SignIn (v2.4.0.1) NuGet packages.

    @BillHolmes can you let me know what information you need to see in the bug report?

  • RichardSevioraRichardSeviora CAMember ✭✭

    Further research in dotPeek makes me think that the library was not complied properly. the previous package (that worked fine as far as I can tell) includes a Resources entry that I can see in dotPeek. The new package does not.

    http://stackoverflow.com/a/36000256/156166

  • BillHolmesBillHolmes USXamarin Team Xamurai

    These dlls no longer have the native libraries embedded. The addition of the native libraries is now handled in an additional build task that is added to the app project when the NuGet is added to the app project.

    Be sure to add the NuGet or Component to the app project as well.

    If you continue to have problems review the build logs. There should be more info on how to resolve the issue. Please let me know if this helps.

  • nielsrnielsr BEMember

    @BillHolmes I actually used the Nuget package to reference this library. (see attached screenshot)

    I've also attached the full build log.

    I can't seem to reproduce the problem when creating a new Single View App.

  • BillHolmesBillHolmes USXamarin Team Xamurai

    @nielsr

    I see that you have not updated analytics and tag manager. That may or may not be related.

    Next open your app csproj file and ensure that the all of the targets files for the Google* NuGets have been added. It sould look something like this.

    <Import Project="..\packages\Xamarin.Build.Download.0.2.0\build\Xamarin.Build.Download.targets" Condition="Exists('..\packages\Xamarin.Build.Download.0.2.0\build\Xamarin.Build.Download.targets')" />
    <Import Project="..\packages\Xamarin.Google.iOS.Core.1.3.2.1\build\Xamarin.Google.iOS.Core.targets" Condition="Exists('..\packages\Xamarin.Google.iOS.Core.1.3.2.1\build\Xamarin.Google.iOS.Core.targets')" />
    <Import Project="..\packages\Xamarin.Google.iOS.SignIn.2.4.0.1\build\Xamarin.Google.iOS.SignIn.targets" Condition="Exists('..\packages\Xamarin.Google.iOS.SignIn.2.4.0.1\build\Xamarin.Google.iOS.SignIn.targets')" />
    

    I reviewed your log and I do not see evidence of the _XamarinBuildDownload task running.

  • DerekClarkDerekClark USMember ✭✭

    I checked mine, and I have the following:

    <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
      <Import Project="..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
      <Import Project="..\packages\Xamarin.Build.Download.0.2.0\build\Xamarin.Build.Download.targets" Condition="Exists('..\packages\Xamarin.Build.Download.0.2.0\build\Xamarin.Build.Download.targets')" />
      <Import Project="..\packages\Xamarin.Build.Download.0.2.0\build\Xamarin.Build.Download.props" Condition="Exists('..\packages\Xamarin.Build.Download.0.2.0\build\Xamarin.Build.Download.props')" />
      <Import Project="..\packages\Xamarin.Google.iOS.Analytics.3.14.0.2\build\Xamarin.Google.iOS.Analytics.targets" Condition="Exists('..\packages\Xamarin.Google.iOS.Analytics.3.14.0.2\build\Xamarin.Google.iOS.Analytics.targets')" />
      <Import Project="..\packages\Xamarin.Google.iOS.Core.1.3.2.1\build\Xamarin.Google.iOS.Core.targets" Condition="Exists('..\packages\Xamarin.Google.iOS.Core.1.3.2.1\build\Xamarin.Google.iOS.Core.targets')" />
      <Import Project="..\packages\Xamarin.Google.iOS.SignIn.2.4.0.1\build\Xamarin.Google.iOS.SignIn.targets" Condition="Exists('..\packages\Xamarin.Google.iOS.SignIn.2.4.0.1\build\Xamarin.Google.iOS.SignIn.targets')" />
    
  • nielsrnielsr BEMember

    @BillHolmes Thanks for the feedback. I will try this tomorrow.

  • RichardSevioraRichardSeviora CAMember ✭✭

    @BillHolmes I have the same entries as well. The projects are being built/downloaded.

    I do see that the Xamarin.Build.Download.targets seems to be skipped at a later point:

    Building target "_XamariniOSBuildResourceRestore" in project "/Users/richardseviora/Projects/PROJECT/iOS/PROJECT.iOS.csproj" ("/Users/richardseviora/Projects/PROJECT/packages/Xamarin.Build.Download.0.2.0/build/Xamarin.Build.Download.targets"); "_UnpackLibraryResources" depends on it.
    Target _XamariniOSBuildResourceRestore skipped due to false condition: '$(TargetFrameworkIdentifier)'=='Xamarin.iOS' And '$(OutputType)' != 'Library' And '@(RestoreAssemblyResource)'!=''
    Done building target "_XamariniOSBuildResourceRestore" in project "/Users/richardseviora/Projects/PROJECT/iOS/PROJECT.iOS.csproj" ("/Users/richardseviora/Projects/PROJECT/packages/Xamarin.Build.Download.0.2.0/build/Xamarin.Build.Download.targets"); "_UnpackLibraryResources" depends on it.
    
  • BillHolmesBillHolmes USXamarin Team Xamurai

    @RichardSeviora

    Let's see if we can get more info from your setup. Can you edit the packages/Xamarin.Build.Download.0.2.0/build/Xamarin.Build.Download.targets file?

    Add the following new target to the bottom of the file just before the closing </Project> element.

    <Target Name="_DebugGoogleNuGets"
        BeforeTargets="_UnpackLibraryResources">
        <Warning Text="TargetFrameworkIdentifier = $(TargetFrameworkIdentifier)"/>
        <Warning Text="OutputType = $(OutputType)"/>
        <Warning Text="RestoreAssemblyResource = @(RestoreAssemblyResource)"/>
    </Target>
    

    This should kick out some info as warnings when you rebuild. The values echoed should give us an idea of why

    '$(TargetFrameworkIdentifier)'=='Xamarin.iOS' And '$(OutputType)' != 'Library' And '@(RestoreAssemblyResource)'!=''
    

    is false.

  • RichardSevioraRichardSeviora CAMember ✭✭

    @BillHolmes looking at it now. Will advise in a few.

  • RichardSevioraRichardSeviora CAMember ✭✭

    @BillHolmes looks like the problem is with the RestoreAssemblyResource variable.

    /Users/richardseviora/Projects/PROJECT/packages/Xamarin.Build.Download.0.2.0/build/Xamarin.Build.Download.targets (_DebugGoogleNuGets target) ->
    
        /Users/richardseviora/Projects/PROJECT/packages/Xamarin.Build.Download.0.2.0/build/Xamarin.Build.Download.targets:  warning : TargetFrameworkIdentifier = Xamarin.iOS
        /Users/richardseviora/Projects/PROJECT/packages/Xamarin.Build.Download.0.2.0/build/Xamarin.Build.Download.targets:  warning : OutputType = Exe
        /Users/richardseviora/Projects/PROJECT/packages/Xamarin.Build.Download.0.2.0/build/Xamarin.Build.Download.targets:  warning : RestoreAssemblyResource = 
    
  • RichardSevioraRichardSeviora CAMember ✭✭

    All my comments prior have been about deploying to iPhone from Xamarin Studio. Interestingly, the app is building and deploying to my iPhone from Visual Studio. It doesn't pass beyond the splash screen, and VS is not picking up on the errors.

    In Xamarin Studio I checked the .xbcache directory and the .a files are being downloaded. I'm not seeing anything that indicates why the _GoogleCoreItems task is failing to add them to the RestoreAssemblyResource list.

  • KarlKoppKarlKopp AUMember ✭✭

    I'm getting the same as @RichardSeviora when I add those debug lines:

        Target _DebugGoogleNuGets:
    /Users/kolchy/Projects/HappiestHour/packages/Xamarin.Build.Download.0.2.0/build/Xamarin.Build.Download.targets:  warning : TargetFrameworkIdentifier = Xamarin.iOS
    /Users/kolchy/Projects/HappiestHour/packages/Xamarin.Build.Download.0.2.0/build/Xamarin.Build.Download.targets:  warning : OutputType = Exe
    /Users/kolchy/Projects/HappiestHour/packages/Xamarin.Build.Download.0.2.0/build/Xamarin.Build.Download.targets:  warning : RestoreAssemblyResource = 
    

    Is there a work around? I tried downgrading my packages to the previous versions, but the build still fails (Xam Studio, OSX).

  • KarlKoppKarlKopp AUMember ✭✭

    @BillHolmes in my case (Google Analytics) the old component has been removed from the component store as well (googleiosanalytics-3.14.0.1.zip) so can't go forward, can't go back... another day lost...

  • KarlKoppKarlKopp AUMember ✭✭

    @BillHolmes maybe a bit more help?

    /Users/kolchy/Projects/App/iOS/App.iOS.csproj (Build) ->
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets (_CompileToNative target) ->
    
        MTOUCH:  warning MT1302: Could not extract the native library 'libGoogleAnalytics.a' from '/Users/kolchy/Projects/App/iOS/obj/iPhoneSimulator/Debug/mtouch-cache/libGoogleAnalytics.a'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').
    
  • BillHolmesBillHolmes USXamarin Team Xamurai

    @nielsr, @RichardSeviora, @DerekClark, @Kolchy,

    Is anyone able to share a solution or project that shows this error? Any additional info will be helpful.

    You can even share just your csproj file for the app project. I can attempt to reconstruct a repo project from that.

    Also please share your Xamarin version info from the about dialog box.

    The following is more for my notes and the curious.

    It appears that the _GoogleCoreItems and _GoogleSignInItems targets are not being run. These should be triggered from the _XamarinBuildAddDownloadedItems target which is triggered from the _XamarinBuildDownload target.

    In a working project you should see a section in the build log when performing a clean rebuild.

  • KarlKoppKarlKopp AUMember ✭✭

    @BillHolmes On OSX, my Xamarin Studio version is 5.10.3 (build 26). Do you need the full details? Happy to email you a project file if you ping me your email?

  • BillHolmesBillHolmes USXamarin Team Xamurai

    @nielsr, @RichardSeviora, @DerekClark, @Kolchy,

    Can you guys test a workaround for me? You will need to edit the targets file packages/Xamarin.Build.Download.0.2.0/build/Xamarin.Build.Download.targets.

    Add a AfterTargets="AssignProjectConfiguration" attribute to the _XamarinBuildDownload target.

    <Target
            Name="_XamarinBuildDownload"
            DependsOnTargets="_XamarinBuildDownloadCore;_XamarinBuildAddDownloadedItems"
            AfterTargets="AssignProjectConfiguration"
            Condition="'@(XamarinBuildDownload)'!=''"
            />
    

    Please report back to the thread your findings.

    I am also guessing that you have installed the following NuGets to your app project.

    <package id="Microsoft.Bcl" version="1.1.10" targetFramework="xamarinios10" />
    <package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="xamarinios10" />
    

    Please let me know if that is the case as well.

  • RichardSevioraRichardSeviora CAMember ✭✭
    edited March 2016

    @BillHolmes it compiles! The two Microsoft.Bcl packages are present in my iOS project.

    It's not launching on my phone for some reason, which I'm now researching. I imagine that's unrelated.

    Edit: The crash at launch issue was entirely unrelated.

    So it launches now! Thanks a lot for your help! I'll be sure to make this change in the targets file until the fix is updated in NuGet.

  • nielsrnielsr BEMember
    edited March 2016

    @BillHolmes Adding the AfterTargets="AssignProjectConfiguration" did the trick! I'm now able to build the project.

    Niels

  • AxelCharpentierAxelCharpentier FRMember ✭✭

    @BillHolmes Yes it works when you change the target when the project is already open in VS.
    If you open VS and load the project when the target is already modified VS freezes and you have no choice other than killing it with the task manager.

    Here is the error in VS Log :

    Exception handling callback for OnAfterOpenProject: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.VisualStudio.ProjectUtilities.GetVsHierarchy(IServiceProvider provider, Project project, Boolean throwOnFailure) at Microsoft.VisualStudio.Design.VSTypeResolutionService.GetProjectOutputs(Project project) at Microsoft.VisualStudio.Design.VSTypeResolutionService.AddProjectEntries(Project project, List1 entries)&#x000D;&#x000A; at Microsoft.VisualStudio.Design.VSTypeResolutionService.EnsurePopulated(Boolean fPopulateProject)&#x000D;&#x000A; at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchProjectEntries(String fullName, Boolean correctThread)&#x000D;&#x000A; at Microsoft.VisualStudio.Design.VSTypeResolutionService.System.ComponentModel.Design.IDesignTimeAssemblyLoader.GetTargetAssemblyPath(AssemblyName runtimeOrTargetAssemblyName, String suggestedAssemblyPath, FrameworkName targetFramework)&#x000D;&#x000A; at Microsoft.VisualStudio.ProjectFlavoring.DesignTime.Project.DesignTimeAssemblyLoader.GetTargetAssemblyPath(AssemblyName runtimeOrTargetAssemblyName, String suggestedAssemblyPath, FrameworkName targetFramework)&#x000D;&#x000A; at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUniverse.ResolveAssembly(AssemblyName assemblyName, Assembly runtimeAssembly)&#x000D;&#x000A; at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUniverse.ResolveAssembly(AssemblyName name)&#x000D;&#x000A; at System.Reflection.Adds.TypeNameParser.DetermineAssembly(AssemblyName assemblyName, Module defaultTokenResolver, ITypeUniverse universe)&#x000D;&#x000A; at System.Reflection.Adds.TypeNameParser.&lt;&gt;c__DisplayClass3_0.&lt;ParseTypeName&gt;b__0(AssemblyName assemblyName)&#x000D;&#x000A; at System.TypeNameParser.ResolveAssembly(String asmName, Func2 assemblyResolver, Boolean throwOnError, StackCrawlMark& stackMark) at System.TypeNameParser.ConstructType(Func2 assemblyResolver, Func4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark) at System.TypeNameParser.GetType(String typeName, Func2 assemblyResolver, Func4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark) at System.Type.GetType(String typeName, Func2 assemblyResolver, Func4 typeResolver, Boolean throwOnError) at System.Reflection.Adds.TypeNameParser.ParseTypeName(ITypeUniverse universe, Module module, String input, Boolean throwOnError) at Microsoft.MetadataReader.UnresolvedTypeName.ConvertToType(ITypeUniverse universe, Module moduleContext) at Microsoft.MetadataReader.MetadataExtensionsPolicy20.TryTypeForwardResolution(MetadataOnlyAssembly assembly, String fullname, Boolean ignoreCase) at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) at Microsoft.VisualStudio.ProjectFlavoring.DesignTime.DesignTimeReflectionContext.ReflectionOnlyGetType(Assembly assembly, String name, Boolean ignoreCase) at System.TypeNameParser.ResolveType(Assembly assembly, String[] names, Func4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark&amp; stackMark)&#x000D;&#x000A; at System.TypeNameParser.ConstructType(Func2 assemblyResolver, Func4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark&amp; stackMark)&#x000D;&#x000A; at System.TypeNameParser.GetType(String typeName, Func2 assemblyResolver, Func4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark&amp; stackMark)&#x000D;&#x000A; at System.Type.GetType(String typeName, Func2 assemblyResolver, Func4 typeResolver, Boolean throwOnError, Boolean ignoreCase)&#x000D;&#x000A; at Microsoft.VisualStudio.ProjectFlavoring.DesignTime.DesignTimeReflectionContext.ReflectionOnlyGetType(String typeName)&#x000D;&#x000A; at Microsoft.VisualStudio.ProjectFlavoring.DesignTime.DesignTimeReflectionContextExtensions.IsPresent(IDesignTimeReflectionContext context, String typeName)&#x000D;&#x000A; at Microsoft.VisualStudio.ProjectFlavoring.ReflectionContextProjectFeatures.&lt;&gt;c__DisplayClass75_0.&lt;IsPresent&gt;b__0()&#x000D;&#x000A; at Microsoft.VisualStudio.ProjectFlavoring.ReflectionContextProjectFeatures.IsPresent(String key, Func1 isPresent) at Microsoft.VisualStudio.ProjectFlavoring.ReflectionContextProjectFeatures.IsPresent(String typeName) at Microsoft.VisualStudio.ProjectFlavoring.ReflectionContextProjectFeatures.get_AssemblyResources() at Microsoft.VisualStudio.ProjectFlavoring.ItemWatch.InvalidBuildActionWatcher.<>c.<CreateInvalidBuildActionCheckers>b__18_0(IProjectFeatures c) at Microsoft.VisualStudio.ProjectFlavoring.ItemWatch.InvalidBuildActionWatcher.ProjectFeaturesInvalidBuildActionChecker.IsSupportedCore(IProjectSystem projectSystem, String fullPath) at Microsoft.VisualStudio.ProjectFlavoring.ItemWatch.InvalidBuildActionWatcher.IsBuildActionSupported(String fullPath, String buildAction, String& message) at Microsoft.VisualStudio.ProjectFlavoring.ItemWatch.InvalidBuildActionWatcher.CheckForInvalidBuildAction(HierarchyId id, String fullPath) at Microsoft.VisualStudio.ProjectFlavoring.ItemWatch.InvalidBuildActionWatcher.CheckForInvalidBuildActions() at Microsoft.VisualStudio.ProjectFlavoring.ItemWatch.InvalidBuildActionWatcher.Run() at Microsoft.VisualStudio.ProjectFlavoring.Startup.ProjectStartupManager.OnAfterOpenProject(Object sender, OpenProjectEventArgs e) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.VisualStudio.Shell.Events.EventSource.DispatchCallbacks(IEnumerable`1 callbacks, Object sender, EventArgs eventArgs, String key)

  • BillHolmesBillHolmes USXamarin Team Xamurai

    I have just published a pre release version. 0.2.1-alpha1

    It has the same fix as mentioned above.

    @AxelCharpentier can you try this to see if you still get the hang?

    We will be working on a minor version bump for all of the Google APIs for iOS NuGets. Need to spend some QA time.

  • KarlKoppKarlKopp AUMember ✭✭

    @BillHolmes can confirm that the fix mentioned above has resolved the problem.

  • AxelCharpentierAxelCharpentier FRMember ✭✭

    @BillHolmes Yes it fixes the problem but I still have visualstudio hanging at startup, but it does not happen every times...

  • AlexandreChohfi2AlexandreChohfi2 BRUniversity ✭✭
    edited March 2016

    Alpha 2 is also hanging my VS2015.
    Also, GoogleMaps package is the one failing for me.

  • AlexandreChohfi2AlexandreChohfi2 BRUniversity ✭✭
    edited March 2016

    This are my errors:

    1> ld: file not found: /Users/username/Library/Caches/Xamarin/mtbs/builds/ProjectiOSName/6c63362045e6e40541df1f9c83d8da74/obj/iPhoneSimulator/Debug/mtouch-cache/GoogleMaps
    1> clang: error: linker command failed with exit code 1 (use -v to see invocation)
    1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(673,3): error : Native linking error: file not found: /Users/username/Library/Caches/Xamarin/mtbs/builds/ProjectiOSName/6c63362045e6e40541df1f9c83d8da74/obj/iPhoneSimulator/Debug/mtouch-cache/GoogleMaps
    1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(673,3): error : Native linking failed. Please review the build log.

    PS: I'm compiling from VS2015 using a MacOS on my local network.
    Using latest version of everything.

  • Hello Bill

    I'm using the latest version of xamarin google ios maps (v 1.11.1.2) and the xamarin build download (v 0.2.1) I've added the after targets attribute and still the same issue (just like Alexandre) are there any updates on this or another workaround?. Attached is the build log.

  • BenonCzornijBenonCzornij ZAMember ✭✭
    edited April 2016

    @BillHolmes , i'm trying to add google analytics to my iOS project. Using:

    1.Xamarin Studio 5.10.3 (Build 51)
    2.Google analytics 3.14.0.3
    3. OSX Yosimite

    Ive added the following NuGet Packages:
    1. Xamarin.Build.Download
    2. Google API's Analytics for iOS

    I have the following in my Xamarin.Build.Download.targets file:

            Name="_XamarinBuildDownload"
            DependsOnTargets="_XamarinBuildDownloadCore;_XamarinBuildAddDownloadedItems"
            AfterTargets="AssignProjectConfiguration"
            Condition="'@(XamarinBuildDownload)'!=''"
    

    I get the following error when I build:

    /Users/sivemwanda/Projects/AlwaysOn/AlwaysOn_iOS/MTOUCH: Error MT5209: Native linking error: file not found: /Users/sivemwanda/Projects/AlwaysOn/AlwaysOn_iOS/obj/iPhoneSimulator/Debug/mtouch-cache/GoogleMaps (MT5209) (AlwaysOn_iOS)

  • GoMobileASGoMobileAS NOMember

    I'm having the same problem when I'm trying to use Google Maps, Analytics and Tag Manager. I have added

    Xamarin.Google.iOS.Core
    Xamarin.Google.iOS.Analytics
    Xamarin.Google.iOS.Maps
    Xamarin.Google.iOS.TagManager

    to my iOS project.

    Xamain.Build.Download is also in the project, all of the packages are the latest versions.
    The build fails for both Simulator and Device builds with this message:

    Native linking error: clang: error: no such file or directory: '/Users/xxxxx/Library/Caches/Xamarin/mtbs/builds/xxxxxx/3a5b5272434add489eed98640caab10b/obj/iPhone/Debug/mtouch-cache/libGoogleAnalytics.a'

    I have tried the Xamarin.Build.Download.targets workaround to no avail.
    If I remove Google Analytics, it's Google Maps that's failing.

    I also tried using the oldest possible version of the Google Maps component from the Xamarin component store (1.10.3.0) instead of the NuGet package, but that one doesn't build either (lots of linker messages about duplicate symbols).

    I'm running Visual Studio 2015 Update 2 on Windows 10 on my PC and OS X 10.11 on my Mac. Xcode and Xamarin toolset are updated to their latest stable versions on both computers. I've tried building on both the PC and the Mac and I'm getting the same error.

  • SantiagoCabreraSantiagoCabrera ARMember ✭✭

    Hi @BillHolmes,

    Is there any news with this matter? I'm having a similar issue when adding Analytics and Maps in the same project, Maps is the one failing.
    I've tested with the Xamarin.Build.Download.0.2.1-alpha2 but it's still not working :disappointed:

  • BillHolmesBillHolmes USXamarin Team Xamurai

    I think a product update has broken this. I am currently looking into the issue.

  • BillHolmesBillHolmes USXamarin Team Xamurai

    As a workaround I found you can set the Copy Local property to false for Google.Maps (or any other Google dlls in your reference list) and the build will work. I will continue to dig into the real cause on our end.

  • BillHolmesBillHolmes USXamarin Team Xamurai

    I have pushed a Xamarin.Build.Download beta that effectively sets the Local Copy property to false for you. A Xamarin.VS bug has also been created to investigate the root cause.

  • LukePothierLukePothier USMember ✭✭

    I am still experiencing this issue.

    I am using:
    Xamarin.Google.iOS.Analytics.3.14.0.2 - 'Copy Local' is false,
    Xamarin.Google.iOS.Maps.1.11.1.2 - 'Copy Local' is true, and
    Xamarin.Build.Download.0.2.2-beta1

    I have managed a successful compilation with these settings, but only immediately after having:
    uninstalled Maps,
    installed version 1.10.3.0,
    attempted to rebuild (which failed),
    uninstalled Maps, and
    reinstalled the latest version of Maps

    After achieving the successful build once, I cannot repeat it without first following the above steps again. The process above is repeatable. I am very confused as to what is going wrong.

    @BillHolmes, I noticed on the bug you created that Jose Gallardo has marked the bug as resolved, but that is not accurate. Please can you confirm that the issue is currently being addressed, because I am using all of the up-to-date packages and I have attempted every workaround I can find, and the only one that works for me (the one I've described above) is extremely tedious.

  • BillHolmesBillHolmes USXamarin Team Xamurai

    @LukePothier we just published new versions of all the Google APIs for iOS. Please let me know if you still have problems. I know this release addresses the bug we were tracking. There could be another that you are facing.

  • anthonybalmesanthonybalmes USMember ✭✭
    edited May 2016

    Hi @BillHolmes, I just recently added the Google.iOS.Cast package(an hour ago or so) in my project and im having the same problem of

    Error MT5209: Native linking error: clang: error: no such file or directory: '/Users/xxxxxxx/iOSPlayerApp/xxxxxx/obj/iPhone/Debug/mtouch-cache/GoogleCast' (MT5209) (xxxxx)

    I have tried adding and removing the package several times and rebuilding the project between installs, and it still giving me the same error.

    Any idea on why this is still happening?

    Thanks

  • BillHolmesBillHolmes USXamarin Team Xamurai

    @anthonybalmes Are you building on OS X with Xamarin Studio or Windows with Visual Studio?

    Are you able to build the sample provided with the component?

  • anthonybalmesanthonybalmes USMember ✭✭

    Hi @BillHolmes,

    I am currently using Xamarin Studio, I was able to build and run the sample by itself, the problem I'm having is when I want to use parts of the sample for my own personal project.

Sign In or Register to comment.