Windows.Media.SpeechRecognition 在 C# 应用程序中不存在
Windows.Media.SpeechRecognition does not exist in C# application
我正在尝试在 windows 商店应用程序中使用 Cortana,但我一直收到错误消息:
The type name or namespace 'SpeechRecognition' does not exist in the
namespace 'Windows.Media' (Are you missing an assembly reference?)
我是 运行 Windows Visual Studio 2013 Ultimate。要创建项目,我单击 File->New->Project then selected "Blank App" from "Templates"->"Visual C#"->"Windows Store"
。我检查了解决方案资源管理器中的引用,它说所有框架程序集都已被引用。
我安装了 .NET Framework 4 和 .NET Framework 2.0。
我正在遵循 MSDN
中的两个指南,但我无法弄清楚为什么缺少此命名空间:
https://channel9.msdn.com/Series/Universal-Windows-App-Development-with-Cortana-and-the-Speech-SDK/03
https://msdn.microsoft.com/en-us/library/dn630430.aspx
我以前从未使用过 C#,但我用过 C++ 和 C。我确定我遗漏了一些明显的东西,但我无法通过 google 找到解决方案。
您为 Windows 应用商店应用选择了模板,但 Cortana 和 Windows.Media.SpeechRecognition are available only for Windows Phone. Window Store apps run on Windows desktops, laptops, and tablets (see What's a Windows Runtime app?)
如果您有 Visual Studio 2013 Update 2 或更高版本,那么您应该有 Visual C#/Store 的模板 Apps/Windows Phone Apps/Blank App (Windows Phone) 将支持 Windows.Media.SpeechRecognition.
如果您没有 Update 4 的升级,可以从 http://www.microsoft.com/en-us/download/details.aspx?id=44921 下载。
我正在尝试在 windows 商店应用程序中使用 Cortana,但我一直收到错误消息:
The type name or namespace 'SpeechRecognition' does not exist in the namespace 'Windows.Media' (Are you missing an assembly reference?)
我是 运行 Windows Visual Studio 2013 Ultimate。要创建项目,我单击 File->New->Project then selected "Blank App" from "Templates"->"Visual C#"->"Windows Store"
。我检查了解决方案资源管理器中的引用,它说所有框架程序集都已被引用。
我安装了 .NET Framework 4 和 .NET Framework 2.0。
我正在遵循 MSDN
中的两个指南,但我无法弄清楚为什么缺少此命名空间:
https://channel9.msdn.com/Series/Universal-Windows-App-Development-with-Cortana-and-the-Speech-SDK/03 https://msdn.microsoft.com/en-us/library/dn630430.aspx
我以前从未使用过 C#,但我用过 C++ 和 C。我确定我遗漏了一些明显的东西,但我无法通过 google 找到解决方案。
您为 Windows 应用商店应用选择了模板,但 Cortana 和 Windows.Media.SpeechRecognition are available only for Windows Phone. Window Store apps run on Windows desktops, laptops, and tablets (see What's a Windows Runtime app?)
如果您有 Visual Studio 2013 Update 2 或更高版本,那么您应该有 Visual C#/Store 的模板 Apps/Windows Phone Apps/Blank App (Windows Phone) 将支持 Windows.Media.SpeechRecognition.
如果您没有 Update 4 的升级,可以从 http://www.microsoft.com/en-us/download/details.aspx?id=44921 下载。