0

元同僚から ac# exe アプリケーションを継承しました。この exe は、別のアプリケーション (およびテストとデバッグ用のコマンド ライン) によって呼び出されるバッチとして使用されます。その app.config には、Log4Net の構成のみが表示されます (参照にも存在します)。

アプリケーションは ceTE.DynamicPDF.40 を使用します。

いくつかの構成のために、app.config にキーと値の設定を挿入したかったのです。アプリケーションで使用する要素が何であれ、実行時に例外がスローされます。以前は決してしませんでした。

それが壊れる行は次のとおりです。

Document document = new Document();

例外情報は次のとおりです (翻訳済み)。

ex.Source --> ceTe.DynamicPDF.40
ex.Message --> The type initializer for 'ceTe.DynamicPDF.Document' threw an exception.
ex.StackTrace -->in ceTe.DynamicPDF.Document..ctor() in BatchStampaRegistroDeleghe.BusinessLogic.BusinessManager.GestioneCover (String & Path, List`1 args, Int32 Startpage, String Sectional) in C: \ ... \ BusinessManager.cs: line 779
ex.InnerException.Source --> System.Configuration
ex.InnerException.Message --> Unable to initialize the configuration system
ex.InnerException.StackTrace --> in System.Configuration.ConfigurationManager.PrepareConfigSystem () in System.Configuration.ConfigurationManager.get_AppSettings () in ceTe.DynamicPDF.Document..cctor ()

app.config からエントリを削除すると、exe が動作に戻ります。

誰かが以前に同様の問題を抱えていましたか?事前にアドバイスをありがとう。

4

1 に答える 1