0

After updating the NuGet Package of StackExchange.Redis latest 2.6.96

error CS1545: Property, indexer, or event 
'ConfigurationOptions.EndPoints' is not supported by the language; 
try directly calling accessor methods 
'ConfigurationOptions.get_EndPoints()' or 
'ConfigurationOptions.set_EndPoints(?)'
3

1 Answer 1

0

Workarround of the issue is using reflection like this:

var cofigurationOptions = new ConfigurationOptions();
var property = typeof(ConfigurationOtions).GetProperty("EndPoints"); // use only literal for property name, otherwise you will get the same error
var endPoints = property.GetValues(cofigurationOptions);

// manupulate with endPoints

In my case the reson of this issue is 'init' modificator for property ConfigurationOptions.EndPoint. I suppose that will be the reason of other issues with CS1545 compilation error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.