home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Debugging = Current Working Directory
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="jeoffh" data-source="post: 284707" data-attributes="member: 79668"><p>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.</p><p></p><p>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\”</p><p></p><p>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?</p></blockquote><p></p>
[QUOTE="jeoffh, post: 284707, member: 79668"] 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? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Debugging = Current Working Directory
Contact us
RSS
Top
Bottom