How to resolve System.Configuration.SettingsPropertyNotFoundException

I am developing a .Net 6 windows application, and in that i am updating an app setting at the runtime, by taking inputs from the user, to save the application configuration. While doing so, i am getting error as, 

System.Configuration.SettingsPropertyNotFoundException HResult=0x80131500 
Message=The settings property 'comPort' was not found. 

when i am trying to assign the new value, using the code snippet as, 

Properties.Settings.Default["comPort"] = value;