-
Notifications
You must be signed in to change notification settings - Fork 545
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
Use DpiAwarenessContext.SystemAware when creating Tool Windows. #934
Conversation
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.
Added code to handle the issue looks good. I just have a couple of questions about some of the secondary changes.
@@ -66,11 +69,15 @@ | |||
<Reference Include="Microsoft.VisualStudio.Shell.Interop.11.0" /> | |||
<Reference Condition="'$(VisualStudioVersion)' != '11.0' AND '$(VisualStudioVersion)' != '12.0' AND '$(VisualStudioVersion)' != '14.0'" | |||
Include="Microsoft.VisualStudio.Shell.Interop.15.3.DesignTime" /> | |||
<Reference Condition="'$(VisualStudioVersion)' == '16.0'" Include="Microsoft.VisualStudio.Shell.Interop.14.0.DesignTime, Version=14.0.0.0"> |
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.
I am a bit surprised that we pull the 14.0 version of the assemblies for the 16.0 version of VS? Shouldn't the major version numbers match?
Also, is it ok to have Microsoft.VisualStudio.Shell.Interop.15.3.DesignTime (per the previous line) and Microsoft.VisualStudio.Shell.Interop.14.0.DesignTime added as references at the same time? It seems both conditions apply if the version of VS is 16.0.
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.
The 14.0 version is required in the fix published by the PMA team for this (which is specifically for 16.0 VS onwards). I agree that 15.3 and 14.0 is weird but does not appear to cause any problems and taking out 15.3 would require extensive re-testing.
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.
And note, 15.3 by itself did not work.
@@ -109,6 +110,7 @@ public ITextTemplatingSession CreateSession() | |||
return new TextTemplatingSession(); | |||
} | |||
|
|||
[SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")] |
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.
Curious, what object is disposable here? Engine? Asking because the warning may be flagging an actual bug in our code.
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.
Yes, Engine
. That code has been like that for multiple major versions - so it's stable and I'd rather not destabilize it while trying to fix this urgent issue. Plus we have many suppressions like this - so it's a more general task to go through the code and remove them.
Fix for internal bug 898367 and #788 - Model Browser not visible.
This only happens (for me) on some screens, and then only for some combinations of screen resolution and scale factor. It could be worked around by unchecking Tools -> Options -> Environment -> General -> Optimize rendering for screens with different pixel densities, but this fix should make that unnecessary.