I would like to use design-time data for the DesignInstance of my WPF UI view. However, in order for the default constructor of the associated ViewModel to work, I need to read in some configuration information from an external file. (At runtime, I deserialize the information from json.)
The problem is, the ViewModel is not getting instantiated (so the design-time data is not showing up).
In an attempt to diagnose the problem, I used the attach-to-separate-process technique, so I could debug the DesignInstance. I confirmed that the constructor was failing at the point where it tries to create a FileStream to the external config file. I presume that the CurrentDirectory is not the same as when the application is actually running, and therefore the config file cannot be found. (I can set an absolute path and it works, but that solution isn't compatible with my development team, since the absolute path would be different for every developer.)
Is there another way to find the correct path?