Settings.Default returns null after windows 10 upgrade

113 views Asked by At

At my job we want to upgrade all our devices to windows 10. I am in charge of checking some applications we made in c#. The code now throws the following exception when executing this line: int display = Properties.Settings.Default.Display;

Exception:

Windows 10 exception

The Settings.settings file looks like this:

Settings.settings file

Any reason this should not work on windows 10. I have already double checked and the same application build still works on windows 7.

Update 1:

I have found an InnerException which might be usefull:

"Value cannot be null.\r\nParamter name: source"

Since the exception shows when holding the mouse over the word 'Default' and not the word 'Display' I am guessing that Settings.Default is null. Hopefully this is useful because I don't know how to fix this.

0

There are 0 answers