Error 9561 occurs while setting the NT Service Name.
Building a release is when the NT Service [Service Name] is set to start in an unsupported way.
This build error may be caused when the added service doesn't have valid start type.
To workaround the issue at this point, check the service you added. Any service should always have the proper properties like Path, Startup Account, Type, Error Control, Start Type, etc.