just got MediaPortal to compile in my VS2005 (pro) environment - fairly easy to do. I wanted to tinker with the Configuration app so I set the MediaPortal.Configuration project as the "StartUp Project". When I run in debug mode I was getting "DirectoryNotFoundException" during the launch. It ends up the app couldn't find my "language" folder, the "Music DSP" dll, etc. Long story short, the lookup routines for "language" LocalisationProvider.GetAvailableLangauges searches for the "language" folder in my "bin\Debug" (where the exe is running from as opposed to my "current working directory". The folder for searching for "language" is set via "Config.GetFolder(Config.Dir.Language);" which is initialized with "AppDomain.CurrentDomain.BaseDirectory" (which is my bin\Debug) folder.
Next, my hack: change AppDomain.CurrentDomain.BaseDirectory to "Directory.GetCurrentDirectory()" in “Config.cs”. In fact, as I look around in the source there are a variety of ways that directory/paths are initialized all over the place: MusicDSP for example, uses “Application.StartupPath”, which is similar to AppDomain.CurrentDomain.BaseDirectory. I changed a few of these (where I was getting exceptions) to “Directory.GetCurrentDirectory()” and everything is working in Debug Mode (F5) as long as I set my Debug setting “Working Directory:” (project settings) to be “<MyBasePath>\trunk\mediaportal\MediaPortal.Base\”
So... Instead of using my hack, how am I supposed to be running Configuration.exe in debug mode then? I usually just hit "F5" in the IDE and start debugging, as is my habit. But this cannot work unless the config EXE is moved into the folder where all the required files are – it seems that MediaPortal.Base is the place. How are you guys debugging this beast?
Next, my hack: change AppDomain.CurrentDomain.BaseDirectory to "Directory.GetCurrentDirectory()" in “Config.cs”. In fact, as I look around in the source there are a variety of ways that directory/paths are initialized all over the place: MusicDSP for example, uses “Application.StartupPath”, which is similar to AppDomain.CurrentDomain.BaseDirectory. I changed a few of these (where I was getting exceptions) to “Directory.GetCurrentDirectory()” and everything is working in Debug Mode (F5) as long as I set my Debug setting “Working Directory:” (project settings) to be “<MyBasePath>\trunk\mediaportal\MediaPortal.Base\”
So... Instead of using my hack, how am I supposed to be running Configuration.exe in debug mode then? I usually just hit "F5" in the IDE and start debugging, as is my habit. But this cannot work unless the config EXE is moved into the folder where all the required files are – it seems that MediaPortal.Base is the place. How are you guys debugging this beast?