2014-09-28 56 views
0

我想在Visual Studio 2010中的C#中運行一個小應用程序,該應用程序從視頻中提取幀。我的Windows操作系統是32位。C#中的幀抽取視頻#

當我試圖來構建解決方案它給了我以下警告:

「有該項目正在興建的處理器架構之間的不匹配‘MSIL’和參考的處理器架構」 MWArray,版本= 2.12.0.0,culture = neural,publicKeyToken = e1d84a0da19db86f,processorArchitecture = AMD64,「x86」。這種不匹配可能會導致運行時失敗。請考慮通過配置管理器更改項目的目標處理器體系結構,以便在項目和參考之間調整處理器體系結構,或者使用與項目的目標處理器體系結構相匹配的處理器體系結構來依賴參考。「

編輯

現在我試圖將項目配置更改爲86,現在的警告,現在消失

我試圖啓動調試程序提供了一個錯誤 TypeInitializationException了未處理。

using System; 
using System.Collections.Generic; 
using System.ComponentModel; 
using System.Data; 
using System.Drawing; 
using System.Linq; 
using System.Text; 
using System.Windows.Forms; 
using finalNative; 
using MathWorks.MATLAB.NET.Arrays; 
using MathWorks.MATLAB.NET.Utility; 

namespace check 
{ 
    public partial class Form1 : Form 
    { 
     finalNative.edit mtb = new finalNative.edit(); // ... >>here is the error message 

     static object Val; 

    public Form1() 
    { 
    InitializeComponent(); 
    } 

    private void button1_Click(object sender, EventArgs e) 
    { 

     OpenFileDialog fdlg = new OpenFileDialog(); 

     fdlg.Title = "Select File "; 

     fdlg.Filter = "All files (*.*)|*.*|All files (*.avi)|*.avi"; 

     fdlg.FilterIndex = 2; 

     fdlg.RestoreDirectory = true; 

     fdlg.ShowDialog(); 

     if (fdlg.FileName != string.Empty) 
     { 
     textBox1.Text = fdlg.FileName; 
     } 
     else 
     { 
     textBox1.Text = "Please Select .avi file before submit the form ! "; 
     Val = textBox1.Text; 
     } 

     private void button2_Click(object sender, EventArgs e) 
     { 
     if (textBox1.Text != String.Empty) 
     { 
      mtb.frames(textBox1.Text); 

      makeframe.Enabled = false; 

      label2.Enabled = false; 

      MessageBox.Show("Video Converted into Frames!"); 
     } 

    } 

    private void button3_Click(object sender, EventArgs e) 
    { 

     mtb.formating(textBox1.Text); 

     MessageBox.Show("Frames Color Should be changed and Saved !"); 

     formating.Enabled = false; 

     label3.Enabled = false; 
    } 

    private void makevideo_Click(object sender, EventArgs e) 
    { 
      mtb.makevideo(textBox1.Text); 

      MessageBox.Show("Video Creation complete And Saved with Name "+"resultant video.avi"); 

      makevideo.Enabled = false; 

      label4.Enabled = false; 
     } 

     private void exit_Click(object sender, EventArgs e) 
     { 
     this.Close(); 
     } 

     private void textBox1_TextChanged(object sender, EventArgs e) 
     { 

     } 

     private void label1_Click(object sender, EventArgs e) 
     { 

     } 

     private void button1_Click_1(object sender, EventArgs e) 
     { 


     } 

     private void Form1_Load(object sender, EventArgs e) 
     { 

     } 
    } 
} 
+0

它說那裏你應該做什麼... – Spans 2014-09-28 06:58:39

+0

是的,現在我試圖改變配置,現在沒有警告。但是當我開始調試時出現錯誤。 – manomary 2014-09-28 07:04:17

+0

你得到的這個錯誤是什麼? – Spans 2014-09-28 07:06:35

回答

0

這是你應該做的:

請考慮通過配置管理器更改 項目的目標處理器架構,以便使其項目和引用之間的處理器 架構,或請參考 參考與處理器體系結構相匹配的項目的目標 處理器體系結構。

閱讀關於例外here

+0

是的,我已通過更改項目配置來解決該問題。現在警告消失了。 – manomary 2014-09-28 07:34:32