-
Notifications
You must be signed in to change notification settings - Fork 65
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
A try to resolve the problem of COMException in DTE object #26
Conversation
@alanhamlett I decided to hold the solution name instead of trying to get it from DTE object every time. What do you think? |
@@ -240,8 +256,11 @@ private static void SettingsPopup() | |||
|
|||
private static string GetProjectName() | |||
{ | |||
var projectName = _objDte.Solution != null && !string.IsNullOrEmpty(_objDte.Solution.FullName) ? _objDte.Solution.FullName : null; | |||
return !string.IsNullOrEmpty(projectName) ? Path.GetFileNameWithoutExtension(projectName) : null; | |||
return !string.IsNullOrEmpty(_solutionName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This nested ternary is a little confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not confusing lol. First try to get solution name if it's null then get from DTE object.
A try to resolve the problem of COMException in DTE object
Thank you! I'm testing this now and will release a new version to the gallery today. |
Let's try it @alanhamlett |
You guys are awesome; thanks for fixing VS - one of our most important Priyanka Sharma On Fri, Jul 17, 2015 at 10:20 PM, Carlos Henrique Guardão Gandarez <
|
Accordingly to https://msdn.microsoft.com/en-us/library/ms228772(v=vs.110).aspx using DTE2 could fix this problem.
Another article https://msdn.microsoft.com/en-us/library/ee834473.aspx