microsoftgraph / microsoft-graph-comms-samples

Microsoft Graph Communications Samples
MIT License
206 stars 221 forks source link

.Net Core for Microsoft.Graph.Communications.Calls.Media #193

Open stefan2410 opened 4 years ago

stefan2410 commented 4 years ago

We build our applications in .Net Core 3.1 . How to reference the Microsoft.Graph.Communications.Calls.Media and Microsoft.Skype.Bots.Media ?

jsweiler commented 4 years ago

I also am interested in this. I tried running a .Net Core 3.1 app with these dlls but I get errors when trying to initialize the media platform. The errors I get are errors loading various system dlls.

Is there a way to use these in a .net core 3.1 app?

ssulzer commented 4 years ago

@stefan2410 @jsweiler Hi folks, An app-hosted real-time media bot (using the Microsoft.Skype.Bots.Media API) must use the classic .NET Framework; .NET core is not supported. We cannot offer a time frame right now of if/when that might change. https://docs.microsoft.com/en-us/microsoftteams/platform/bots/calls-and-meetings/requirements-considerations-application-hosted-media-bots

stefan2410 commented 4 years ago

@ssulzer The problem is that MS strongly recommends to develop new code in .Net Core 3.1 (LTS) and the architecture of .Net Core applications is different and the performance is superb for back-end solutions such as the Bots we are talking. How to build a new product with 5 years old code, when the developers learn and work only in .Net Core ? And the problem is only that the Microsoft.Skype.Bots.Media API is incompatible because it has an old reference in System.Threading.Tasks.Dataflow. For the Worker Role and the .Net Core applications, there are examples how to do it, from other MS developers.

ssulzer commented 4 years ago

Hi @stefan2410 The issue concerns more than the System.Threading.Tasks.Dataflow library; the Microsoft.Skype.Bots.Media library has other dependencies that .NET core does not provide. There is some work in-progress now that will help enable us to support .NET core/.NET 5 in the future. Of course we want to support .NET core, but it will take some time to get there. Thanks.

stefan2410 commented 4 years ago

@ssulzer Just one thought. The .Net Core applications can run only in Windows server. Like the WPF and Winforms in .Net Core 3.1. they run only in windows. When we are talking about real-media bots, in our case, we include not only recording , also IVR, contact centers, etc.

JapNolt commented 4 years ago

I am fine if there would still be a dependency on Windows but it would be nice if our projects could target .Net Core. It's good to hear that there's work being done on this.

AlexSapple commented 4 years ago

I'm also interested - Just want to add support to this!

thanks everyone.

neomedved commented 3 years ago

Any updates on this after .Net 5 release?

prdx2000 commented 3 years ago

How long is it going to take to have this working on .Net 5?

AHComp commented 3 years ago

The ticket has been open for almost a year now and nothing is happening point I find it very embarrassing for Microsoft that everything is lagging behind in important parts such as teams and in communication such as Sip, and it's a big problem to deploy the ancient code in Azure because in Azure's new resource manager concept, the old projects no longer run and could not deployed. when do you deliver a new, up-to-date code that runs on the current basis specified by Microsoft ?

kieronlanning commented 3 years ago

@AHComp I've got an end to end working using the Cloud Service (extended support) resource that is ARM deployable, while it's not .NET Core/ cross-platform it does make it easier to manage.

stefan2410 commented 3 years ago

@kieronlanning It can't be cross-platform in any case because of th Skype.Media, which requires Windows Server and Media Foundation. But the update in .Net 5 is very important because we need to use modern libraries and features. @ssulzer is there a roadmap?

kieronlanning commented 3 years ago

@stefan2410 Yeah, that requirement has been painful. We did investigate Windows Containers too, but they're not supported either due to the hardware access requirements.

We have updated to .NET Framework 4.8 (which supports .NET Standard 2.0 - .NET 5 is Standard 2.1), but that's the limit. While we use the .NET 5 Tool chain for building, we can't progress higher.

ssulzer commented 3 years ago

No concrete roadmap or ETA to share yet regarding Microsoft.Skype.Bots.Media support for .NET core/.NET 5 (but work is in-progress on this).

ankitbko commented 3 years ago

