Comments (3)
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.
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.
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)
- GetEntryAssembly vs GetExecutingAssembly HOT 2
- ASP.NET support HOT 13
- Build break because of requestUri.ShouldUsePostForRequest() HOT 1
- Exception HOT 6
- Windows Phone 8.1 Support HOT 1
- Prior requests cause null exception in BaseAutoMeasurement::Request HOT 1
- Exception on Start() HOT 8
- Starting multiple instances of a WPF application at same time throws Exception in Start()
- Add a flag AutoMeasurement.Initialized HOT 6
- Make internal classes public HOT 1
- TrackEvent exchange parameters action and category HOT 1
- Allow to use GA debug URL
- MeasurementAnalyticsClient.AdjustUriBeforeRequest cuts strings with special chars HOT 2
- Setting SetOptOut before Start causes crash
- Support WPF .NET 4.0 Client Profile applications HOT 5
- At one of my testing machines I get an deserializing error
- Session start and session end time stamps registered at GA are very often too late relative to other events HOT 3
- proxy support HOT 1
- Unhandled Exception HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csharpanalytics.