how to create a usable MSBuild arcive to compile C# projects

64 Views Asked by At

I have to setup a (windows) build server for building classic C# Desktop applications. The problem is, that even historical versions of our software should be rebuild-able with the tools of their time. For example: If we update the Compiler, older versions of our software should still be able to be rebuilt with the old compiler while new ones use the new version.

My idea to solve this problem is to check-in in the Build Tools into its own repository and use this as a sub-project in our software repositories (currently using git). So by updating the compiler version of a project I just have to change the sub-module to a newer revision.

So no .NET SDK should be installed on the build server and my challenge is to collect all necessary tools to compile our C# project and make them run just without installation. But I can’t find something like a “portable SDK” and I have no idea what dependencies I have to solve. I think this task is a little more complicated than just copy msbuild.exe and csc.exe to a separate folder.

Has somebody experience with doing this or knows a good source of information about that? I was not able to find one.

0

There are 0 best solutions below