PowerShell module to interact with Visual Studio Setup
Перейти к файлу
Heath Stewart 296889a4f5 Merge pull request #8 from KindDragon/patch-1
Update README.md
2017-01-31 15:16:41 -08:00
.nuget Build PSGallery package with NuProj 2017-01-14 15:43:17 -08:00
inc Build PSGallery package with NuProj 2017-01-14 15:43:17 -08:00
src Add read-only Properties to Instance 2017-01-28 22:20:17 -08:00
test Run Remote Debugger in interactive shell 2017-01-29 02:04:18 -08:00
.gitattributes Add .gitignore and .gitattributes. 2017-01-12 10:30:45 -08:00
.gitignore Initial projects and configuration 2017-01-12 12:01:54 -08:00
CONTRIBUTING.md Run Remote Debugger in interactive shell 2017-01-29 02:04:18 -08:00
LICENSE.txt Initial projects and configuration 2017-01-12 12:01:54 -08:00
README.md Update README.md 2017-02-01 01:40:54 +03:00
VSSetup.PowerShell.sln Add CONTRIBUTING.md and clean up 2017-01-14 17:01:42 -08:00
appveyor.yml Treat warnings as errors during PR/CI builds 2017-01-23 10:10:08 -08:00
stylecop.json Initial projects and configuration 2017-01-12 12:01:54 -08:00
version.json Update version.json to set cloud buildversion 2017-01-14 15:55:56 -08:00

README.md

Visual Studio Setup PowerShell Module

This PowerShell module contains cmdlets to query instances of Visual Studio 2017 and newer. It also serves as a more useful sample of using the Setup Configuration APIs than the previously published samples though those also have samples using VB and VC++.

Installing

With Windows Management Framework 5.0 or newer (which installs PowerShell and comes with Windows 10), or PowerShellGet for PowerShell 3.0 or 4.0, you can download and install this module easily.

Install-Module VSSetup -Scope CurrentUser

To install for all users, pass AllUsers instead of CurrentUser, or just leave the -Scope parameter out of the command entirely.

You can also download the ZIP package from the Releases page on this project site and extract to a directory named VSSetup under a directory in your $env:PSMODULEPATH.

Expand-Archive VSSetup.zip "$([Environment]::GetFolderPath("MyDocuments"))\WindowsPowerShell\Modules\VSSetup"

Using

You can query all usable instances of Visual Studio and other products installed by the Visual Studio installer.

Get-VSSetupInstance

To get the instance for a specific installation directory, you can run the following.

Get-VSSetupInstance 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community'

If you want to select the latest instance that contains the .NET desktop development workload, you can pipe all instances - usable or not - to Select-VSSetupInstance that provides more fine grain control over which instances you enumerate.

Get-VSSetupInstance -All | Select-VSSetupInstance -Require 'Microsoft.VisualStudio.Workload.ManagedDesktop' -Latest

Feedback

To file issues or suggestions, please use the Issues page for this project on GitHub.

Status

This project uses a Git flow model releasing from the master branch with development based on and stabilize in the develop branch.

Branch Status
master build status: master
develop build status: develop