I am attempting to add an an existing library variable set to an exiting project using the client api…and getting the following exception “OctopusValidationException”.
The code looks like this:
var endpoint = new OctopusServerEndpoint(server, apiKey);
var repository = new OctopusRepository(endpoint);
that did not solve the problem. The additional information for the OctopusValidationException is “The project must be assigned to a lifecycle”
The project IS assigned to a lifecycle….yet the error persists even after removing the strong typing as you suggest.
What version of Octopus are you running on your server?
What version of the Octopus.client do you have on your project?
Prior to 2.6, Octopus didn’t had Lifecycles, hence the Project resource didnt had a LifecycleID member. The error you are seeing makes me believe you are running a 2.6 server, but you are using an older version of the Octopus.client . Is if this is the case, updating the Octopus.client package on your solution should solve the problem
Are you running the exact same code of the Gist? I’ve updated the gist to print some properties, to make sure the Project has a valid lifecycle assigned to it. Please run the code just like it is on the gist and let me know the results