Skip to content

Support WPF .NET 4.0 Client Profile applications #45

Open

Description

@AndreasSchmid1

First I want to thank you for this great and easy to use lib. Do you consider to support also .net 4.0 Client Profile Applications in the near future?

Activity

  1. damieng commented on Mar 8, 2016

    @damieng
    Contributor

    The project does not support .net 4 because of the lack of async support there.

  2. AndreasSchmid1 commented on Mar 8, 2016

    @AndreasSchmid1
    Author

    Yes I looked up the sources. I personally use the Microsoft.Bcl.Async package inside a .net 4.0 client application with great success! But I will try to make my own working .net 4.0 client CSharpAnalytics assemblies with help of Blc package. I will keep you up to date with my progress!

  3. AndreasSchmid1 commented on Mar 8, 2016

    @AndreasSchmid1
    Author

    Ok. I was able to create compiling sources targeting .net 4 client profile. I am very new to this lib so I cannot say if every feature is working. I just added the standard "WpfAutoMeasurement" to my application. ;)

    Steps I made to downgrade CSharpAnalytics to .net 4.0 client profile:

    1. MeasurementActivity should inherit from : System.EventArgs
    2. Add the Microsoft.Blc.Async package and rename Task.FromResult(true); to TaskEx.FromResult(true);
    3. Add this class to your project http://referencesource.microsoft.com/#mscorlib/system/reflection/CustomAttributeExtensions.cs
    4. rename GetPropertyInfo to GetType
  4. damieng commented on Mar 8, 2016

    @damieng
    Contributor

    2 and 3 make sense - but 1 does not.

    I think for 4 you meant GetTypeInfo to GetType?

  5. AndreasSchmid1 commented on Mar 9, 2016

    @AndreasSchmid1
    Author
    1. If I remove : System.EventArgs I get an compile error at MeasurementAnalyticsClient at line 30

    public event EventHandler OnTrack = delegate { };

    1. Yes sorry, you are right!
    2. I also remember to have changed something in the HttpWebRequester in line 74
      var postRequest = (HttpWebRequest)System.Net.WebRequest.Create((uriWithoutQuery));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions