Don't try to use UIContexts if we are in a command line build
This code isn't new, but the use inside VisualStudioWorkspaceImpl.cs meant that we'd throw an exception when a project was added. This would get caught by the project system and converted back to an HRESULT. Customer reports claim this is a regression in newer builds, and I can't disagree with that but can't explain it. We have integration tests that test this, and on our CI right now they are passing. I similarly saw passing tests locally when I previously investigated this but am now seeing failing tests on newer dogfood builds. I also saw it fail once with a different error code or simply no error code; it leads me to believe that something environmental can cause either the HRESULT to be converted differently (as this is using IErrorInfo which is often the cause of spooky-action-at-a-distance) or something the project system is doing is swallowing the exception. It's unclear but the fix seems the same no matter what. Fixes https://developercommunity.visualstudio.com/content/problem/806929/command-line-builds-using-devenv-no-longer-work-fo.html
Showing
想要评论请 注册 或 登录