我正在嘗試將GraphQL實現到Unity3D(版本2017.1.0f3個人版)。我正在使用.NET 4.6(實驗版),但儘管如此,Unity不支持動態關鍵字。這很奇怪,因爲.NET 4.0是.NET的一部分。除了在Unity中。我正在搜索一些解決方案如何讓它工作,但沒有動態關鍵字的解決方案。錯誤是這樣的:在Unity中使用動態關鍵字/ .NET 4.6功能
Severity Code Description Project File Line Suppression State
Error CS1980 Cannot define a class or member that utilizes 'dynamic'
because the compiler required type
'System.Runtime.CompilerServices.DynamicAttribute' cannot be found. Are you
missing a reference? skiing-prototype (1) D:\skiing-prototype
(1)\Assets\Scripts\GraphQL.cs 62 Active
這是使用GraphQL C#客戶端的唯一警告。有沒有人試過它,但它的工作?我還沒有找到更大的努力來啓動並運行。
編輯:
我使用這個客戶這裏:https://github.com/bkniffler/graphql-net-client
而且這是從Visual Studio的錯誤,但在統一安慰它顯示的錯誤也將更新究竟暫時
Assets/Scripts/GraphQL.cs(80,16): error CS1980: Dynamic keyword requires
`System.Runtime.CompilerServices.DynamicAttribute' to be defined. Are you
missing System.Core.dll assembly reference?
這是統一編輯器的錯誤,這似乎是在視覺工作室相同
您是否引用了Microsoft.CSharp.dll?看到[這裏](https://stackoverflow.com/questions/11417047/c-sharp-dynamic-compilation-and-microsoft-csharp-dll-error) –
不,我沒有因爲在統一之下我不能完全通過圍繞任何類型的DLL從Visual Studio,只是從這個插件文件夾 – Citrus
也因此 錯誤CS1703:具有相同標識的程序集「Microsoft.CSharp」已被導入。考慮刪除其中一個引用 資產/插件/ Microsoft.CSharp.dll(與前一個錯誤相關的符號的位置) Microsoft.CSharp.dll(與前一個錯誤相關的符號的位置) 編譯失敗:1錯誤( s),0警告 – Citrus