自分のPCで問題なく動作するアセンブリがありますが、仮想マシンで参照しようとすると、次のエラーが発生します。
System.IO.FileNotFoundException: Could not load file or assembly 'X.dll' or one of its ependencies. The specified module could not be found.
File name: 'X.dll'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm,Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at kernelLoader.Program.Main(String[] args)
ファイルが指定された場所にあることは間違いありません。コードは自分のマシン(開発された場所)で正常に機能します。これは、参照されているすべてのアセンブリとともに、x86プラットフォーム用にコンパイルされています。
アセンブリが完全に信頼されていないことが原因でエラーが発生している可能性があると思います。
アセンブリを強く歌うことはできません。これは、歌われておらず、コードや変更する権限がないいくつかのアセンブリを参照しているためです。
私が実行しているmashineで信頼できるアセンブリを作成する良い方法があると思います。
アセンブリを信頼できるものとしてマークして、ロードおよび実行できるようにするにはどうすればよいですか?