-
Notifications
You must be signed in to change notification settings - Fork 3
building and packaging
Every release ships four zip packages:
release_<version>_<Variant>_win-<arch>.zip
3.0.0 Dokan|WinFsp x64|arm64
| Package | Contents |
|---|---|
…_Dokan_win-x64.zip |
SimpleZipDrive.exe, 7z.dll, 7z_arm64.dll, ReadMe.md, LICENSE.txt, WhatsNew.md
|
…_Dokan_win-arm64.zip |
same layout |
…_WinFsp_win-x64.zip |
SimpleZipDrive_WinFsp.exe, winfsp-msil.dll, 7z.dll, 7z_arm64.dll, docs |
…_WinFsp_win-arm64.zip |
same layout |
All are framework-dependent single-file executables (~4–5 MB): the .NET Desktop Runtime and the filesystem driver are the only prerequisites.
Three workflows live in .github/workflows:
| Workflow | Trigger | What it does |
|---|---|---|
ci.yml |
Every push/PR to master
|
Restores, builds the solution in Release (analyzer-warning-clean), runs the full test suite, uploads the .trx results |
release.yml |
workflow_dispatch (version input) or a release_* tag push |
Verifies the csproj version matches, builds + tests, publishes and packages the four bundles, uploads them as the release-bundles artifact, then waits for approval in the protected release environment before creating/updating the GitHub release |
wiki-sync.yml |
Push to master touching docs/** (or manually) |
Mirrors docs/*.md into the repository wiki (index.md → Home.md) |
- Run Release from the Actions tab (or push a
release_x.y.ztag). - When the Build bundles job finishes, download the release-bundles artifact from the run summary — the four
release_<version>_<Variant>_win-<arch>.zipfiles plusrelease-notes.md. The run summary lists sizes and SHA256 checksums, and nothing is public yet. - Inspect the zips and smoke-test at least one packaged exe.
- Approve the waiting Publish release job in the
releaseenvironment (Settings → Environments →release→ required reviewer). The workflow then creates the GitHub release with the four bundles attached and the matchingWhatsNew.mdsection as the release notes.
If the bundles are wrong, do not approve: cancel the run, fix, and re-run.
First-time setup: the
releaseenvironment needs at least one required reviewer, and the wiki sync needs aWIKI_TOKENrepository secret (a PAT with repository access —GITHUB_TOKENcannot push to the wiki repository). Both are already configured for this repository.
scripts/package-release.ps1 performs the same publish/package steps locally:
.\scripts\package-release.ps1 -Version 3.0.0It runs the test suite first (pass -SkipTests to skip), publishes all four variant/RID combinations, and writes the bundles into SimpleZipDrive\bin\Release next to the historical releases. Existing files in that folder are never deleted; only the four bundles for the requested version are written (or overwritten).
Important: the
.csprojfiles contain<SelfContained>true</SelfContained>, but releases are built framework-dependent — the publish command must override it with--self-contained false. Publishing without the override produces huge self-contained bundles that also break the packaging assumptions documented below.
# Dokan variant
dotnet publish SimpleZipDrive\SimpleZipDrive.csproj -c Release -r win-x64 --self-contained false -o out\Dokan_x64
dotnet publish SimpleZipDrive\SimpleZipDrive.csproj -c Release -r win-arm64 --self-contained false -o out\Dokan_arm64
# WinFsp variant
dotnet publish SimpleZipDrive_WinFsp\SimpleZipDrive_WinFsp.csproj -c Release -r win-x64 --self-contained false -o out\WinFsp_x64
dotnet publish SimpleZipDrive_WinFsp\SimpleZipDrive_WinFsp.csproj -c Release -r win-arm64 --self-contained false -o out\WinFsp_arm64When packaging by hand, include only the single-file exe, the native runtime files from the publish root (7z.dll, 7z_arm64.dll, and winfsp-msil.dll for WinFsp), and ReadMe.md/LICENSE.txt/WhatsNew.md — not the package-provided x64\/x86\ 7z copies that also land in the publish output.
Three constraints make the file layout non-negotiable:
-
winfsp-msil.dllmust stay a real file beside the exe (WinFsp variant). Its static initializer (Fsp.Interop.Api.CheckVersion) callsFileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);Assembly.Locationis an empty string inside a single-file bundle, soPath.GetFullPath("")throws and every mount dies with "The path is empty (Parameter 'path')" before the driver is ever contacted. The csproj contains a target that runs before the bundler computes its file list:<Target Name="KeepWinFspInteropOutOfBundle" BeforeTargets="_ComputeFilesToBundle"> <ItemGroup> <ResolvedFileToPublish Update="@(ResolvedFileToPublish)" Condition="'%(ResolvedFileToPublish.Filename)%(ResolvedFileToPublish.Extension)' == 'winfsp-msil.dll'" ExcludeFromSingleFile="true" /> </ItemGroup> </Target>
Timing matters:
AfterTargets="ComputeFilesToPublish"/BeforeTargets="BundleFiles"do not work — the SDK splits bundled/non-bundled files in_ComputeFilesToBundle. -
7z.dll/7z_arm64.dllmust stay real files beside the exe (both variants).SevenZipFallbackprobesAppContext.BaseDirectoryfor the library matching the process architecture (SharpSevenZipBase.SetLibraryPath); bundling them into the exe makes the fallback silently unavailable. Both ship in every package so one zip works on x64 and ARM64. -
winfsp.net stays at 2.1.x (
2.1.25156). Interop 2.2.x rejects the stable native 2.1 driver ("incorrect dll version (need 2.2, have 2.1)"); interop 2.1 accepts both the 2.1 stable driver and 2.2+ betas. Version gates live inMountService(RequiredWinFspVersion = 2.1).
- Bump
<AssemblyVersion>/<FileVersion>to the new version in all five.csprojfiles (there is no explicit<Version>property;AssemblyVersiondrives the published version). - Update
WhatsNew.md(user-facing Added/Fixed/Changed/Internal sections) — the matching## <version>section becomes the GitHub release notes automatically. - Push to
master— the CI workflow must be green. - Run Release from the Actions tab with the version, or push a
release_<version>tag. The workflow verifies the csproj version, runs the tests again, and builds the four bundles. - Download the release-bundles artifact and review the zips before approving — the run summary lists sizes and SHA256 checksums.
- Smoke-test a downloaded bundle: mount a stored ZIP, a compressed archive, a
.zarcontainer, and an Xbox.iso/.csoimage through the packaged exe (both a drive letter and a folder; elevated and non-elevated for WinFsp). - Approve the Publish release job in the
releaseenvironment. The workflow creates the GitHub release with the four bundles attached (full release — not draft/prerelease). - Inform issue reporters whose bugs the release fixes.
Bundles can also be produced locally with scripts/package-release.ps1 -Version <version> and uploaded by hand with gh release create release_<version> --title "<version>" --notes-file … *.zip, but the Actions path is the supported one.
Deep Dives
Operations
Development
Resources