Skip to content

Time for .Net 5 Release #234

Closed
Closed

Description

@hhblaze

Hi, it is time to put into Nuget a version with .Net 5 support. Otherwise many dependencies must be downloaded extra with the newest project type.

Activity

  1. hhblaze commented on Nov 19, 2020

    @hhblaze
    ContributorAuthor

    NetJSON.zip
    Probably it can look like that (added preprocessor directives NET5_0) and created NetJSON.Net5_0 project.
    VS19 16.8.1 is needed for .NET 5

  2. rpgmaker commented on Nov 19, 2020

    @rpgmaker
    Owner

    Thanks. Will make the changes

  3. hhblaze commented on Nov 19, 2020

    @hhblaze
    ContributorAuthor

    Made a small fix (after that my code runs good). All places must be rechecked like
    #if NET_STANDARD_20 || NET5_0

    #if NET_STANDARD
    #if NET_STANDARD_20 || NET5_0

    etc.

    NetJSON.zip

  4. rpgmaker commented on Nov 19, 2020

    @rpgmaker
    Owner

    Thanks for the help. Will take a look at it once I get a chance

  5. rpgmaker commented on Nov 24, 2020

    @rpgmaker
    Owner

    Please test again. I also went ahead and added the symbol for easy debugging of the nuget packages. Thanks again for contributing the changes.

  6. hhblaze commented on Nov 24, 2020

    @hhblaze
    ContributorAuthor

    This adventure is not finished yet:

    1.3.6 throws mistake (with my compilation it works) by reading such json string:

    {"All":{"ym":"ss"},"ervicesAuto":{"ym":"ss"},"ocessor":{"":"ss"},"sonalDevice":{"":"ss"},"rryCan":{"":"ss"},"licom":{"ymr":"ss"}}
    var mydict= NetJSON.NetJSON.Deserialize<Dictionary<string, Dictionary<string, string>>>(...thatJsonString...);
    System.TypeInitializationException: The type initializer for 'NetJSONCachedSerializer`1' threw an exception. ---> System.TypeLoadException: Access is denied: 'NetJSON.NetJSONSerializer`1[System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.String,System.String]]]'. at System.Reflection.Emit.TypeBuilder.CreateTypeNoLock() at System.Reflection.Emit.TypeBuilder.CreateType() at NetJSON.NetJSON.Generate(Type objType) at NetJSON.NetJSON.NetJSONCachedSerializer`1.GetSerializer() at NetJSON.NetJSON.NetJSONCachedSerializer`1..cctor() --- End of inner exception stack trace --- at NetJSON.NetJSON.GetSerializer[T]() at NetJSON.NetJSON.Deserialize[T](String json) at
    
  7. rpgmaker commented on Nov 24, 2020

    @rpgmaker
    Owner

    I guess I need some unit test specifically for .net 5.0

  8. rpgmaker commented on Nov 24, 2020

    @rpgmaker
    Owner

    Your compilation works where?

  9. hhblaze commented on Nov 24, 2020

    @hhblaze
    ContributorAuthor

    I would say that it works exactly like .NET standard... but preprocessor directives "#if NET_STANDARD_20 || NET5_0" sometimes tricky.

  10. hhblaze commented on Nov 24, 2020

    @hhblaze
    ContributorAuthor

    From the latest NetJson.zip I published here, I have changed mostly those twofiles for adding NET5_0 directive:

    image

  11. rpgmaker commented on Nov 24, 2020

    @rpgmaker
    Owner

    I added the constant and applied it for any net standard 2.0 code since they are similar

  12. rpgmaker commented on Nov 24, 2020

    @rpgmaker
    Owner

    Can you create a pull request instead based on the previous code before my change and I can see what I missed.

    Thanks

  13. hhblaze commented on Nov 24, 2020

    @hhblaze
    ContributorAuthor

    Yeap, you got a pull request

  14. rpgmaker commented on Nov 24, 2020

    @rpgmaker
    Owner

    Thanks. Will close this issue out and use the pull request for questions

  15. rpgmaker commented on Nov 24, 2020

    @rpgmaker
    Owner

    @hhblaze, Thanks i have updated the code and pushed another version.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions