I compiled program on a PC with:
Currently installed "classic" .NET Versions in the system:
2.0.50727.4927 Service Pack 2
3.0.30729.4926 Service Pack 2
3.5.30729.4926 Service Pack 1
4.0.0.0
4.8.09032
And it worked good there.
But when I tried to run the program on pc with 4.0 and 4.8 it required to install .NET Framework 3.5 (Includes .NET 2.0 and 3.0).
Anyway I asked Claude 4.0 to convert the code to a powershell script and it worked at first attempt.