sipsorcery
sipsorcery copied to clipboard
Getting exception when creating SDL2AudioEndPoint instance when SIPSorcery package is installed.
I was trying to use SIPSorceryMedia.SDL2 library in a simple console application:
using SIPSorcery.Media;
using SIPSorceryMedia.SDL2;
SDL2Helper.InitSDL();
SDL2AudioEndPoint endpoint = new("Speakers (Realtek High Definition Audio)", new AudioEncoder());
but on the fifth line I get this exception:
System.MissingMethodException HResult=0x80131513 Message=Method not found: 'Microsoft.Extensions.Logging.ILogger SIPSorcery.LogFactory.CreateLogger()'. Source=SIPSorceryMedia.SDL2 StackTrace: at SIPSorceryMedia.SDL2.SDL2AudioEndPoint..ctor(String audioOutDeviceName, IAudioEncoder audioEncoder) at Program.Main(String[] args) in C:\Users<UserName>\source\repos\ConsoleApp4\ConsoleApp4\Program.cs:line 5
I am using .NET 8, and I tried both SDL2-2.0.20-win32-x64 (as mentioned in the README) and SDL-2.30.5-win32-x64 (lates version)
I have also tried .NET 9.0-Preview and I have tried to install Microsoft.Extensions.Logging, Microsoft.Extensions.Logging.Console and I got the same exception on the same line.
Edit:
The Exception is only thrown when SIPSorcery package is installed. when I remove it no exception is thrown.
Sounds like it might have been the nuget versions getting out of sync. Should be OK now. If not please open an issue on the SDL2 repo.