64ビットのWindowsOS上でNUnitがテストプロジェクトをロードできない
NUnitでテストプロジェクトをロードすると、以下のようなエラーになることがあります。
Test load failed!
You may be attempting to load an assembly built with a later
version of the CLR than
the version under which NUnit is currently running (2.0.50727) or
trying to load a 64-bit assembly into a 32-bit process.
System.BadImageFormatException : ファイルまたはアセンブリ
'YourTests, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null'、またはその依存関係の1つが読み込めません
でした。間違ったフォーマットのプログラムを読み込もうとしまし
た。
For further information, use the Exception Details menu item.
再現条件
これは以下の条件で発生します。
- PCが64ビットOS
- VisualStudioで、プラットフォームターゲットをx86にしてビルドしている
- スタートメニューから「NUnit」を選んで起動している。