Azure DevOps - conditional package restoration
问题 A solution that is built via Azure DevOps pipeline has some projects that use conditional package references such as: <Choose> <When Condition="'$(Configuration)'=='Debug'"> <ItemGroup> <PackageReference Include="Mock.MyPackage" Version="1.0.0" /> </ItemGroup> </When> <Otherwise> <ItemGroup> <PackageReference Include="MyPackage" Version="1.2.0" /> </ItemGroup> </Otherwise> </Choose> The package source is a private NuGet feed. The dotnet restore task does not respect the conditional package