Skip to content

CSHARP-2595: Fix initialization on .NET Core 3.0 preview 4. #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

KonH
Copy link
Contributor

@KonH KonH commented Apr 20, 2019

I have faced with problem after upgrade to .NET Core 3.0 preview 4 in my project, this line starts throwing an exception:

private static readonly MethodInfo __getUninitializedObjectMethodInfo =

This change cover .NET Framework and .NET Core ways to get System.Runtime.Serialization.FormatterServices type instance.

I'm don't sure how to write a proper test for that case but test it manually on .NET Framework 4.5.2, .NET Core 2.1, 2.2 and 3.0.

This PR is related to already created jira task with a proposal, which was implemented - https://jira.mongodb.org/browse/CSHARP-2595.

This change cover .NET Framework and .NET Core ways to get System.Runtime.Serialization.FormatterServices type instance.
@Malavos
Copy link

Malavos commented Apr 29, 2019

Will someone accept this PR? It seems that it fixes the problem.

@mostafa-tag
Copy link

@KonH thanks for this fix , When it will be rolled out via nugget on 2.8.x branch ?

@KonH
Copy link
Contributor Author

KonH commented Apr 30, 2019

@KonH thanks for this fix , When it will be rolled out via nugget on 2.8.x branch ?

I wait until somebody accept it. Or I need another PR for it?

@vincentkam
Copy link
Contributor

Hello @KonH , thank you for your PR! Another PR isn't necessary at this point. Given the imminent release of .NET Core 3.0 in the second half of 2019, we will be re-triaging and taking another look at this issue extremely soon.

@Malavos
Copy link

Malavos commented May 3, 2019

@vincentkam thank you for the clarification. We will await then the update.

@rstam
Copy link
Contributor

rstam commented May 3, 2019

We're working on this change, with some additional changes to retain compatibility with older versions of .NET Core.

If interested, see:

rstam#110

@dewelloper
Copy link

dewelloper commented May 6, 2019

What will done to my project i trust this 3.0 and i have upgraded my framework. Now what i will do..
Ayşegülün suçu ne?

Everything worked grate after downgrading core 3.0 to 2.2

@neil-119
Copy link

neil-119 commented May 8, 2019

Thanks @KonH , your patch worked. I tried the latest master version too, since they mentioned that it passed code review and was being merged in, but that one was still throwing exceptions so I tried yours.

@jacodv
Copy link

jacodv commented May 10, 2019

Hi @KonH, I have to port to preview 5 and this issue is causing a break in my tests. Is there a way that I can get a signed version with the fix in it to continue my upgrade?

@KonH
Copy link
Contributor Author

KonH commented May 10, 2019

@jacodv, unfortunately, I don't know how it can be done (if possible). I think you need to wait for the merge (and according to conversion, #110 can be merged instead of this one). Comments from more involved people can be helpful.

@jacodv
Copy link

jacodv commented May 10, 2019

Thanks @KonH , I will branch off and continue with other porting until 2.8.1 is out

@rstam
Copy link
Contributor

rstam commented May 14, 2019

Squashed, rebased and merged.

@rstam rstam closed this May 14, 2019
@DavidRHale
Copy link

@rstam Any idea when 2.8.1 will be released with this change?
Many thanks

@rstam
Copy link
Contributor

rstam commented May 15, 2019

2.8.1 was released today, May 15, 2019.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants