This project has moved and is read-only. For the latest updates, please go here.

Portable project: Could not load file or assembly 'GoogleAnalytics.Core or one of its dependencies. The system cannot find the file specified

Apr 27, 2015 at 7:19 PM
I could not find the nuget package for the core assembly as specified in the instructions:

but I did add the core library manually to my PCL (Net45) from the packages folder. I'm able to build successfully and can reference the tracker from my PCL no problem.

however at runtime, the Tracker property on my viewmodel throws this exception:
Could not load file or assembly 'GoogleAnalytics.Core, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
clearly i didn't do this correctly, but what exactly did I do wrong? the reference to that assembly is present there and in the Win/phone apps (via nuget) but for some reason it's saying it can't find the file.

any ideas?

many thanks!
Apr 28, 2015 at 1:00 AM
aha so it appears that the platform implementations of this reference the winmd component, NOT the portable core dll.

I attempted to remove the winmd of GoogleAnalytics.Core and replace it with the same one referenced in the PCL, and although I can build when I do, at runtime i now get this error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeLoadException: Could not find Windows Runtime type 'GoogleAnalytics.Core.Tracker'.
ultimately my goal is to define the tracker in my portable project (because that is where my viewmodels are defined) and call them at runtime with an instance of the platform tracker (loaded via MVVM Light's simpleioc)

so am I trying to do something that's not supported? if not what might I be doing wrong?

many thanks!