Refactoring build/publish scripts to allow to build under the different ...

....NET framework versions