Keep environment specific attributes in separate configuration files and build desired config on demand.
#addin nuget:?package=Cake.PickAndRoll&version=1.2.6
dotnet add package Cake.PickAndRoll --version 1.2.6
<PackageReference Include="Cake.PickAndRoll" Version="1.2.6" />