Troubleshooting Guide
When running release note automation, you may encounter unexpected errors. Most problems occur in one of three areas: environment setup, script execution, or Phase progression, and understanding the cause allows for quick resolution.
This section explains why each problem occurs—the root cause—and provides the corresponding solution.
Environment-Related Issues
Section titled “Environment-Related Issues”Environment issues are revealed first in Phase 1. They occur when the required tools or paths are not in place before the scripts run.
.NET SDK Not Found
Section titled “.NET SDK Not Found”Error: .NET 10 SDK is requiredCannot execute 'dotnet --version' command.The release note scripts use .NET 10’s File-based App feature. Since this feature was first introduced in .NET 10, earlier versions of the SDK cannot directly execute .cs files.
Solution:
- Install .NET 10 SDK: https://dotnet.microsoft.com/download/dotnet/10.0
- Check the PATH environment variable
- Restart the terminal and verify:
Terminal window dotnet --version
Not a Git Repository
Section titled “Not a Git Repository”Error: Not a Git repositoryRelease note generation starts with analyzing Git commit history. If you run the command in a location without a .git directory, commits cannot be read, causing this error.
Solution:
# Navigate to the Git repository rootcd /path/to/your/project
# Verify Git statusgit statusScripts Directory Not Found
Section titled “Scripts Directory Not Found”Error: Cannot find release note scripts'.release-notes/scripts' directory does not exist.The C# scripts to be executed in Phase 2 must be in the .release-notes/scripts/ folder. If this folder is missing, it may have been excluded when cloning the repository initially, or you may be on a different branch.
Solution:
# Check from the project rootls -la .release-notes/scripts/
# If the directory is missing, fetch from the repositorygit checkout origin/main -- .release-notes/Script Execution Issues
Section titled “Script Execution Issues”Cases where the environment is fine but the script itself fails to execute. NuGet package issues, file locks, and build errors are the main causes.
NuGet Package Restore Failure
Section titled “NuGet Package Restore Failure”error: Unable to resolve package 'System.CommandLine@2.0.1'File-based Apps automatically restore NuGet packages at execution time. This error appears when package download fails due to network issues or cache corruption.
Solution:
# Clear NuGet cachedotnet nuget locals all --clear
# Retrydotnet AnalyzeAllComponents.cs --base HEAD~10 --target HEADFile Lock Error
Section titled “File Lock Error”The process cannot access the file because it is being used by another process.A previous script execution may have terminated abnormally, leaving a dotnet process holding files in the .analysis-output/ folder. This occurs particularly often on Windows.
Solution:
# On Windows, terminate dotnet processestaskkill /F /IM dotnet.exe
# Delete the .analysis-output folderrm -rf .release-notes/scripts/.analysis-output/
# RetryBuild Failure
Section titled “Build Failure”error CS1002: ; expectedBuild FAILED.The API extraction script (ExtractApiChanges.cs) builds the project to analyze the DLL. If there are compilation errors in the project code, the DLL cannot be generated and API extraction also fails.
Solution:
# First verify the project buildsdotnet build -c Release
# Fix build errors and retryPhase-Specific Issues
Section titled “Phase-Specific Issues”Issues that occur during specific Phases of the 5-Phase workflow. Which Phase it stopped at is the first clue for identifying the cause.
Phase 1: Base Branch Not Found
Section titled “Phase 1: Base Branch Not Found”Base branch origin/release/1.0 does not existFor subsequent releases, the previous release branch is used as the Base. For first deployments, this branch does not yet exist, so this error may appear. The command automatically sets the initial commit as the Base, but for manual execution, you need to specify it directly.
Solution (first deployment):
# Analyze from the initial commitcd .release-notes/scriptsFIRST_COMMIT=$(git rev-list --max-parents=0 HEAD)dotnet AnalyzeAllComponents.cs --base $FIRST_COMMIT --target HEADSolution (use a different branch):
dotnet AnalyzeAllComponents.cs --base origin/main --target HEADPhase 2: API Extraction Failure
Section titled “Phase 2: API Extraction Failure”API extraction failed: ExtractApiChanges.csDLL not foundExtractApiChanges.cs extracts Public APIs from the built DLL. If the Release build has not been performed yet or the build output path is different, it cannot find the DLL.
Solution:
# Build the projectdotnet build -c Release
# Verify build outputls Src/Functorium/bin/Release/net10.0/
# Retry API extractiondotnet ExtractApiChanges.csPhase 3: Analysis Files Not Found
Section titled “Phase 3: Analysis Files Not Found”Cannot find analysis files.analysis-output/*.md files are missingPhase 3 uses the output of Phase 2 (component analysis files) as input. If Phase 2 failed or the output folder is empty, Phase 3 cannot proceed.
Solution:
# Re-run Phase 2cd .release-notes/scriptsdotnet AnalyzeAllComponents.cs --base origin/release/1.0 --target HEADdotnet ExtractApiChanges.cs
# Verify filesls .analysis-output/Phase 4: Uber File Not Found
Section titled “Phase 4: Uber File Not Found”Cannot find Uber fileall-api-changes.txt is missingThe Uber file contains all the Public APIs of the project and is used when Phase 4 writes the API section of the release notes and when Phase 5 validates accuracy. Since ExtractApiChanges.cs generates this file, that script must be run first.
Solution:
# Run ExtractApiChanges.cscd .release-notes/scriptsdotnet ExtractApiChanges.cs
# Verifycat .analysis-output/api-changes-build-current/all-api-changes.txtPhase 5: Validation Failure
Section titled “Phase 5: Validation Failure”Phase 5: Validation FailedAPI Accuracy (2 errors)This occurs when API signatures described in the release notes differ from the contents of the actual Uber file. Claude may have described API names or parameters slightly differently while writing the document.
Solution:
- Identify the problematic APIs from the error message
- Search for the correct signature in the Uber file:
Terminal window grep "MethodName" .analysis-output/api-changes-build-current/all-api-changes.txt - Fix the release notes
- Re-run validation
Claude Code-Related Issues
Section titled “Claude Code-Related Issues”Issues that occur with Claude Code itself, which runs the workflow.
Command Not Recognized
Section titled “Command Not Recognized”Command not found: /release-noteClaude Code custom commands are defined in the .claude/commands/ folder. If this folder or the release-note.md file is missing, the command will not be recognized.
Solution:
# Check the .claude/commands/ folderls .claude/commands/
# Verify the release-note.md file existscat .claude/commands/release-note.mdVersion Parameter Missing
Section titled “Version Parameter Missing”Error: Version parameter is requiredThe /release-note command requires a version string as a mandatory argument.
Solution:
# Correct usage> /release-note v1.0.0Context Exceeded
Section titled “Context Exceeded”In large projects, there may be so many commits and files to analyze that Claude’s context window is exceeded. Symptoms include responses stopping midway or incomplete results.
Solution:
- Split the conversation into parts
- Request Phase by Phase separately
- Start a new conversation
Output File Issues
Section titled “Output File Issues”Character Encoding Issues
Section titled “Character Encoding Issues”If characters appear garbled in the release notes, it’s a file encoding issue. The generated file may have been saved in an encoding other than UTF-8.
Solution:
- Save the file in UTF-8 encoding
- Check editor encoding settings
Markdown Rendering Errors
Section titled “Markdown Rendering Errors”If code blocks or tables are not displayed correctly, it’s a Markdown syntax error. Common causes include mismatched backtick counts and missing table alignment characters.
Solution:
# Run Markdown lintnpx markdownlint-cli@0.45.0 .release-notes/RELEASE-v1.0.0.md
# Fix errorsGeneral Troubleshooting Checklist
Section titled “General Troubleshooting Checklist”When individual problems above don’t solve the issue, follow this checklist in order. The approach is to verify the most basic environment first, clean the cache, and then try running scripts individually. Most problems reveal their cause within these five steps.
-
Verify Environment
Terminal window dotnet --version # .NET 10.x?git status # Git repository?pwd # Correct directory? -
Clear Cache
Terminal window dotnet nuget locals all --clearrm -rf .release-notes/scripts/.analysis-output/ -
Build the Project
Terminal window dotnet build -c Release -
Run Scripts Individually
Terminal window cd .release-notes/scriptsdotnet AnalyzeAllComponents.cs --helpdotnet ExtractApiChanges.cs --help -
Check Logs
- Read the entire error message
- Check the stack trace
- Review generated file contents
Getting Help
Section titled “Getting Help”If the checklist doesn’t resolve the issue, please refer to the following documentation or file an issue.
.release-notes/scripts/docs/README.md- Script documentation.claude/commands/release-note.md- Command definition- GitHub Issues: https://github.com/hhko/Functorium/issues
Q1: Why does the “file lock error” occur particularly often on Windows?
Section titled “Q1: Why does the “file lock error” occur particularly often on Windows?”A: Windows uses an exclusive lock policy where another process cannot delete or overwrite a file if a process has it open. If a previous script execution terminated abnormally, the dotnet process may remain holding .analysis-output/ files, requiring taskkill /F /IM dotnet.exe to terminate the process.
Q2: When Phase 5 validation shows an API accuracy error, should the Uber file or the release notes be corrected?
Section titled “Q2: When Phase 5 validation shows an API accuracy error, should the Uber file or the release notes be corrected?”A: The release notes should be corrected. The Uber file is extracted from the actually built DLL and serves as the Single Source of Truth. If the API signature described in the release notes differs from the Uber file, the release notes are incorrect. Use grep to find the correct signature in the Uber file and then fix the release notes.
Q3: What cache does dotnet nuget locals all --clear clean?
Section titled “Q3: What cache does dotnet nuget locals all --clear clean?”A: It deletes all local caches used by NuGet, including HTTP cache, global packages folder, and temporary folders. File-based Apps automatically restore NuGet packages at execution time, so if the cache is corrupted, package restoration can fail. After clearing, packages will be re-downloaded on the next execution.
Q4: How should you respond when a context exceeded issue occurs?
Section titled “Q4: How should you respond when a context exceeded issue occurs?”A: In large projects with many commits and files, Claude’s context window can be exceeded. Splitting requests by Phase is the most effective approach. For example, first run only Phase 2 data collection, then in a new conversation, proceed with Phases 3-5 based on the collected data to distribute the context burden.
This concludes the main text of the hands-on tutorial. The next section provides a quick reference guide consolidating the commands, workflow, and output files needed for release note generation.