Skip to content

Commit 08e2ec0

Browse files
committed
Address feedback from review
1 parent c088914 commit 08e2ec0

File tree

1 file changed

+27
-15
lines changed

1 file changed

+27
-15
lines changed

docs/BuildFromSource.md

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ Building ASP.NET Core on Windows (10, version 1803 or newer) requires that you h
4242
Visual Studio 2019 (16.8) is required to build the repo locally. If you don't have visual studio installed you can run [eng/scripts/InstallVisualStudio.ps1](/eng/scripts/InstallVisualStudio.ps1) to install the exact required dependencies.
4343

4444
> :bulb: By default, the script will install Visual Studio Enterprise Edition, however you can use a different edition by passing the `-Edition` flag.
45-
> Even if you have installed Visual Studio, we still recommend using this script to install again to avoid errors due to missing components.
45+
> :bulb: To install Visual Studio from the preview channel, you can use the `-Channel` flag to set the channel (`-Channel Preview`).
46+
> :bulb: Even if you have installed Visual Studio, we still recommend using this script to install again to avoid errors due to missing components.
4647
4748
```ps1
4849
PS> ./eng/scripts/InstallVisualStudio.ps1 [-Edition {Enterprise|Community|Professional}] [-Channel {Release|Preview}]
@@ -52,9 +53,9 @@ PS> ./eng/scripts/InstallVisualStudio.ps1 [-Edition {Enterprise|Community|Profe
5253
> You can do so by running the `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser` command
5354
> in PowerShell. For more information on execution policies, you can read the [execution policy docs](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy).
5455
55-
If you already have Visual Studio installed, you can use the installation script above to ensure that you have the correct components installed.
56+
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.
5657

57-
The [global.json](/global.json) and [eng/scripts/vs.json](/eng/scripts/vs.json) provide a description of the components required to support building the repo.
58+
> :bulb: The `IntallVisualStudio.ps1` script mentioned above reads from the `vs.json` file to determine what components to install.
5859
5960
**[Git](https://git-scm.org)**
6061

@@ -72,7 +73,7 @@ NodeJS installes the Node package manager (npm) by default. This repo depends on
7273
npm install -g yarn
7374
```
7475

75-
**Java Development Kit**
76+
**Java Development Kit in Windows**
7677

7778
This repo contains some Java source code that depends on an install of the JDK v11 or newer. The JDK can be installed from either:
7879
* OpenJDK <https://jdk.java.net/>
@@ -90,7 +91,11 @@ The build should find any JDK 11 or newer installation on the machine as long as
9091

9192
**Chrome**
9293

93-
This repo contains a Selenium-based tests require a version of Chrome to be installed. Download and install it from <https://www.google.com/chrome>
94+
This repo contains a Selenium-based tests require a version of Chrome to be installed. Download and install it from <https://www.google.com/chrome>.
95+
96+
**Wix (Optional)**
97+
98+
If you plan on working with the Windows installers defined in [src/Installers/Windows](../src/Installers/Windows), you will need to install the Wix toolkit from https://wixtoolset.org/releases/.
9499

95100
### On macOS/Linux
96101

