2011-07-24 11 views
4

私はasp.net mvc 3アプリケーションでmvc3にninjectを使用しています。アプリケーションを実行しようとすると、このエラーが発生します。私はcassiniサーバーを閉じて、再度vs-debuggerを実行したが、エラーは依然として残っていた。それは前に働いていましたが、それは以前に起こったが、私は再びそれがどのように働き始めたのか分かりません。これがランダムかどうか分かりません。Ninject mvc3がアセンブリからWebActivator.ApplicationShutdownMethodAttributeをロードできませんでした

私が起こったことは、私がPCを休止してバックアップを覚まし、そのエラーが発生したときにウェブサイトをリロードしようとしたことです。私はまだPCを再起動していません。

エラー:

Could not load type 'WebActivator.ApplicationShutdownMethodAttribute' from assembly 'WebActivator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

私は、Visual Studioでこれを参照してください。

Locating source for 'D:\Code\Bitbucket\WebActivator\WebActivator\PreApplicationStartCode.cs'. Checksum: MD5 {ca d6 fb 32 7f 34 6 22 5d 1f 1a 40 37 e8 da 47} 
The file 'D:\Code\Bitbucket\WebActivator\WebActivator\PreApplicationStartCode.cs' does not exist. 
Looking in script documents for 'D:\Code\Bitbucket\WebActivator\WebActivator\PreApplicationStartCode.cs'... 
Looking in the projects for 'D:\Code\Bitbucket\WebActivator\WebActivator\PreApplicationStartCode.cs'. 
The file was not found in a project. 
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\crt\src\'... 
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'... 
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'... 
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\'... 
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: D:\Code\Bitbucket\WebActivator\WebActivator\PreApplicationStartCode.cs. 
The debugger could not locate the source file 'D:\Code\Bitbucket\WebActivator\WebActivator\PreApplicationStartCode.cs'. 

答えて

9

あなたはWebActivatorの間違ったバージョンを展開しています。バージョン1.4が必要です

+0

リファレンスフォルダのdllは、次のように書いています: 'Version:1.4.1.0' –

+1

リファレンスフォルダには何も関係ありません。問題は、展開/ロードされるものです。 Fusionログを使用して、ロードされているものを確認し、正しいバージョンに変更します。 –

+0

あなたのパッケージフォルダにあるバージョンを確認しようとすると、古いバージョンが削除され、ソリューションが再構築されます。いくつかのビルドエラーが発生し、WebActivatorの最新バージョンへの参照を追加した後、再び動作するようになりました。 WebActivatorのさまざまなバージョンへの参照が原因であるようです。 – wullinkm

関連する問題