Skip to content

Commit

Permalink
[release/6.0] VS 17 installation (#45381)
Browse files Browse the repository at this point in the history
- backport of #38592

Co-authored-by: Pavel Savara <[email protected]>
  • Loading branch information
dougbu and pavelsavara authored Jan 4, 2023
1 parent be94d27 commit d9de61f
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 8 deletions.
14 changes: 7 additions & 7 deletions docs/BuildFromSource.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ Visual Studio 2019 (16.10 Preview 3) is required to build the repo locally. If y
> You can do so by running the `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser` command
> in PowerShell. For more information on execution policies, you can read the [execution policy docs](https://docs.microsoft.com/powershell/module/microsoft.powershell.security/set-executionpolicy).
The [global.json](/global.json) file specifies the minimum requirements needed to build using `msbuild`. The [eng/scripts/vs.json](/eng/scripts/vs.json) file provides a description of the components needed to build within VS. If you plan on developing in Visual Studio, you will need to have these components installed.
The [global.json](/global.json) file specifies the minimum requirements needed to build using `msbuild`. The [eng/scripts/vs.16.json](/eng/scripts/vs.16.json) file provides a description of the components needed to build within VS. If you plan on developing in Visual Studio, you will need to have these components installed.

> :bulb: The `InstallVisualStudio.ps1` script mentioned above reads from the `vs.json` file to determine what components to install.
> :bulb: The `InstallVisualStudio.ps1` script mentioned above reads from the `vs.16.json` file to determine what components to install.
#### [Git](https://git-scm.org) on Windows

Expand Down Expand Up @@ -284,7 +284,7 @@ To build a code change associated with a modification, run the build script in t
On Windows, you can run the command script:

```powershell
.\build.cmd
.\eng\build.cmd
```

On macOS/Linux, you can run the shell script:
Expand All @@ -293,7 +293,7 @@ On macOS/Linux, you can run the shell script:
./build.sh
```

> :bulb: Before using the `build.cmd` or `build.sh` at the top-level or in a subfolder, you will need to make sure that [the dependencies documented above](#step-2-install-pre-requisites) have been installed.
> :bulb: Before using the `.\eng\build.cmd` or `.\eng\build.sh` at the top-level or in a subfolder, you will need to make sure that [the dependencies documented above](#step-2-install-pre-requisites) have been installed.
By default, all of the C# projects are built. Some C# projects require NodeJS to be installed to compile JavaScript assets which are then checked in as source. If NodeJS is detected on the path, the NodeJS projects will be compiled as part of building C# projects. If NodeJS is not detected on the path, the JavaScript assets checked in previously will be used instead. To disable building NodeJS projects, specify `-noBuildNodeJS` or `--no-build-nodejs` on the command line.

Expand Down Expand Up @@ -369,9 +369,9 @@ See ["Artifacts"](./Artifacts.md) for more explanation of the different folders
Building installers does not run as part of `build.cmd` run without parameters, so you should opt-in for building them:

```powershell
.\build.cmd -all -pack -arch x64
.\build.cmd -all -pack -arch x86 -noBuildJava
.\build.cmd -buildInstallers
.\eng\build.cmd -all -pack -arch x64
.\eng\build.cmd -all -pack -arch x86 -noBuildJava
.\eng\build.cmd -buildInstallers
```

_Note_: Additional build steps listed above aren't necessary on Linux or macOS.
Expand Down
1 change: 0 additions & 1 deletion eng/scripts/InstallVisualStudio.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ if ("$Version" -eq "2019") {
}
if ("$Version" -eq "2022") {
$vsversion = 17;
$Channel = "Preview";
}
$channelUri = "https://aka.ms/vs/$vsversion/release"
$responseFileName = "vs.$vsversion"
Expand Down
25 changes: 25 additions & 0 deletions eng/scripts/vs.17.buildtools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"channelUri": "https://aka.ms/vs/17/release/channel",
"channelId": "VisualStudio.17.Release",
"includeRecommended": false,
"addProductLang": [
"en-US"
],
"add": [
"Microsoft.Net.Component.4.6.2.TargetingPack",
"Microsoft.Net.Component.4.7.2.SDK",
"Microsoft.Net.Component.4.7.2.TargetingPack",
"Microsoft.VisualStudio.Component.FSharp.MSBuild",
"Microsoft.VisualStudio.Component.NuGet",
"Microsoft.VisualStudio.Component.NuGet.BuildTools",
"Microsoft.VisualStudio.Component.VC.ATL",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.Windows10SDK.18362",
"Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools",
"Microsoft.VisualStudio.Workload.MSBuildTools",
"Microsoft.VisualStudio.Workload.NetCoreBuildTools",
"Microsoft.VisualStudio.Workload.VCTools",
"Microsoft.VisualStudio.Workload.VisualStudioExtensionBuildTools",
"Microsoft.VisualStudio.Workload.WebBuildTools"
]
}
20 changes: 20 additions & 0 deletions eng/scripts/vs.17.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"channelUri": "https://aka.ms/vs/17/release/channel",
"channelId": "VisualStudio.17.Release",
"includeRecommended": false,
"addProductLang": [
"en-US"
],
"add": [
"Microsoft.Net.Component.4.6.2.TargetingPack",
"Microsoft.Net.Component.4.7.2.SDK",
"Microsoft.Net.Component.4.7.2.TargetingPack",
"Microsoft.VisualStudio.Component.VC.ATL",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.Windows10SDK.18362",
"Microsoft.VisualStudio.Workload.ManagedDesktop",
"Microsoft.VisualStudio.Workload.NativeDesktop",
"Microsoft.VisualStudio.Workload.NetWeb",
"Microsoft.VisualStudio.Workload.VisualStudioExtension"
]
}

0 comments on commit d9de61f

Please sign in to comment.