This directory contains scripts for release management and development tooling for BlazorWebFormsComponents.
Automates setup and launch of the BeforeWebForms (.NET Framework 4.8) sample app under IIS Express for the HTML audit. The project uses dynamic compilation (CodeFile= directives) instead of MSBuild.
Prerequisites:
- .NET Framework 4.8
- IIS Express (comes with Visual Studio or standalone install)
gitin PATH
Usage:
# Full setup + launch on default port 55501
.\scripts\Setup-IISExpress.ps1
# Custom port, no browser launch
.\scripts\Setup-IISExpress.ps1 -Port 8080 -NoBrowser
# Revert temporary file changes (restores git state)
.\scripts\Setup-IISExpress.ps1 -RevertWhat it does:
- Converts
CodeBehind=toCodeFile=in all .aspx/.ascx/.master files (enables dynamic compilation without MSBuild) - Adds
partialkeyword toGlobal.asax.csif missing - Restores NuGet packages via
nuget.exe(downloads nuget.exe if not found) - Copies required DLLs from NuGet packages to
samples/BeforeWebForms/bin/ - Launches IIS Express serving the sample app
Important: The CodeBehind→CodeFile changes are temporary and should not be committed. Use -Revert to undo them.
Scripts for version publishing and release management using Nerdbank.GitVersioning.
git- Git version controlnbgv- Nerdbank.GitVersioning CLI toolgh(optional) - GitHub CLI for creating releases directly
Install nbgv globally:
dotnet tool install -g nbgvInstall GitHub CLI (optional):
# See: https://github.com/cli/cli#installationPrepares a new release by updating the version number and generating release notes using Nerdbank.GitVersioning.
Usage:
./scripts/prepare-release.sh <version>Example:
./scripts/prepare-release.sh 0.14What it does:
- Uses
nbgv set-versionto updateversion.jsonwith the new version number - Generates release notes from commits in the dev branch since the last merge to main
- Saves release notes to
RELEASE_NOTES.md - Provides instructions for the next steps
Best practices:
- Run this script on the
devbranch after all features for the release are merged - Review the generated
RELEASE_NOTES.mdand edit if needed - Commit the changes before merging to main
Generates release notes from git commits since the last merge to main.
Usage:
./scripts/generate-release-notes.shThis script is automatically called by prepare-release.sh, but can also be run standalone to preview release notes.
What it does:
- Finds commits since the last merge to main
- Categorizes commits by type (features, bug fixes, documentation, etc.)
- Lists all contributors
- Outputs formatted release notes to stdout
Creates a git tag and publishes the release using Nerdbank.GitVersioning.
Usage:
./scripts/publish-release.shExample:
./scripts/publish-release.shWhat it does:
- Validates that you're on the
mainbranch - Reads the version from
version.json - Uses
nbgv tagto create a git tag based on the current version - Pushes the tag to GitHub
- Provides instructions for creating a GitHub release
Important:
- This script must be run on the
mainbranch after merging dev - No version argument is needed - the version is determined from
version.json - The tag push will automatically trigger the NuGet package build and publish via GitHub Actions
Here's the complete workflow for releasing a new version using Nerdbank.GitVersioning:
-
Checkout the
devbranch:git checkout dev git pull origin dev
-
Run the prepare script:
./scripts/prepare-release.sh 0.14
-
Review the changes:
cat version.json cat RELEASE_NOTES.md
-
Edit
RELEASE_NOTES.mdif needed to add context or clean up commit messages -
Commit the changes:
git add version.json RELEASE_NOTES.md git commit -m "Prepare release v0.14" git push origin dev
- Create a pull request from
devtomainon GitHub - Wait for CI checks to pass
- Merge the pull request
-
Checkout and update
main:git checkout main git pull origin main
-
Run the publish script (no version argument needed):
./scripts/publish-release.sh
-
Create the GitHub release:
Option A: Using GitHub CLI
gh release create v0.14 --title "Release v0.14" --notes-file RELEASE_NOTES.mdOption B: Manually on GitHub
- Go to https://github.com/FritzAndFriends/BlazorWebFormsComponents/releases/new?tag=v0.14
- Copy the contents of
RELEASE_NOTES.mdinto the description - Click "Publish release"
- Check that the GitHub Actions workflow completed successfully
- Verify the NuGet package was published to GitHub Packages
- Check the Docker image was published (if applicable)
- Verify the live demo site was updated on Azure
To make release notes more useful, consider using conventional commit prefixes:
feat:orfeature:- New featuresfix:orbug:- Bug fixesdocs:ordocumentation:- Documentation changestest:ortests:- Test changesrefactor:- Code refactoringchore:orbuild:orci:- Build/CI maintenance
Example:
git commit -m "feat: Add DataGrid pagination support"
git commit -m "fix: Resolve TreeView node selection issue"
git commit -m "docs: Update GridView documentation with examples"Install Nerdbank.GitVersioning CLI:
dotnet tool install -g nbgvIf you need to re-create a tag:
git tag -d v0.14 # Delete locally
git push origin :v0.14 # Delete remotelyThis can happen in shallow clones. Try deepening the clone:
git fetch --unshallow