-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix Visual Studio install detection in release-tool.ps1 #10101
Conversation
Saw that this was fixed in another branch. I will close |
Will reopen for now, might be useful since the fix in the other branch involves manually installing a powershell module |
* Requires `Install-Module VSSetup -Scope CurrentUser` to be run before using the release tool. * The latest version of Visual Studio 2022 removes the ability to find itself with WIM (the previous method)
This is nuts, they changed it without any documentation (I'm not surprised it's microsoft...) |
Hmmm, I had referenced this article before, looks like they recently added the namespace flag. Yup it was added mid october: MicrosoftDocs/visualstudio-docs@46e97eb |
I'll have to sign the release script before merge, no need to merge develop into this |
`Get-CimInstance MSFT_VSInstance` does not always work as it uses the default namespace root/cimv2. Specifying `Get-CimInstance MSFT_VSInstance -Namespace root/cimv2/vs` allows it to work. I have included a try catch block to only explictly specify the namespace if the default command fails.
Removed try catch block, clearly the Get-CimInstance MSFT_VSInstance doesn't work
* Update release-tool.ps1 `Get-CimInstance MSFT_VSInstance` does not always work as it uses the default namespace root/cimv2. Specifying `Get-CimInstance MSFT_VSInstance -Namespace root/cimv2/vs` allows it to work. Co-authored-by: Jonathan White <[email protected]>
…ot#10101) * Update release-tool.ps1 `Get-CimInstance MSFT_VSInstance` does not always work as it uses the default namespace root/cimv2. Specifying `Get-CimInstance MSFT_VSInstance -Namespace root/cimv2/vs` allows it to work. Co-authored-by: Jonathan White <[email protected]>
Get-CimInstance MSFT_VSInstance
doesn't work for all Windows and Visual Studio installs as it uses the default namespaceroot/cimv2
.Get-CimInstance MSFT_VSInstance -Namespace root/cimv2/vs
should workScreenshots
Circled red is the
Get-CimInstance MSFT_VSInstance
command not workingCircled green is the
Get-CimInstance MSFT_VSInstance -Namespace root/cimv2/vs
command working.Testing strategy
The script ran successfully in powershell after the edits were made.
Type of change