単純な問題のようですが、F# コンソール アプリケーションから構成ファイルに書き込むことができません。私の最後の試みは次のようになります
let config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal)
// config.AppSettings.SectionInformation.AllowExeDefinition <-ConfigurationAllowExeDefinition.MachineToLocalUser
match self.FileName with
| Some name -> config.AppSettings.Settings.["FileName"].Value <- name
| None -> ()
config.Save(ConfigurationSaveMode.Modified)
あらゆる種類のエラーが発生しました。このコードに対応するものは
System.NullReferenceException: オブジェクト参照がオブジェクトのインスタンスに設定されていません。System.Configuration.ConfigurationElement.SetPropertyValue (ConfigurationProperty prop、オブジェクト値、ブール値の ignoreLocks) で ...
F# には適切なドキュメントがなく、C#/VB のドキュメントに従うのは難しいと思います。助言がありますか?