user27965063
user27965063

Reputation: 1

Unable to load DLL 'NativeMedia' or one of its dependencies

I'm working on application-hosted media bot and getting the following exception while testing locally on Windows 11: Unable to load DLL 'NativeMedia' or one of its dependencies.

This exception occurs from the line: builder.SetMediaPlatformSettings(mediaPlatformSettings);

var mediaPlatformSettings = new MediaPlatformSettings()
{
MediaPlatformInstanceSettings = new MediaPlatformInstanceSettings()
{
CertificateThumbprint = sthumbprint,
InstanceInternalPort = internalPort,
InstancePublicIPAddress = IPAddress.Any,
InstancePublicPort = publicPort,
ServiceFqdn = config.ServiceFqdn
},
ApplicationId = config.APP_ID,
};

The certificate is a self-signed CSP certificate and has been added into the Trusted Root Certification Authority

Exception details image. Click to view

Project file (c# project)

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <PlatformTarget>x64</PlatformTarget>
    <Platforms>AnyCPU;x64</Platforms>
  </PropertyGroup>

  ...

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNet.WebApi.Core" Version="5.3.0" />
    <PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.9" />
    <PackageReference Include="Microsoft.Graph.Communications.Calls" Version="1.2.0.10563" />
    <PackageReference Include="Microsoft.Graph.Communications.Calls.Media" Version="1.2.0.10563" />
    <PackageReference Include="Microsoft.Graph.Communications.Client" Version="1.2.0.10563" />
  </ItemGroup>

</Project>

Reference: (https://github.com/microsoftgraph/microsoft-graph-comms-samples/blob/master/Samples/V1.0Samples/LocalMediaSamples/PolicyRecordingBot/FrontEnd/Bot/Bot.cs)

I want to test the media bot locally. Please guide.

Upvotes: 0

Views: 55

Answers (1)

Bibin
Bibin

Reputation: 562

Install package Microsoft.Skype.Bots.Media. Even though it is with Microsoft.Graph.Communications.Calls.Media package, it seems the whole skype bot dll references are not there.

Upvotes: 0

Related Questions