Really hoping that support for .NET 5 comes soon. Meanwhile I have created a StarterBot on ASP.NET Core 2.1 project targeting net48. It is mostly based on AudioVideoPlaybackBot but without any of its functionality. All it does is log message for every video, audio and screen share events. Its meant to a template to get started with creating new bot that needs these functionality. This sample works exactly like any other asp.net core project so you can host it on Kestrel. The other samples were either on Service Fabric or Work roles which are both quite aged technology. Its also quite easy to debug it locally (no more Azure Compute emulator). Once I have documented it I will raise a PR here. https://github.com/ankitbko/microsoft-graph-comms-samples/tree/aspnetcore/Samples/V1.0Samples/StarterBotSamples

stefan2410 commented 3 years ago

@ankitbko, as a user also ,I would say that your effort is very nice, but we can "debug it locally (no more Azure Compute emulator)", as it is now, making the WorkerRole startup project (console application in.Net Framework). with minor changes in AzureConfiguration (another class LocalConfiguration?) . and without Emulator, you would need at least 4 cores to run the Skype.Media. (with emulator can work with 2 cores in debugging) Of course, "Fabric or Work roles which are both quite aged technology" are Required in production. Otherwise you would need your load balancing service in case that you have many VM instances.

ankitbko commented 3 years ago

@stefan2410 Yup you can debug the WorkerRole project locally as well. When I first started learning about Media Calling bot couple of days ago I felt like I am back in 2015 😆. It has been ages since I had to touch Worker Role project. I didn't see any benefit of sticking to it. I am too used to ASP.NET Core. Also they are not really "required" for production. There is already an example with AKS if you want a scalable architecture. I haven't explored if the bot will work in App Service.

stefan2410 commented 3 years ago

@ankitbko AKS can support Windows Servers? because if you want to play anything with Media Platform, you need windows and media.Foundation. AppService does not work definitely. You said before that you can debug it without emulator. I simply mentioned that this is not an issue of ASP Net Core. We can do it even now. There are other serious issues that we need the .Net 5.

ankitbko commented 3 years ago

@stefan2410 Yes AKS supports Windows nodes. You can find the sample here https://github.com/microsoftgraph/microsoft-graph-comms-samples/tree/master/Samples/V1.0Samples/AksSamples/teams-recording-bot

The doc folder in that sample has learnings and some good documentation for this.

mosoftwareenterprises commented 2 years ago

No concrete roadmap or ETA to share yet regarding Microsoft.Skype.Bots.Media support for .NET core/.NET 5 (but work is in-progress on this).

Hi @ssulzer any update on this comment from from nearly a year ago?

ssulzer commented 2 years ago

@mosoftwareenterprises Sorry, no useful update to share. The SDK port to .NET Core is still in-progress. I hope we can ship it by end of this year.

Mishra-Saurabh commented 2 years ago

If we are not able to use skype.bot .media in .net core then is there any other way to use in place of skype. bot. media in.net core.

decker405 commented 1 year ago

@ssulzer any updates on the "end of this year" timeframe?

ssulzer commented 1 year ago

@decker405 It won't be end of this year, but we are getting closer. Right now, our current ETA is April/May timeframe. We are targeting .NET6.

decker405 commented 1 year ago

Appreciate the update @ssulzer

martenekblad commented 1 year ago

Thanks @ssulzer ! Very appriated utdate! Please prioritize this since it has been sinking us for a while now.

roberto-gianisella commented 1 year ago

Hi @ssulzer, is the April/May ETA still happening or do you expect delays?

ssulzer commented 1 year ago

@roberto-gianisella @martenekblad @decker405 Currently we are still on track for an April or (more likely) May release. I'll update this thread as we get closer. Thanks!

desek commented 1 year ago

May is coming fast. Any updates to planned release date?

AHComp commented 1 year ago

Earth to Microsoft. mayday the flight from Mars to Earth will take longer than your migration. It's been almost 3 years now and now release date ?

ssulzer commented 1 year ago

The ship will be rolling out on the launch pad soon, but likely will be a June lift-off.

The two SDK packages, Microsoft.Skype.Bots.Media and Microsoft.Graph.Communications.Calls.Media are on somewhat different schedules. We will release a new Microsoft.Skype.Bots.Media library with .NET6 a bit ahead of the Microsoft.Graph.Comms.Calls.Media library update (since one is a dependency of the other).

The goal of this initial release is to help unblock (finally) development of bot applications on .NET6+. But we do not yet have enough runtime experience with our own Teams/Skype real-time media bots on .NET core, so we advise the community to be cautious migrating production media bots onto .NET core. (i.e., please test thoroughly!)

