The Environment.CurrentDirectory property always returns the path to the system directory instead of my application directory. In my PC counterpart, it returns the application directory.
What is the problem? How can I solve it?
The following code works for me
ePCRSettings = XMLParser.XmlParser.Deserialize<PCRGeneratorSettings>(string.Format("{0}\\ePCRPDFSettings.xml", AppDomain.CurrentDomain.BaseDirectory)); AppDomain.CurrentDomain.BaseDirectory - Returns the directory E:\MyApplications\.
The following code does not work for me
ePCRSettings = XMLParser.XmlParser.Deserialize<PCRGeneratorSettings>(string.Format("{0}\\ePCRPDFSettings.xml", Environment.CurrentDirectory)); Environment.CurrentDirectory - Returns c:\windows\system32.
This DLL file can be used in VB 6 and ASP.NET applications.
gopal
source share