-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve visual studio detection (#2957)
Detect visual studio installation using the VSSetup module and Get-VSSetupInstance method. It works even in systems with the Constrained language mode of PowerShell.
- Loading branch information
Showing
8 changed files
with
1,517 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
235 changes: 235 additions & 0 deletions
235
test/fixtures/VSSetup_VS_2019_Professional_workload.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,235 @@ | ||
[ | ||
{ | ||
"InstanceId": "2619cf21", | ||
"InstallationName": "VisualStudio/16.11.33+34407.143", | ||
"InstallationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional", | ||
"InstallationVersion": { | ||
"Major": 16, | ||
"Minor": 11, | ||
"Build": 34407, | ||
"Revision": 143, | ||
"MajorRevision": 0, | ||
"MinorRevision": 143 | ||
}, | ||
"InstallDate": "\/Date(1706804943503)\/", | ||
"State": 4294967295, | ||
"DisplayName": "Visual Studio Professional 2019", | ||
"Description": "Professional IDE best suited to small teams", | ||
"ProductPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Common7\\IDE\\devenv.exe", | ||
"Product": { | ||
"Id": "Microsoft.VisualStudio.Product.Professional", | ||
"Version": { | ||
"Major": 16, | ||
"Minor": 11, | ||
"Build": 34407, | ||
"Revision": 143, | ||
"MajorRevision": 0, | ||
"MinorRevision": 143 | ||
}, | ||
"Chip": null, | ||
"Branch": null, | ||
"Type": "Product", | ||
"IsExtension": false, | ||
"UniqueId": "Microsoft.VisualStudio.Product.Professional,version=16.11.34407.143" | ||
}, | ||
"Packages": [ | ||
{ | ||
"Id": "Microsoft.VisualStudio.Product.Professional", | ||
"Version": "16.11.34407.143", | ||
"Chip": null, | ||
"Branch": null, | ||
"Type": "Product", | ||
"IsExtension": false, | ||
"UniqueId": "Microsoft.VisualStudio.Product.Professional,version=16.11.34407.143" | ||
}, | ||
{ | ||
"Id": "Microsoft.VisualStudio.Component.VC.14.29.16.10.ATL", | ||
"Version": "16.11.31314.313", | ||
"Chip": null, | ||
"Branch": null, | ||
"Type": "Component", | ||
"IsExtension": false, | ||
"UniqueId": "Microsoft.VisualStudio.Component.VC.14.29.16.10.ATL,version=16.11.31314.313" | ||
}, | ||
{ | ||
"Id": "Microsoft.VisualStudio.VC.MSBuild.X64.v142", | ||
"Version": "16.11.31503.54", | ||
"Chip": null, | ||
"Branch": null, | ||
"Type": "Vsix", | ||
"IsExtension": false, | ||
"UniqueId": "Microsoft.VisualStudio.VC.MSBuild.X64.v142,version=16.11.31503.54" | ||
}, | ||
{ | ||
"Id": "Microsoft.VisualStudio.VC.MSBuild.X64", | ||
"Version": "16.11.31503.54", | ||
"Chip": null, | ||
"Branch": null, | ||
"Type": "Vsix", | ||
"IsExtension": false, | ||
"UniqueId": "Microsoft.VisualStudio.VC.MSBuild.X64,version=16.11.31503.54" | ||
}, | ||
{ | ||
"Id": "Microsoft.VisualStudio.VC.MSBuild.x86.v142", | ||
"Version": "16.11.31503.54", | ||
"Chip": null, | ||
"Branch": null, | ||
"Type": "Vsix", | ||
"IsExtension": false, | ||
"UniqueId": "Microsoft.VisualStudio.VC.MSBuild.x86.v142,version=16.11.31503.54" | ||
}, | ||
{ | ||
"Id": "Microsoft.VisualStudio.VC.MSBuild.X86", | ||
"Version": "16.11.31503.54", | ||
"Chip": null, | ||
"Branch": null, | ||
"Type": "Vsix", | ||
"IsExtension": false, | ||
"UniqueId": "Microsoft.VisualStudio.VC.MSBuild.X86,version=16.11.31503.54" | ||
}, | ||
{ | ||
"Id": "Microsoft.VisualStudio.VC.MSBuild.Base", | ||
"Version": "16.11.31829.152", | ||
"Chip": null, | ||
"Branch": null, | ||
"Type": "Vsix", | ||
"IsExtension": false, | ||
"UniqueId": "Microsoft.VisualStudio.VC.MSBuild.Base,version=16.11.31829.152" | ||
}, | ||
{ | ||
"Id": "Microsoft.VisualStudio.VC.MSBuild.Base.Resources", | ||
"Version": "16.11.31829.152", | ||
"Chip": null, | ||
"Branch": null, | ||
"Type": "Vsix", | ||
"IsExtension": false, | ||
"UniqueId": "Microsoft.VisualStudio.VC.MSBuild.Base.Resources,version=16.11.31829.152,language=en-US" | ||
}, | ||
{ | ||
"Id": "Microsoft.VisualStudio.Branding.Professional", | ||
"Version": "16.11.31605.320", | ||
"Chip": null, | ||
"Branch": null, | ||
"Type": "Vsix", | ||
"IsExtension": false, | ||
"UniqueId": "Microsoft.VisualStudio.Branding.Professional,version=16.11.31605.320,language=en-US" | ||
}, | ||
{ | ||
"Id": "Microsoft.VisualStudio.Component.Windows10SDK.19041", | ||
"Version": "16.10.31205.252", | ||
"Chip": null, | ||
"Branch": null, | ||
"Type": "Component", | ||
"IsExtension": false, | ||
"UniqueId": "Microsoft.VisualStudio.Component.Windows10SDK.19041,version=16.10.31205.252" | ||
}, | ||
{ | ||
"Id": "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", | ||
"Version": "16.11.32406.258", | ||
"Chip": null, | ||
"Branch": null, | ||
"Type": "Component", | ||
"IsExtension": false, | ||
"UniqueId": "Microsoft.VisualStudio.Component.VC.Tools.x86.x64,version=16.11.32406.258" | ||
} | ||
], | ||
"Properties": [ | ||
{ | ||
"Key": "CampaignId", | ||
"Value": "09" | ||
}, | ||
{ | ||
"Key": "SetupEngineFilePath", | ||
"Value": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\setup.exe" | ||
}, | ||
{ | ||
"Key": "Nickname", | ||
"Value": "" | ||
}, | ||
{ | ||
"Key": "ChannelManifestId", | ||
"Value": "VisualStudio.16.Release/16.11.33+34407.143" | ||
} | ||
], | ||
"Errors": null, | ||
"EnginePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service", | ||
"IsComplete": true, | ||
"IsLaunchable": true, | ||
"CatalogInfo": [ | ||
{ | ||
"Key": "Id", | ||
"Value": "VisualStudio/16.11.33+34407.143" | ||
}, | ||
{ | ||
"Key": "BuildBranch", | ||
"Value": "d16.11" | ||
}, | ||
{ | ||
"Key": "BuildVersion", | ||
"Value": "16.11.34407.143" | ||
}, | ||
{ | ||
"Key": "LocalBuild", | ||
"Value": "build-lab" | ||
}, | ||
{ | ||
"Key": "ManifestName", | ||
"Value": "VisualStudio" | ||
}, | ||
{ | ||
"Key": "ManifestType", | ||
"Value": "installer" | ||
}, | ||
{ | ||
"Key": "ProductDisplayVersion", | ||
"Value": "16.11.33" | ||
}, | ||
{ | ||
"Key": "ProductLine", | ||
"Value": "Dev16" | ||
}, | ||
{ | ||
"Key": "ProductLineVersion", | ||
"Value": "2019" | ||
}, | ||
{ | ||
"Key": "ProductMilestone", | ||
"Value": "RTW" | ||
}, | ||
{ | ||
"Key": "ProductMilestoneIsPreRelease", | ||
"Value": "False" | ||
}, | ||
{ | ||
"Key": "ProductName", | ||
"Value": "Visual Studio" | ||
}, | ||
{ | ||
"Key": "ProductPatchVersion", | ||
"Value": "33" | ||
}, | ||
{ | ||
"Key": "ProductPreReleaseMilestoneSuffix", | ||
"Value": "1.0" | ||
}, | ||
{ | ||
"Key": "ProductSemanticVersion", | ||
"Value": "16.11.33+34407.143" | ||
}, | ||
{ | ||
"Key": "RequiredEngineVersion", | ||
"Value": "2.11.72.18200" | ||
} | ||
], | ||
"IsPrerelease": false, | ||
"PSPath": "Microsoft.PowerShell.Core\\FileSystem::C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise", | ||
"UpdateDate": "2024-01-09T19:19:11.0115234Z", | ||
"ResolvedInstallationPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise", | ||
"ChannelId": "VisualStudio.17.Release", | ||
"InstalledChannelId": "VisualStudio.17.Release", | ||
"ChannelUri": "https://aka.ms/vs/17/release/channel", | ||
"InstalledChannelUri": "https://aka.ms/vs/17/release/channel", | ||
"ReleaseNotes": "https://docs.microsoft.com/en-us/visualstudio/releases/2022/release-notes-v17.8#17.8.4", | ||
"ThirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=661288" | ||
} | ||
] |
Oops, something went wrong.