c# - GetCurrentDirectory returns "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE" -
please see code below:
string test = system.io.directory.getcurrentdirectory(); up today; test return directory of project i.e. c:\mysolution
the mysolution folder contains mysolution.sln.
now returns: "c:\\program files (x86)\\microsoft visual studio 12.0\\common7\\ide"
what problem? have spent time googling , have looked here: https://msdn.microsoft.com/en-us/library/system.io.directory.getcurrentdirectory(v=vs.110).aspx
it's code i'm using (so far reliable):
new uri(path.getdirectoryname(assembly.getexecutingassembly().codebase)).localpath
Comments
Post a Comment