While building the C# project locally/CI server, I wanted to control the NuGet package reference in the ***.csproj*** file. If the developer is building a C# project on github ***master*** branch (locally/CI server) I would like to add RC build NuGet package reference otherwise PRE releases NuGet package reference. How to do this? Can someone please assist me?

Some thoughts like -

```
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net5.0</TargetFramework>
    <GitBranch>$(GitBranch.Trim())</GitBranch>
  </PropertyGroup>

  <ItemGroup>     
      <PackageReference Include="GitInfo" Version="2.2.0" />       
  </ItemGroup>

    <Choose>
        <When Condition="$(GitBranch) == 'master'">
            <ItemGroup>
                <PackageReference Include="Data.Account.Domain.Messaging" Version="1.0.0-rc*" IncludePrerelease="true" />
            </ItemGroup>
        </When>
        <Otherwise>
            <ItemGroup>
                <PackageReference Include="Data.Account.Domain.Messaging" Version="1.0.0-pre*" IncludePrerelease="true" />
            </ItemGroup>
        </Otherwise>
    </Choose>    
</Project>

```