0

私は異常な問題に直面してきました.私の単体テストプロジェクトでは、このエラーが発生しています.また、奇妙なことは、通常は合格するいくつかのテストが次の実行で失敗することです. アセンブリからすべてのプロファイルを読み込もうとしていますが、このエラーで AutoMapperMappingExceptions も取得しています。潜在的なエラーについて app.config もチェックしました。xunit2、automapper 3.2.1 を実行しています。スタックトレースの一部を添付しています

    System.Configuration.ConfigurationErrorsException
    Configuration system failed to initialize
    at System.Configuration.ConfigurationManager.PrepareConfigSystem()
    at System.Configuration.ConfigurationManager.GetSection(String sectionName)
    at System.Web.Configuration.ClientRuntimeConfig.GetSectionObject(String sectionName)
    at System.Web.Configuration.RuntimeConfig.GetSection(String sectionName, Type type, ResultsIndex index)
    at System.Web.Configuration.RuntimeConfig.get_HttpRuntime()
    at System.Web.Util.HttpEncoder.GetCustomEncoderFromConfig()
    at System.Lazy`1.CreateValue()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Lazy`1.get_Value()
    at System.Web.Util.HttpEncoder.get_Current()
    at System.Web.HttpUtility.HtmlDecode(String s)
4

1 に答える 1

0

これはフレームワーク エラーであり、AM とは関係ありません。たとえば、不正な構成ファイルが原因でこの問題が発生します。詳細を含む内部例外が必要です。

于 2017-08-15T14:22:35.077 に答える