{"record":{"id":"04cf8ac4563ad6ef","repo":"BeyondDimension/SteamTools","slug":"source-directory-not-found-dir-fullname","errorCode":null,"errorMessage":"Source directory not found: {dir.FullName}","messagePattern":"Source directory not found: (.+?)","errorType":"exception","errorClass":"DirectoryNotFoundException","httpStatus":null,"severity":"error","filePath":"src/BD.WTTS.Client.Tools.Publish/Constants.cs","lineNumber":199,"sourceCode":"        bool? no_cdn = null)\n    {\n        // https://learn.microsoft.com/zh-cn/dotnet/core/tools/dotnet-install-script\n        // https://dot.net/v1/dotnet-install.sh\n        // https://dot.net/v1/dotnet-install.ps1\n        if (!no_cdn.HasValue) no_cdn = !ProjectUtils.IsCI();\n        var specific_version = $\"{Environment.Version.Major}.{Environment.Version.Minor}.{Environment.Version.Build}\";\n        var download_link = $\"{(no_cdn.Value ? feed_no_cdn : feed)}/aspnetcore/Runtime/{specific_version}/aspnetcore-runtime-{specific_version}-{osname}-{normalized_architecture}.{(osname == \"win\" ? \"zip\" : \"tar.gz\")}\";\n        return download_link;\n    }\n\n    static void CopyDirectory(string sourceDir, string destinationDir, bool recursive) // https://learn.microsoft.com/zh-cn/dotnet/standard/io/how-to-copy-directories\n    {\n        // Get information about the source directory\n        var dir = new DirectoryInfo(sourceDir);\n\n        // Check if the source directory exists\n        if (!dir.Exists)\n            throw new DirectoryNotFoundException($\"Source directory not found: {dir.FullName}\");\n\n        // Cache directories before we start copying\n        DirectoryInfo[] dirs = dir.GetDirectories();\n\n        // Create the destination directory\n        IOPath.DirCreateByNotExists(destinationDir);\n\n        // Get the files in the source directory and copy to the destination directory\n        foreach (FileInfo file in dir.GetFiles())\n        {\n            string targetFilePath = Path.Combine(destinationDir, file.Name);\n            file.CopyTo(targetFilePath, true);\n        }\n\n        // If recursive and copying subdirectories, recursively call this method\n        if (recursive)\n        {\n            foreach (DirectoryInfo subDir in dirs)","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/BeyondDimension/SteamTools/blob/c16ffa08e03b192d23ada290c4969e77f9201f3d/src/BD.WTTS.Client.Tools.Publish/Constants.cs#L181-L217","documentation":"Error \"Source directory not found: {dir.FullName}\" thrown in BeyondDimension/SteamTools.","triggerScenarios":"Thrown when copying a directory tree during publish packaging: the source directory to copy from is missing.","commonSituations":"Happens when a publish script references an output or assets directory that was renamed, deleted, or never built. Confirm the build produced the expected folder and that the configured source path is correct.","solutions":["Confirm the source directory path exists before invoking the copy operation.","Correct the directory path argument or configuration value that produced the missing path.","When running from scripts, ensure the working directory is the repository root so relative paths resolve."],"exampleFix":"Create the directory shown in the error message or fix the path argument, then rerun the publish command.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c16ffa08e03b192d23ada290c4969e77f9201f3d","analyzedAt":"2026-08-13T11:52:20.410Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}