Closed jgsogo closed 5 years ago
initially I was going to use MSBuild
tasks exposed from the vsix
to verify it's correctly installed
however, it turns out it's not something recommended per https://blogs.msdn.microsoft.com/visualstudio/2010/06/09/vsix-best-practices/:
Some extensions still need to be installed by MSI: for example some of your files might have to be in a specific, well-known loca
tion, you might have a component like an MSBuild task that VSIX install doesn’t support, you might need to use binding redirection – see more information here
as installation location isn't something we have control over, I think it's not the way to go.
however, it turns out there is a simpler way - just expose command line switch for devenv.exe
: https://docs.microsoft.com/en-us/visualstudio/extensibility/adding-command-line-switches?view=vs-2019
therefore, calling devenv.exe
without our own switch may trigger extension to be loaded, and we may verify that it's actually installed and loaded.
I'm really worried about the test line . "$devenv" /ConanVisualStudioVersion /?
. Sometimes it works and sometimes it doesn't print the version, so you get lots of false positives 😕
Besides that, I like the approach in three stages:
vsix
and run the testsPlease, @SSE4 , review paying extra attention. I think it is ready although I'm still worried with the false negatives
About the other comments, I prefer to leave them there for the future... This PR already contains enough noise
closes https://github.com/conan-io/conan-vs-extension/issues/96 closes https://github.com/conan-io/conan-vs-extension/issues/116
Playing with Appveyor we can create the extension in the first job using VS2019, upload the artifact and then get the artifact from the other jobs and install it in the corresponding VS version.
TODO: