BeyondDimension/SteamTools · error · DirectoryNotFoundException
Source directory not found: {dir.FullName}
Error message
Source directory not found: {dir.FullName} What it means
Error "Source directory not found: {dir.FullName}" thrown in BeyondDimension/SteamTools.
Source
Thrown at src/BD.WTTS.Client.Tools.Publish/Constants.cs:199
bool? no_cdn = null)
{
// https://learn.microsoft.com/zh-cn/dotnet/core/tools/dotnet-install-script
// https://dot.net/v1/dotnet-install.sh
// https://dot.net/v1/dotnet-install.ps1
if (!no_cdn.HasValue) no_cdn = !ProjectUtils.IsCI();
var specific_version = $"{Environment.Version.Major}.{Environment.Version.Minor}.{Environment.Version.Build}";
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")}";
return download_link;
}
static void CopyDirectory(string sourceDir, string destinationDir, bool recursive) // https://learn.microsoft.com/zh-cn/dotnet/standard/io/how-to-copy-directories
{
// Get information about the source directory
var dir = new DirectoryInfo(sourceDir);
// Check if the source directory exists
if (!dir.Exists)
throw new DirectoryNotFoundException($"Source directory not found: {dir.FullName}");
// Cache directories before we start copying
DirectoryInfo[] dirs = dir.GetDirectories();
// Create the destination directory
IOPath.DirCreateByNotExists(destinationDir);
// Get the files in the source directory and copy to the destination directory
foreach (FileInfo file in dir.GetFiles())
{
string targetFilePath = Path.Combine(destinationDir, file.Name);
file.CopyTo(targetFilePath, true);
}
// If recursive and copying subdirectories, recursively call this method
if (recursive)
{
foreach (DirectoryInfo subDir in dirs)View on GitHub (pinned to c16ffa08e0)
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.
Example fix
Create the directory shown in the error message or fix the path argument, then rerun the publish command.
When it happens
Trigger: Thrown when copying a directory tree during publish packaging: the source directory to copy from is missing.
Common situations: 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.
AI-assisted analysis of BeyondDimension/SteamTools@c16ffa08e0 (2026-08-13).
Data as JSON: /api/errors/04cf8ac4563ad6ef.
Report an issue: GitHub.