これは重複した質問ではないと思いますが、それは私がこの問題を完全に理解していないためかもしれません。
少なくとも私が読んだ多くの投稿によると、この例外は設計によるようです。しかし、この例外は定期的に私のアプリケーションを壊しています。Web サービスの呼び出しが再度行われると、動作しているように見えます (魔法のように!)。しかし、私はその最初の Web サービス呼び出しが機能することを望んでいます。
これはログに記録されている例外です:
System.IO.FileNotFoundException: Could not load file or assembly 'Our.Namespace.Here.ClassName.XmlSerializers' or one of its dependencies. The system cannot find the file specified.
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.LoadWithPartialNameInternal(AssemblyName an, Evidence securityEvidence, StackCrawlMark& stackMark)
at System.DirectoryServices.AccountManagement.UnsafeNativeMethods.IADsPathname.Retrieve(Int32 lnFormatType)
at System.DirectoryServices.AccountManagement.ADStoreCtx.LoadDomainInfo()
at System.DirectoryServices.AccountManagement.ADStoreCtx.get_DnsForestName()
at System.DirectoryServices.AccountManagement.ADStoreCtx.GetGroupsMemberOf(Principal p)
at System.DirectoryServices.AccountManagement.Principal.GetGroupsHelper()
at Our.Different.Namespace.ClassName.FindAccount(FindAccountRequest request, String ip, FindAccountResponse& response)
リリース モードでビルドするときに、ビルド出力の一部としてこの XmlSerializers ファイルを取得しません。ファイルを強制的に生成できるように思えますが、ファイルを強制的に生成せずに例外を停止するにはどうすればよいですか?