参照log4netのはxsp4のApp_Codeフォルダー内のASP.NETアプリケーションをホストされたモノ
質問
私はモノに利用できるのopenSUSE 11.3 VMイメージを使用して2.8.2をモノにASP.NETアプリケーションを移植していますproject.comする。アプリはxsp4下でそれを実行しています。私のApp_CodeフォルダーにあるAは.csファイルがbinフォルダにあるlog4net.dllを見つけていません。私はリリースがlog4net.dllの2.0バージョンをモノラル使用しています。
私が手にエラーを以下に示します:
Server Error in '/' Application
Compilation Error
Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error.
Compiler Error Message: CS0246: The type or namespace name `log4net' could not be found. Are you missing a using directive or an assembly reference?
Source Error:
Line 2: using System.Web;
Line 3: using System.Web.SessionState;
Line 4: using log4net;
Line 5: using MongoDB.Bson;
Line 6:
私はそうのようなweb.configファイルで明示的に参照を追加しようとした場合:
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821" />
</assemblies>
</compilation>
I取得「その依存関係の1または 『バージョン= 1.2.10.0、カルチャニュートラル、PublicKeyToken = = 1b44e1d426115821、log4netの』ファイルまたはアセンブリをロードできませんでした。システムは、ファイルが指定見つけることができません。」
解決
問題は、私はビンと、システム上のbinフォルダの両方を有するためでした。バイナリは、ビンにあったが、システムは最初のビンを読んでいた。
所属していません StackOverflow