You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make it more clear that installation script use is optional (#18277)
Also address Markdown warnings in BuildFromSource.md
- surround bare URLs with angle brackets
- add languages to code blocks
- fix missing blank lines and style inconsistencies
Before opening our .sln files in Visual Studio or VS Code, you need to perform the following actions.
62
70
63
71
1. Executing the following on command-line:
64
-
```
72
+
73
+
```ps1
65
74
.\restore.cmd
66
75
```
76
+
67
77
This will download the required tools and build the entire repository once. At that point, you should be able to open .sln files to work on the projects you care about.
68
78
69
79
> :bulb: Pro tip: you will also want to run this command after pulling large sets of changes. On the master branch, we regularly update the versions of .NET Core SDK required to build the repo.
@@ -74,7 +84,7 @@ Before opening our .sln files in Visual Studio or VS Code, you need to perform t
74
84
### Solution files
75
85
76
86
We don't have a single .sln file for all of ASP.NET Core because Visual Studio doesn't currently handle projects of this scale.
77
-
Instead, we have many .sln files which include a sub-set of projects. These principles guide how we create and manage .slns:
87
+
Instead, we have many .sln files which include a sub-set of projects. These principles guide how we create and manage .sln files:
78
88
79
89
1. Solution files are not used by CI or command line build scripts. They are meant for use by developers only.
80
90
2. Solution files group together projects which are frequently edited at the same time.
@@ -90,10 +100,12 @@ Opening solution files and building may produce an error code CS0006 with a mess
90
100
91
101
The cause of this problem is that the solution you are using does not include the project that produces this .dll. This most often occurs after we have added new projects to the repo, but failed to update our .sln files to include the new project. In some cases, it is sometimes the intended behavior of the .sln which has been crafted to only include a subset of projects.
92
102
93
-
**You can fix this in one of two ways**
103
+
#### You can fix this in one of two ways
104
+
94
105
1. Build the project on command line. In most cases, running `build.cmd` on command line solves this problem.
95
106
2. Update the solution to include the missing project. You can either do this one by one using `dotnet sln`
@@ -112,6 +124,7 @@ Using Visual Studio Code with this repo requires setting environment variables o
112
124
Use these command to launch VS Code with the right settings.
113
125
114
126
On Windows (requires PowerShell):
127
+
115
128
```ps1
116
129
# The extra dot at the beginning is required to 'dot source' this file into the right scope.
117
130
@@ -120,7 +133,8 @@ code .
120
133
```
121
134
122
135
On macOS/Linux:
123
-
```
136
+
137
+
```bash
124
138
source activate.sh
125
139
code .
126
140
```
@@ -130,12 +144,14 @@ code .
130
144
You can also build the entire project on command line with the `build.cmd`/`.sh` scripts.
131
145
132
146
On Windows:
133
-
```
147
+
148
+
```ps1
134
149
.\build.cmd
135
150
```
136
151
137
152
On macOS/Linux:
138
-
```
153
+
154
+
```bash
139
155
./build.sh
140
156
```
141
157
@@ -155,6 +171,7 @@ On Windows (requires PowerShell):
155
171
```
156
172
157
173
On macOS/Linux:
174
+
158
175
```bash
159
176
source ./activate.sh
160
177
```
@@ -164,12 +181,14 @@ source ./activate.sh
164
181
Tests are not run by default. Use the `-test` option to run tests in addition to building.
165
182
166
183
On Windows:
167
-
```
184
+
185
+
```ps1
168
186
.\build.cmd -test
169
187
```
170
188
171
189
On macOS/Linux:
172
-
```
190
+
191
+
```bash
173
192
./build.sh --test
174
193
```
175
194
@@ -182,7 +201,8 @@ Furthermore, you can use flags on `build.cmd`/`.sh` to build subsets based on la
182
201
## Build properties
183
202
184
203
Additional properties can be added as an argument in the form `/property:$name=$value`, or `/p:$name=$value` for short. For example:
185
-
```
204
+
205
+
```ps1
186
206
.\build.cmd /p:Configuration=Release
187
207
```
188
208
@@ -199,8 +219,8 @@ TargetOsName | The base runtime identifier to build for (win, linux,
199
219
After building ASP.NET Core from source, you will need to install and use your local version of ASP.NET Core.
200
220
See ["Artifacts"](./Artifacts.md) for more explanation of the different folders produced by a build.
201
221
202
-
- Run the installers produced in `artifacts/installers/{Debug, Release}/` for your platform.
203
-
- Add a NuGet.Config to your project directory with the following content:
222
+
* Run the installers produced in `artifacts/installers/{Debug, Release}/` for your platform.
223
+
* Add a NuGet.Config to your project directory with the following content:
204
224
205
225
```xml
206
226
<?xml version="1.0" encoding="utf-8"?>
@@ -215,7 +235,8 @@ See ["Artifacts"](./Artifacts.md) for more explanation of the different folders
215
235
216
236
*NOTE: This NuGet.Config should be with your application unless you want nightly packages to potentially start being restored for other apps on the machine.*
217
237
218
-
- Update the versions on `PackageReference` items in your .csproj project file to point to the version from your local build.
238
+
* Update the versions on `PackageReference` items in your .csproj project file to point to the version from your local build.
0 commit comments