microsoft / VisualStudio-TestHost

Infrastructure for executing interactive UI tests in Visual Studio.
Apache License 2.0
43 stars 23 forks source link

Handle Microsoft.VisualStudio.ExtensibilityHosting.InvalidMEFCacheException #17

Open zooba opened 9 years ago

zooba commented 9 years ago

Visual Studio 2015 may throw Microsoft.VisualStudio.ExtensibilityHosting.InvalidMEFCacheException if the cache is invalid and needs to be regenerated.

We should handle this exception in the test adapter, restart VS and retry the test.

sharwell commented 9 years ago

The primary case where I've observed this is in the context of the bug which caused tunnelvisionlabs/InheritanceMargin#6. I'm hoping that particular issue will be resolved in Visual Studio 2015 Update 1. Are there other cases where this exception could be encountered, or would a resolution for that bug supersede this feature request?

zooba commented 9 years ago

Looks like that's probably it. I saw the message in some logs from our test runs and have dealt with enough MEF issues recently to just want to say "screw it, we'll do what it says to" :)

Though those tests were against one of the latest Update 1 builds, so it may not have been resolved...