Versioning C# projects with visual studio

47 views Asked by At

Recently I got assigned to a new project and now have to create a new version of said project.

Unfortunately I don't quite understand how this works in visual studio.

This is the structure in the solution:

All versions inside the solution

All of these project versions have the very same files inside. If something inside a file is changed, it is being changed for all versions! This for example is the 2018 version:

V2018 files

The same files are inside the 2020 version:

V2018 files

The name space for all projects seems to be the same (because they use the same files):

Namespace

Also each version seems to have their own .csproj file:

.csproj of each version

Version specific code is being controlled with preprocessor variables. Each project also has version specific dependencies.

I have no idea how to add a new version to this solution. I thought adding a new project via right clicking the folder Hosts and then clicking on "Add new project" would work but it creates a new project with an entirely new namespace in a different folder.

Does anyone have an idea how this works and how I could do the same for a 2024 version?

0

There are 0 answers