var outPutDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly(). CodeBase); var iconPath = Path.Combine(outPutDirectory, "FolderImg.jpg"); string icon_path = new Uri(iconPath ).LocalPath;