【问题标题】:How do I make a cosmos kernel play audio (C#)? [duplicate]如何让 cosmos 内核播放音频(C#)? [复制]
【发布时间】:2021-06-23 09:58:37
【问题描述】:

是否可以在我的 Cosmos OS 上制作音频?

我试过代码:

using System;
using System.Collections.Generic;
using System.Text;
using Sys = Cosmos.System;
using System.Media;

但 Visual Studio 一直显示红色下划线:“未找到命名空间媒体。”

还有其他选择吗?

【问题讨论】:

  • 您是否添加了对 Media 程序集的引用?

标签: c# media-player cosmos


【解决方案1】:

如果您使用的是 VS 代码,请按照本指南添加对 System.Media 参考的引用,如下所述:How do I add assembly references in Visual Studio Code?

对于 Visual Studio 2019:managing-references-in-a-project

确保您使用的是正确的版本(即 net core 2.2 没有实现它。https://docs.microsoft.com/en-us/dotnet/api/system.media?view=net-5.0

【讨论】:

  • 但我使用的是 .NET core 2.0,因为 cosmos(操作系统构建工具包只有 .NET core 2.0)但是有没有办法可以将 System.Media 添加到 .NET Core 2.0 中
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-10-12
相关资源
最近更新 更多