L.M
L.M

Reputation: 41

How to fix "error CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create'"

I'd like to use IBM's Watson API SpeechToText on Unity (ver.2018.4.13). First, I'm reading https://github.com/watson-developer-cloud/unity-sdk/blob/master/README.md and tried to install but console said

Assets\unity-sdk-core-1.2.0\Utilities\CredentialUtils.cs(268,70):warning CS0618: 'Credential.ApiKey' is obsolete: 'Authentication using legacy apikey is deprecated. Please authenticate using TokenOptions.'

Assets\unity-sdk-core-1.2.0\Connection\RESTConnector.cs(664,24): error CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create'

and

Assets\unity-sdk-core-1.2.0\Authentication\CloudPakForData\CloudPakForDataAuthenticator.cs(35,31): warning CS0414: The field 'CloudPakForDataAuthenticator.UrlSuffix' is assigned but its value is never used

How can I solve these error and warnings.

Thank you.

Upvotes: 4

Views: 14328

Answers (2)

greg
greg

Reputation: 1873

I was getting this error on a unit test project. It was odd because this was the result of a refactor exercise, everything was working before

There were 2 things I did, and I can not say exactly which solved the problem, but I just spent a 1/2 day on this so I want to maybe save someone else time.

I introduced a subclass in a new project that was .NET Framework 4.8.1 Other projets depending on this new project had lower .Net versions. I brought them all up to 4.8.1 (I dont think that exercise caused or resolved the problem. )

I also had a unit test project to test the new class. Somehow (I assume I did it) the project reference to Microsoft.CSharp had been removed.

Chatgpt suggested ensuring this reference. I added a reference in the solution explorer.

That solved the problem for me.

Upvotes: 0

taj
taj

Reputation: 1138

This looks like you are not using the latest Unity SDK or core. Please download the latest from https://github.com/watson-developer-cloud/unity-sdk/releases and https://github.com/IBM/unity-sdk-core/releases

Also please set your API Compatibility Level to .NET 4.x

https://github.com/watson-developer-cloud/unity-sdk#configuring-unity

Upvotes: 2

Related Questions