Describe the bug
After upgrading Verify.NUnit from version 31.7.1 to 31.7.2 (or higher), tests started failing with the following error:
System.Exception : Failed to compare files
----> System.TypeInitializationException : The type initializer for 'EmptyFiles.AllFiles' threw an exception.
----> System.Exception : Could not find empty files directory. Searched: ...
My CI/CD workflow builds the test project once and then runs the compiled binaries on a schedule, so building and running tests are separate jobs. The test project is built using the dotnet publish command.
After inspecting the published output, I noticed that the EmptyFiles directory is missing. Downgrading to 31.7.1 resolves the issue.
Minimal Repro
Run the following:
git clone https://github.com/VerifyTests/Verify.git
cd ./Verify/usages/NUnitNugetUsage/
dotnet publish ./NUnitNugetUsage.csproj -o ./out/
ls -dir ./out/EmptyFiles/
Notice that the EmptyFiles directory is missing when using 31.7.2 or newer.
Describe the bug
After upgrading
Verify.NUnitfrom version 31.7.1 to 31.7.2 (or higher), tests started failing with the following error:My CI/CD workflow builds the test project once and then runs the compiled binaries on a schedule, so building and running tests are separate jobs. The test project is built using the
dotnet publishcommand.After inspecting the published output, I noticed that the
EmptyFilesdirectory is missing. Downgrading to 31.7.1 resolves the issue.Minimal Repro
Run the following:
git clone https://github.com/VerifyTests/Verify.git cd ./Verify/usages/NUnitNugetUsage/ dotnet publish ./NUnitNugetUsage.csproj -o ./out/ ls -dir ./out/EmptyFiles/Notice that the
EmptyFilesdirectory is missing when using 31.7.2 or newer.