graphql-net icon indicating copy to clipboard operation
graphql-net copied to clipboard

The type initializer for 'GraphQL.Net.DynamicTypeBuilder' threw an exception.”

Open seven1986 opened this issue 7 years ago • 8 comments

image

seven1986 avatar Nov 08 '17 05:11 seven1986

I'm having the exact same issue 😢

aodpi avatar Dec 03 '17 11:12 aodpi

image

that's so sad

buster95 avatar Feb 16 '18 14:02 buster95

Anyone find out the cause of the error?

ernestjohn avatar Mar 09 '18 07:03 ernestjohn

For everyone experience this issue, what version of .NET are you running? I expect this is due to API changes in dynamic type creation on .NET core.

chkimes avatar Mar 14 '18 15:03 chkimes

I have the same issue and run on .net core. Is this library even done for .net core? Visual Studio tells me, that it is incompatible with my current .net core project. I thought it is not compatible, that is why i had to abandon the idea to use graphql.net. But it kind of sounds, that you want to support it? Because the idea is absolutely nice and exactly what i would need.

modmoto avatar Apr 01 '18 18:04 modmoto

If you're using .NET Core it will always throw this error, we should consider targeting .NET Standard as mentioned in #34

.NET Core 2.0 .NET Core 2.1 (Preview)

vertonghenb avatar Apr 01 '18 18:04 vertonghenb

I allready tried to compile it against .net core, but i have too few experience in this and I failed. I would love to see a .net core version of this and would like to help, if there is something i could do.

modmoto avatar Apr 01 '18 18:04 modmoto

Hi guys, i just could workaround this issue by doing this change https://github.com/jvitor83/graphql-net/commit/26a5f6d267c62a468d1fd4daeb822c20dae1f7be#diff-8fa9aa5aed6d6219daacaa099553fe78R16

Don't know if it is enough to a PR fix, but i could make it work with asp.net core.

jvitor83 avatar Aug 11 '18 22:08 jvitor83