We are going to make the .NET6 SDK libraries available ahead of any corresponding updates to the public samples.

cc: @rahulva-msft @zhengni-msft

AHComp commented 1 year ago

Ok I plan my test Migration in June now hope it will be not Oktober or December, the nights are very cold in December on Mars.

AHComp commented 1 year ago

Tomorrow we start in june :) Any news ?

Am Do., 20. Apr. 2023 um 09:37 Uhr schrieb Stephen Sulzer [MSFT] < @.***>:

The ship will be rolling out on the launch pad soon, but likely will be a June lift-off.

The two SDK packages, Microsoft.Skype.Bots.Media and Microsoft.Graph.Communications.Calls.Media are on somewhat different schedules. We will release a new Microsoft.Skype.Bots.Media library with .NET6 a bit ahead of the Microsoft.Graph.Comms.Calls.Media library update (since one is a dependency of the other).

The goal of this initial release is to help unblock (finally) development of bot applications on .NET6+. But we do not yet have enough runtime experience with our own Teams/Skype real-time media bots on .NET core, so we advise the community to be cautious migrating production media bots onto .NET core. (i.e., please test thoroughly!)

We are going to make the .NET6 SDK libraries available ahead of any corresponding updates to the public samples.

cc: @rahulva-msft https://github.com/rahulva-msft @zhengni-msft https://github.com/zhengni-msft

— Reply to this email directly, view it on GitHub https://github.com/microsoftgraph/microsoft-graph-comms-samples/issues/193#issuecomment-1515862943, or unsubscribe https://github.com/notifications/unsubscribe-auth/AISUTQFGZQ3ZNIXCNVSIU63XCDRTZANCNFSM4LO7VEUQ . You are receiving this because you were mentioned.Message ID: @.*** .com>

ssulzer commented 1 year ago

The next Microsoft.Skype.Bots.Media library release is expected next week. It is undergoing release testing. It will have support for .NET6 (but, like I mentioned earlier, consider the .NET6 version an alpha/preview). I am checking on the Microsoft.Graph.Communications.Calls.Media library update. Hopefully that will also get out in June. Thanks.

AHComp commented 1 year ago

Hello Stephen, are you okay? After 3 years waiting, I plan the migration for june and now you say perhaps ?

stefan2410 commented 1 year ago

@AHComp please STOP . We are engineers here, not hooligans.

AHComp commented 1 year ago

I'm sorry, is it really no longer allowed to criticize? I wait now for 3 years and now that ? @stefan2410 What do you think is the right way to criticize something like this ?

MathieuDiepman commented 1 year ago

@AHComp Not sure what you are trying to achieve with your criticism. I’m sure Steven is aware that it’s been three years and that it’s been delayed. Perhaps offering help (in release testing or review) instead would be more effective.

We now know that release testing is happening. Personally, I appreciated the update and am patiently waiting for the library to be released.

stefan2410 commented 1 year ago

@AHComp why did you edit before 3 hours your message ?
You removed that "Are you kidding me or was it big joke ?". Github has history , you could learn at least how to use it. I don't want to continue any conversation with you., I would like to know only what are you waiting 3 years now? Even with the new Net 6, the recorders should run in windows server machines. There are other benefits, not critical. Other updates in the SDK are more important. For example. the current beta versionh for the "delta roster changes". I'm not related to MS, we have products and we are waiting understanding the difficulties.

ssulzer commented 1 year ago

@stefan2410 @MathieuDiepman

Folks, the Microsoft.Skype.Bots.Media library version 1.26.0.94 released this week includes .NET6 support. https://www.nuget.org/packages/Microsoft.Skype.Bots.Media/1.26.0.94-alpha

Notes:

  1. We are still waiting on a corresponding update to the Microsoft.Graph.Communications.Calls.Media library; it will be a "-beta" release.
  2. The net6 target library has a somewhat different set of runtime dependencies.
  3. It is not clear whether running the bot media runtime on .NET6 is compatible with ngrok; I don't think we got that to work yet.

cc: @rahulva-msft @zhengni-msft

ssulzer commented 1 year ago

@stefan2410 @MathieuDiepman And folks we now have the Microsoft.Graph.Communications.Calls and .Media libraries updated with .NET6 support!

NuGet Gallery | Microsoft.Graph.Communications.Calls 1.2.0.7270

NuGet Gallery | Microsoft.Graph.Communications.Calls.Media 1.2.0.7270

