Running the project results into fatal error due to empty/null ConfigPath
StefH opened this issue · 3 comments
I've forked latest code and when running the app using F5, I get an error in SyncthingConfig.cs that ConfigPath is null in this code:
static SyncthingConfig()
{
Watcher = new FileSystemWatcher(Path.GetDirectoryName(ConfigPath))
. . .
Another question, did you use a generator to create the SyncthingConfig.cs file ?
And why not just store these settings in the app.config ?
I'm also seeing this when compiling,
2015-02-23 09:46:12,533 - FATAL [1][SyncthingTray.Program][27]: System.TypeInitializationException: Typeinitialiseringen for SyncthingTray.SyncthingConfig forårsaket et unntak. ---> System.ArgumentNullException: Verdien kan ikke være null.
Parameternavn: path
ved System.IO.FileSystemWatcher..ctor(String path, String filter)
ved SyncthingTray.SyncthingConfig..cctor() i c:\Users\Joel\Desktop\SyncthingTray-master\SyncthingTray\SyncthingConfig.cs:linje 23
--- Slutten på sporingen av intern unntaksstakk ---
ved SyncthingTray.SyncthingConfig.add_ConfigurationChanged(SyncthingConfigEventHandler value)
ved SyncthingTray.Program.Main() i c:\Users\Joel\Desktop\SyncthingTray-master\SyncthingTray\Program.cs:linje 27
For the sake of sanity I've removed the old configs @ C:\Users\ user \AppData\Local\SyncthingTray before I ran the new build
- The code is trying to read the config.xml from SyncThing, which maybe fails when you don't have SyncThing installed.
- The SyncthingConfig.cs is generated (I think) from the config.xml from SyncThing. I wonder if the SyncThing project also defines an .XSD ?
Any update?