Compare commits

..
3 Commits
Author SHA1 Message Date
zhicheng233 58db98e2ba Update commands in README for vhdfix usage 2026-09-16 22:32:48 +08:00
zhicheng233 8bdb56eac0 Update dotnet.yml 2026-09-16 22:27:52 +08:00
zhicheng233 51675db394 Update dotnet.yml 2026-09-16 22:24:57 +08:00
2 changed files with 22 additions and 9 deletions
+20 -7
View File
@@ -1,5 +1,4 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
# This workflow will build and publish a .NET project
name: .NET
@@ -11,18 +10,32 @@ on:
jobs:
build:
runs-on: ubuntu-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
run: dotnet build src/VHDPatchFix/VHDPatchFix.csproj --no-restore --configuration Release
- name: Test
run: dotnet test --no-build --verbosity normal
run: dotnet test --no-build --configuration Release --verbosity normal
- name: Publish
run: dotnet publish src/VHDPatchFix/VHDPatchFix.csproj --configuration Release --runtime win-x64 --self-contained true --property PublishSingleFile=true --output ./publish
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: VHDPatchFix-win-x64
path: ./publish
if-no-files-found: error
+2 -2
View File
@@ -7,13 +7,13 @@
Preview a change without writing:
```powershell
dotnet run --project src\VHDPatchFix\VHDPatchFix.csproj -- --vhd "I:\B.vhd" --parent "I:\A.vhd" --dry-run
vhdfix --vhd "I:\B.vhd" --parent "I:\A.vhd" --dry-run
```
Patch the VHD and create the default `.bak` backup:
```powershell
dotnet run --project src\VHDPatchFix\VHDPatchFix.csproj -- --vhd "I:\B.vhd" --parent "I:\A.vhd"
vhdfix --vhd "I:\B.vhd" --parent "I:\A.vhd"
```
Verify after writing: