Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In VS2017 V15.2 expression bodied properties let the extension crash the IDE #2

Closed
Dany-R opened this issue May 13, 2017 · 3 comments
Closed
Labels

Comments

@Dany-R
Copy link
Owner

Dany-R commented May 13, 2017

In VS2017 V15.2 (26430.6) and maybe other versions as well, the IDE crashes when trying to use this extension with code containing an expression bodied property like:
public string MyString3 => _myString3; or
public string MyString4 => "C# 6 \"expression body\" feature";.
This is due to EnvDTE CodeProperty.Getter as CodeElement not having implemented the StartPoint property, though this has been working in VS2017 before (VS2015 is OK).

Exception handling is missing to address such issues up to V1.5 Release 2 (Build 20) but nevertheless these string literals will be missing when addressed, because the extension needs the start and end points.

@Dany-R
Copy link
Owner Author

Dany-R commented May 23, 2017

Just fixed the crash in V1.5 Release 3 (Build 21) but still, the expression bodied properties will not be parsed as long as the StartPoint and EndPoint throw NotImplementedException.

@Dany-R
Copy link
Owner Author

Dany-R commented May 27, 2017

@Dany-R
Copy link
Owner Author

Dany-R commented Jun 30, 2017

Just worked around the issue by handling not only null references of getters but also exceptions when accessing the getter's StartPoint.
I just hope that eventually the expression bodied properties will see their CodeElement.StartPoint and EndPoint properties set, as before the getter and setter always have been null.

@Dany-R Dany-R closed this as completed Jun 30, 2017
@Dany-R Dany-R added the bug label Jun 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant