Getting exception when running console application in .net core 2.1 from a Mac
See original GitHub issueThis issue is for a: (mark with an x
)
- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
Minimal steps to reproduce
- Create a Console Application with .netcore2.1
- Call: Speechfactory.FromSubscription(“key”, “region”)
- The app will throw an exception about not being able to find a dll
Any log messages given by the failure
Unhandled Exception: System.AggregateException: One or more errors occurred. (The type initializer for ‘Microsoft.CognitiveServices.Speech.Internal.carbon_csharpPINVOKE’ threw an exception.) —> System.TypeInitializationException: The type initializer for ‘Microsoft.CognitiveServices.Speech.Internal.carbon_csharpPINVOKE’ threw an exception. —> System.TypeInitializationException: The type initializer for ‘SWIGExceptionHelper’ threw an exception. —> System.DllNotFoundException: Unable to load shared library ‘Microsoft.CognitiveServices.Speech.csharp.bindings.dll’ or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libMicrosoft.CognitiveServices.Speech.csharp.bindings.dll, 1): image not found at Microsoft.CognitiveServices.Speech.Internal.carbon_csharpPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_carbon_csharp(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate) at Microsoft.CognitiveServices.Speech.Internal.carbon_csharpPINVOKE.SWIGExceptionHelper…cctor() — End of inner exception stack trace — at Microsoft.CognitiveServices.Speech.Internal.carbon_csharpPINVOKE.SWIGExceptionHelper…ctor() at Microsoft.CognitiveServices.Speech.Internal.carbon_csharpPINVOKE…cctor() — End of inner exception stack trace — at Microsoft.CognitiveServices.Speech.Internal.carbon_csharpPINVOKE.SpeechFactory_FromSubscription(String jarg1, String jarg2) at Microsoft.CognitiveServices.Speech.Internal.SpeechFactory.FromSubscription(String subscription, String region) at Sample.ConsoleApp.Program.RecognizeSpeechAsync() in /<My-project-route>/Program.cs:line 14
Expected/desired behavior
Not get the exception
OS and Version?
MacOS 10.13.6 - Using VS for mac 7.6.3
Versions
0.6
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
As Zhou said - this will come, but no ETA yet. I’m closing this here now, we have this on our to-do list, we will publish some more detailed plan for platform support in the next month(s).
Thank you for your willingness for help! Multiplatform and multi-language support is definitely one of important features we want to provide.
The Speech SDK currently uses native C++ implementation in core, and then adds different language bindings on top of that. That is the reason why SDK currently only supports .netcore on Windows and Linux. We will add support for more platforms in future.
Thank you again!