質問

うことによりdynamicalyコンパイルを使用したコードCodeDom.までの負荷その他のアセンブリができない負荷System.Data.Linq.dll.または、エラー:

メタデータファイルSystem.Data.Linq.dllみようと考えています

私のコードは次のように記述されています。

CompilerParameters compilerParams = new CompilerParameters();
compilerParams.CompilerOptions = "/target:library /optimize";
compilerParams.GenerateExecutable = false;
compilerParams.GenerateInMemory = true;
compilerParams.IncludeDebugInformation = false;
compilerParams.ReferencedAssemblies.Add("mscorlib.dll");
compilerParams.ReferencedAssemblies.Add("System.dll");
compilerParams.ReferencedAssemblies.Add("System.Data.Linq.dll");

そのアイデア?

役に立ちましたか?

解決

できるので組み立てが格納され違う場所によmscorlibです。この場合にはそれをフルパス。最も便利な方法をフルパスであるようにします。純ローダーになります。思うようになります:

compilerParams.ReferencedAssemblies.Add(typeof(DataContext).Assembly.Location);

他のヒント

これかの答えがいのコードが実行マシンです。NET Framework3.5?

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top