ssulzer commented 1 year ago

A follow-up note regarding .NET6 support that is likely most relevant when testing a bot locally behind an ngrok reverse-proxy. If the bot sets MediaPlatformSettings.MediaPlatformInstanceSettings.InstancePublicIPAddress to 0.0.0.0 (i.e., IPAddress.Any), the bot media platform may fail with an exception on startup. If that happens, a workaround is to set InstancePublicIPAddress to an IPv4 address of the local machine.

chanheelee-thumb commented 10 months ago

@ssulzer Hi Stephen, I'm not quite as familiar with development in .NET but I've been reading up on the documentation and is there any reason I would be getting this error despite not having any PublicKeyTokens listed on my csproj file? My package reference just looks like this in my csproj file: <PackageReference Include="Microsoft.Skype.Bots.Media" Version="1.27.0.2-alpha" />

The error: "Could not load file or assembly 'Microsoft.Skype.Bots.Media, Version=1.27.0.2, Culture=neutral, PublicKeyToken={some_value}'. The system cannot find the file specified.\n"

For more background information I'm trying to use the Microsoft.Skype.Bots.Media package in a net 6.0 project to record audio from a Teams meeting. Please let me know if it would be better for this question to be asked on a separate issue

adityaramgopal commented 10 months ago

@chanheelee-thumb would you be able to share your csproj file (just the csproj file) and perhaps the *deps.json file in the obj folder?

Also how did you install the nuget? via the Nuget Package Manager in Visual Studio? Or did you manually add the PackageReference in the csproj file?

chanheelee-thumb commented 10 months ago

Hi @adityaramgopal I kept getting an error saying 'X could not be updated/installed' from Nuget package manager on Visual Studio (Mac 17.6.6) so I added it through dotnet commands. This is the csproj code:

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

  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <LangVersion>latest</LangVersion>
    <Nullable>enable</Nullable>
    <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
    <AnalysisLevel>preview-recommended</AnalysisLevel>
  </PropertyGroup>

  <ItemGroup>
    <None Remove="Helpers\NewFile.txt" />
    <None Remove="Interfaces\NewFile.txt" />
    <None Remove="Models\bot\" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.17.2" />
    <PackageReference Include="Microsoft.CognitiveServices.Speech" Version="1.24.1" />
    <PackageReference Include="Microsoft.Graph" Version="4.45.0" />
    <PackageReference Include="Azure.Identity" Version="1.7.0" />
    <PackageReference Include="Microsoft.Graph.Communications.Calls" Version="1.2.0.7270" />
    <PackageReference Include="Microsoft.Graph.Communications.Calls.Media" Version="1.2.0.7270" />
    <PackageReference Include="Microsoft.Graph.Communications.Core" Version="1.2.0.7270" />
    <PackageReference Include="Microsoft.Skype.Bots.Media" Version="1.27.0.2-alpha" />
    <PackageReference Include="System.Net.Http.Formatting.Extension" Version="5.2.3" />
    <PackageReference Include="AdaptiveCards" Version="2.7.3" />
    <PackageReference Include="AdaptiveCards.Templating" Version="1.3.0" />
    <PackageReference Include="Microsoft.Bot.Builder.Calling" Version="3.20.1" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.WebApiCompatShim" Version="2.2.0" />
  </ItemGroup>

  <ItemGroup>
    <Content Update="appsettings.json">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <ItemGroup>
    <Folder Include="Models\bot\" />
  </ItemGroup>
</Project>
adityaramgopal commented 10 months ago

@chanheelee-thumb are you trying to run it on a Mac? This library has the limitation that it's Windows-only.

chanheelee-thumb commented 10 months ago

@adityaramgopal I saw in the documentation that "Microsoft.Skype.Bots.Media" Version="1.27.0.2-alpha" supports net 6.0. Was I incorrect to assume that net 6.0 compatible == mac and windows compatible?

adityaramgopal commented 10 months ago

You are right that .net6.0 is supposed to help you build cross platform apps. But the library needs to be able to support cross-platform. We still have many components under the covers that are still tied to Windows. We mentioned that in our Readme that opens up when you install the nuget.

chanheelee-thumb commented 10 months ago

My apologies. I appreciate the clarification, thank you!

adityaramgopal commented 10 months ago

Eventually we may support cross-platform but at this moment it's unfortunately Windows-only. Let us know if you run into issues on Windows.