@@ -106,6 +111,8 @@ If netier utility is installed, you can install curl (https://curl.haxx.se) or w
106111

107112
**Git**
108113

114+
If you've made it this far, you've already got `Git` installed. Sit back, relax, and move on to the next requirement.
115+
109116
**[NodeJS](https://nodejs.org)**
110117

111118
Building the repo requires version 10.14.2 or newer of Node. You can find installation executables for Node at https://nodejs.org.
@@ -124,21 +131,23 @@ This repo contains some Java source code that depends on an install of the JDK v
124131
* OpenJDK <https://jdk.java.net/>
125132
* Oracle's JDK <https://www.oracle.com/technetwork/java/javase/downloads/index.html>
126133

127-
Similar to the instructions above for Windows, be sure that the the `JAVA_HOME` environment variable is set to the location of your Java installation.
134+
Similar to [the instructions above for Windows](#java-development-kit-in-windows), be sure that the the `JAVA_HOME` environment variable is set to the location of your Java installation.
128135

129136
## Step 3: Build the repo
130137

131138
Before opening our .sln/.slnf files in Visual Studio or VS Code, you will need to build the repo locally.
132139

133140
### In Visual Studio
134141

135-
To build a version of the repo locally, you'll need to execute the following command.
142+
To set up your project for development on Visual Studio, you'll need to execute the following command.
136143

137144
```ps1
138145
PS1> .\restore.cmd
139146
```
140147

141-
This will download the required tools and build the entire repository once. At that point, you should be able
148+
> :bulb: If you happen to be working on macOS or Linux, you can use the `restore.sh` command.
149+
150+
This will download the required tools and restore all projects inside the repository. At that point, you should be able
142151
to open the .sln file or one of the project specific .slnf files to work on the projects you care about.
143152

144153
> :bulb: Pro tip: you will also want to run this command after pulling large sets of changes. On the master
@@ -160,6 +169,8 @@ PS1> cd src\Components
160169
PS1> .\startvs.cmd
161170
```
162171

172+
After opening the solution in Visual Studio, you can build/rebuild using the controls in Visual Studio.
173+
163174
#### A brief interlude on solution files
164175

165176
We have a single .sln file for all of ASP.NET Core, but most people don't work with it directly because Visual Studio
@@ -175,7 +186,6 @@ These principles guide how we create and manage .slnf files:
175186
2. Solution files group together projects which are frequently edited at the same time.
176187
3. Can't find a solution that has the projects you care about? Feel free to make a PR to add a new .slnf file.
177188

178-
179189
### In Visual Studio Code
180190

181191
Before opening the project in Visual Studio Code, you will need to make sure that you have built the project.
@@ -184,6 +194,8 @@ You can find more info on this in the "Building on command-line" section below.
184194
Using Visual Studio Code with this repo requires setting environment variables on command line first.
185195
Use these command to launch VS Code with the right settings.
186196

197+
> :bulb: Note that you'll need to launch Visual Studio Code from the command line in order to ensure that it picks up the environment variables. To learn more about the Visual Studio Code CLI, you can check out [the docs page](https://code.visualstudio.com/docs/editor/command-line).
198+
187199
On Windows (requires PowerShell):
188200

189201
```ps1
@@ -200,14 +212,14 @@ source activate.sh
200212
code .
201213
```
202214

203-
Note that if you are using the "Remote-WSL" extension in VSCode, the environment is not supplied
204-
to the process in WSL. You can workaround this by explicitly setting the environment variables
205-
in `~/.vscode-server/server-env-setup`.
206-
See https://code.visualstudio.com/docs/remote/wsl#_advanced-environment-setup-script for details.
215+
> :bulb: Note that if you are using the "Remote-WSL" extension in VSCode, the environment is not supplied
216+
> to the process in WSL. You can workaround this by explicitly setting the environment variables
217+
> in `~/.vscode-server/server-env-setup`.
218+
> See https://code.visualstudio.com/docs/remote/wsl#_advanced-environment-setup-script for details.
207219
208220
## Building on command-line
209221

210-
You can also build the entire project on command line with the `build.cmd`/`.sh` scripts.
222+
When developing in VS Code, you'll need to use the `build.cmd` or `build.sh` scripts in order to build the project. You can learn more about the command line options available, check out [the section below](using-dotnet-on-command-line-in-this-repo).
211223

212224
On Windows:
213225

@@ -266,7 +278,7 @@ On macOS/Linux:
266278
./build.sh --test
267279
```
268280

269-
> :bulb: If you're working on changes for a particular subset of the project, you might not want to execute the entire test suite. Instead, only run the tests within the subdirectory where changes were made.
281+
> :bulb: If you're working on changes for a particular subset of the project, you might not want to execute the entire test suite. Instead, only run the tests within the subdirectory where changes were made. This can be accomplished by passing the `projects` property like so: `.\build.cmd -test -projects .\src\Framework\test\Microsoft.AspNetCore.App.UnitTests.csproj`.
270282
271283
### Building a subset of the code
272284

0 commit comments

Comments
 (0)