I have a UserControl Library solution which has the following
UserControl ---UserControl project
---UserControl Test Project
IN my test project, I am able to add my usercontrol to the tool box. When i drag it and drop it in my forms, it fails. I put in logging and found out that my usercontrol reads a config file. The config file is marked to copy always and exists in the obj\debug and the bin\debug directory/.
However when i drag the usercontrol to a form on my test project, it is trying to get a file from
C:\Documents and Settings\jondoe\Local Settings\Application Data\Microsoft\VisualStudio\8.0\ProjectAssemblies\vqjlihdl01
The above is a result of this
string pluginAssemblyPath = Assembly.GetExecutingAssembly().Location;
DirectoryInfo dirInfo = new DirectoryInfo(pluginAssemblyPath);
pluginAssemblyPath = pluginAssemblyPath.Replace(dirInfo.Name.ToString(),"");
string configFilePath = pluginAssemblyPath + "FileConfig.xml";
I would have assumed that if i compile in debug mode, the file should be under obj\debug and that should be my assembly path. what gives or is there some setting that i need to do to get it to run correctly so that it can find my config file in the right location?