Tag: 平台

x86 DLL工作但不是x64 DLL

我正在尝试将System.Data.SQLite包含在我的项目中,该项目使用C#编码并使用.NET Framework v4。 我有点困惑……我正在运行Windows 8.1 x64,项目的平台目标设置为Any CPU 。 如果我包含x64版本的System.Data.SQLite.dll那么我会收到一个错误The type or namespace name ‘SQLite’ does not exist in the namespace ‘System.Data’ (are you missing an assembly reference?) 。 但是,如果我包含x86版本的System.Data.SQLite.dll那么它编译得很好。 不应该是相反的方式(不应该x86版本不编译)? 由于x86版本可以工作,那么我可以在编译项目中只包含x86版本吗? 如果我需要同时包含x86和x64版本的System.Data.SQLite.dll (以及SQLite.Interop.dll ),那么我该怎么做呢? 我还应该注意System.Data.SQLite的版本是v1.0.94.0(适用于.NET Framework 4)。

PlatformNotSupportedException使用.NET语音识别

所以我正在为C#尝试语音识别,我正在使用System.Speech.Recognition,而且,我在互联网上搜索,尝试了一些基本语音识别的代码,我能找到的最好的是这个: using System; using System.Text; using System.Windows.Forms; using System.Speech.Recognition; namespace SpeechRecognition { public partial class MainForm : Form { SpeechRecognitionEngine recognitionEngine; public MainForm() { InitializeComponent(); Initialize(); } private void Initialize() { recognitionEngine = new SpeechRecognitionEngine(); recognitionEngine.SetInputToDefaultAudioDevice(); recognitionEngine.SpeechRecognized += (s, args) => { foreach (RecognizedWordUnit word in args.Result.Words) { // You can change the minimun confidence […]