{"record":{"id":"55f0c7c0f81ed53a","repo":"cefsharp/CefSharp","slug":"settingname-now-requires-an-absolute-path-the-p","errorCode":null,"errorMessage":"{settingName} now requires an absolute path, the path provided is non-absolute. You can use System.IO.Path.GetFullPath to obtain an absolute path. Current value:{path}","messagePattern":"(.+?) now requires an absolute path, the path provided is non-absolute\\. You can use System\\.IO\\.Path\\.GetFullPath to obtain an absolute path\\. Current value:(.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"CefSharp/Internals/PathCheck.cs","lineNumber":67,"sourceCode":"\n        /// <summary>\n        /// Throw exception if the path provided is non-asbolute\n        /// CEF now explicitly requires absolute paths\n        /// https://github.com/chromiumembedded/cef/issues/2916\n        /// Empty paths are ignored\n        /// </summary>\n        /// <param name=\"path\">path</param>\n        /// <param name=\"settingName\">string to appear at the start of\n        /// the exception, e.g. CefSettings.BrowserSubProcessPath</param>\n        public static void AssertAbsolute(string path, string settingName)\n        {\n            //Don't validate empty paths\n            if (!string.IsNullOrEmpty(path) && EnableAssert)\n            {\n                //IsPathRooted will return true for paths that start with a single slash, e.g. \\programfiles\n                if (!IsAbsolute(path))\n                {\n                    throw new Exception(settingName + \" now requires an absolute path, the path provided is non-absolute. You can use System.IO.Path.GetFullPath to obtain an absolute path. Current value:\" + path);\n                }\n            }\n        }\n\n        /// <summary>\n        /// Valid path is absolute, based on Chromium implementation.\n        /// </summary>\n        /// <param name=\"path\">path</param>\n        public static bool IsAbsolute(string path)\n        {\n            //Based on Chromium FilePath::IsAbsolute\n            //https://source.chromium.org/chromium/chromium/src/+/master:base/files/file_path.cc;drc=1c097f5f790782b2ad0b897cd9e2921ce9713585;l=97?q=IsAbsolute&ss=chromium&originalUrl=https:%2F%2Fcs.chromium.org%2F\n            var pos = FindDriveLetter(path);\n            if (pos != -1)\n            {\n                // Look for a separator right after the drive specification.\n                return path.Length > (pos + 1) && IsDirectorySeparator(path[pos + 1]);\n            }","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/cefsharp/CefSharp/blob/16bc6e0711a4945be17e8bc4bc7ccf9469f3fdec/CefSharp/Internals/PathCheck.cs#L49-L85","documentation":"Thrown by PathCheck.AssertAbsolute when a non-empty path setting is not absolute according to Chromium's FilePath::IsAbsolute rule (a drive letter followed by a separator, or two leading separators). Relative paths, single-leading-separator paths like \\programfiles, and unprefixed relative names are rejected. Validation is skipped when the path is null/empty or EnableAssert is false.","triggerScenarios":"Assigning a relative path to CefSettings properties such as BrowserSubProcessPath, LocalesDirPath, ResourcesDirPath, CachePath, UserDataPath, orLogFile. Paths rooted with a single backslash are also rejected because they are not absolute by the Chromium rule.","commonSituations":"Using AppDomain.CurrentDomain.BaseDirectory-relative strings without combining to an absolute path; deploying with relative paths that worked in older versions; cross-platform path differences.","solutions":["Build absolute paths with System.IO.Path.GetFullPath or Path.Combine(baseDir, relative) before assigning.","Anchor paths to the app base directory (AppContext.BaseDirectory) explicitly.","Verify the resolved path begins with a drive+separator (Windows) or two separators / leading slash as appropriate.","Leave a setting null/empty if you want the default, rather than passing a relative string."],"exampleFix":"// before\nsettings.BrowserSubProcessPath = \"CefSharp.BrowserSubprocess.exe\";\n\n// after\nvar baseDir = AppContext.BaseDirectory;\nsettings.BrowserSubProcessPath = Path.Combine(baseDir, \"CefSharp.BrowserSubprocess.exe\");","handlingStrategy":"validation","validationCode":"static string ToAbsolute(string p) =>\n    string.IsNullOrEmpty(p) ? p : Path.GetFullPath(p);\nsettings.BrowserSubProcessPath = ToAbsolute(settings.BrowserSubProcessPath);\nsettings.LocalesDirPath = ToAbsolute(settings.LocalesDirPath);","typeGuard":null,"tryCatchPattern":"try { settings.BrowserSubProcessPath = value; }\ncatch (Exception ex) when (ex.Message.Contains(\"absolute path\"))\n{ settings.BrowserSubProcessPath = Path.GetFullPath(value); }","preventionTips":["Always combine paths with the app base directory before assigning.","Leave path settings null/empty to accept defaults.","Unit-test path settings on a clean build output."],"tags":["cefsharp","configuration","paths","absolute-path","validation"],"backgroundTag":null,"analyzedSha":"16bc6e0711a4945be17e8bc4bc7ccf9469f3fdec","analyzedAt":"2026-08-13T19:57:05.828Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}