Coder Social home page Coder Social logo

Comments (3)

damieng avatar damieng commented on July 19, 2024

There are two calls to Assembly.GetEntryAssembly - do you know which one you are having problems with?

The first is MeasurementConfiguration - this is easily avoided by instead using the constructor that takes application name and version rather than trying to automatically get it from the app assembly.

The second is in AppDataContractSerializer which is used by the AutoMeasurement code to automatically handle serialization to the correct folder. AutoMeasurement is designed for regular managed Windows Store, Windows Phone or WinForms/WPF scenarios.

It might help to understand why you are accessing CSharpAnalytics through native code and what you are trying to achieve. While I'm sure most of the pieces can be reused it's not an out-of-the-box scenario. One option would eb to change the AppDataContractSerializer to take the company name as an argument and either have that provided through the configuration mechanism.

from csharpanalytics.

idvorkin avatar idvorkin commented on July 19, 2024

My scenario is an outlook plugin, which is essentially a c# windows form that gets hosted in Outlook. Other then the issue I mentioned (and the few I'm sure I haven't found yet) it works like a charm.

For Assembly.GetEntryAssembly, we're in complete agreement :)

I worked around MeasurementConfiguration in my code, but for AppDataContractSerializer I just hacked the source to hard code a value - let me pass in a value as you find most appropriate.

from csharpanalytics.

damieng avatar damieng commented on July 19, 2024

Actually adding it to MeasurementConfiguration and plubming it through was a bit of a pain. Instead you can just set AppDataContractSerializer.FolderPath before using AutoMeasurement to avoid it guessing where to store the config file using Reflection. Let me know if that works for you.

from csharpanalytics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.