chkimes / graphql-net

Convert GraphQL to IQueryable
MIT License
891 stars 86 forks source link

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

Open seven1986 opened 6 years ago

seven1986 commented 6 years ago

image

aodpi commented 6 years ago

I'm having the exact same issue 😢

buster95 commented 6 years ago

image

that's so sad

ernestjohn commented 6 years ago

Anyone find out the cause of the error?

chkimes commented 6 years ago

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.

modmoto commented 6 years ago

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.

vertonghenb commented 6 years ago

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)

modmoto commented 6 years ago

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.

jvitor83 commented 6 years ago

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.