question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting exception when running console application in .net core 2.1 from a Mac

See original GitHub issue

This 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

  1. Create a Console Application with .netcore2.1
  2. Call: Speechfactory.FromSubscription(“key”, “region”)
  3. 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:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wolfma61commented, Sep 19, 2018

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).

1reaction
zhouwangzwcommented, Sep 4, 2018

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Authenticating HttpClient calls from .NET Core on MacOS
When I run this on my Windows machine, the app easily connects and gets the result. However, when I run this on a...
Read more >
Publishing .NET Core 2.1 console app to local folder fails
NET Core 2.1 console application to a local folder, the publish operation fails with a dialog box stating: Publish has encountered an error....
Read more >
Console.Error Property (System)
In console applications whose informational output is often redirected to a file, the standard error stream available through the Error property can be...
Read more >
.NET core vs .NET framework
NET Core is used to create server applications that run on Windows, Linux and Mac. It does not currently support creating desktop applications...
Read more >
C#: Running .NET Core Console Applications On Mac
Hi Guys, This is a quick video on how to run C# . NET Core Console applications via Visual Studio and the Terminal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found