所以我得到一個異常,我的測試項目無法打開SQLite程序集。然而這裏是我編譯時的輸出:測試類不適用於x86
------ Build started: Project: Budget, Configuration: Debug x86 ------
Budget -> C:\Users\Scott\Desktop\Development\Budget\Budget\Budget\bin\Debug\Budget.exe
------ Build started: Project: Test, Configuration: Debug Any CPU ------
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Data.SQLite". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
Test -> C:\Users\Scott\Desktop\Development\Budget\Budget\Test\bin\Debug\Test.dll
========== Build: 2 succeeded or up-to-date, 0 failed, 0 skipped ==========
正如你可以看到代碼項目建立好(似乎是因爲它設置爲x86)。儘管我已經將兩個項目都設置爲x86,並且保存並重建了它們,但它仍然沒有說測試是針對x86構建的,因此我們看到的是測試組件的警告,而不是其他測試。我怎樣才能爲x86構建?
斯科特
這讓我用視覺工作室煩惱的次數。由於這正是我不得不爲特定平臺構建時所要做的,我知道這是正確的答案+1 :) – Sekhat 2010-10-17 10:02:27
我遇到了這個問題;但直到我在每個項目上打開平臺編輯對話框後,新的x86選項纔會保存。它顯示在網格中;但沒有在下拉菜單中顯示。 – 2012-10-04 14:12:44