I am using the .net Octopus.Client nuget package v3.3.2 in a c# solution to pull all projects from a couple of projectgroups we have and display the latest versions deployed to our production environment. The issue in the code below is that the commented out code below throws an error (see attached image). This is using the octopusrepository class. if i use the octopusclient class as is done in the next line, i can get all the projects for the specified projectgroup. any ideas on what this error means? or is there a bug?
var projectGroup = projectGroups.FirstOrDefault(a => a.Name == "Websites");
//var projects1 = repository.ProjectGroups.GetProjects(projectGroup); //TODO: figure out why this doesnt work
var projects = client.Get<ResourceCollection<ProjectResource>>($"api/projectgroups/{projectGroup.Id}/projects").Items;