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
* Workaround problems when opening solution files in Visual Studio (#4569)
Changes:
* Condense Routing.sln into HttpAbstractions.sln
* Workaround NU1105 by adding all ProjectReferences to the .sln
* Workaround exceptions in the ReferencesHostBridge by moving Reference items to a temporary item group
* Add a 'startvs.cmd' script for launching VS with the right env variables
* Remove RangeHelper test project
* Move RangeHelper tests into StaticFiles.Tests and add target for NPM restore
* Convert Session to use Reference and move to Middleware folder (#4576)
* Add RoutingSample.Web to HttpAbstractions.sln
Copy file name to clipboardExpand all lines: docs/BuildFromSource.md
+69-22Lines changed: 69 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,11 @@
1
1
Build ASP.NET Core from Source
2
2
==============================
3
3
4
-
Building ASP.NET Core from source allows you tweak and customize ASP.NET Core, and
5
-
to contribute your improvements back to the project.
4
+
Building ASP.NET Core from source allows you tweak and customize ASP.NET Core, and to contribute your improvements back to the project.
6
5
7
-
## :warning:Temporary instructions
6
+
:warning:We are currently in the middle of restructing our source code. These instructions will likely change rapidly during November and December 2018.
8
7
9
-
We are currently in the middle of restructing our repositories. While this work is being done, the following instructions will help you be more productive while working on this repo.
10
-
11
-
1. Before opening a solution, run `build.cmd /p:_ProjectsOnly=true /p:SkipTests=true`. This will only build the projects which have merged into this repo, not the git submodules.
12
-
2. Use (or create) a solution which is scoped to your project file. The build system does not use .sln files. These only exist for developer productivity in Visual Studio, so feel free to adjust the projects in .sln files to match your workload.
13
-
3. Questions? Contact @aspnet for help.
8
+
See https://github.com/aspnet/AspNetCore/labels/area-infrastructure for known issues and to track ongoing work.
This will download 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.
63
+
64
+
2. Use the `startvs.cmd` script to open Visual Studio .sln files. This script first sets required environment variables.
65
+
66
+
> :bulb: Pro tip: you will also want to run this command after pulling large sets of changes. Visual Studio will only build projects in a solution file, and makes a best effort to use other files on disk. If you pull many changes, the files on disk may be stale and will need to re-build.
67
+
68
+
### Solution files
69
+
70
+
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.
71
+
Instead, we have many .sln files which include a sub-set of projects. These principles guide how we create and manage .slns:
72
+
73
+
1. Solution files are not used by CI or command line build scripts. They are for meant for use by developers only.
74
+
2. Solution files group together projects which are frequently edited at the same time.
75
+
3. Can't find a solution that has the projects you care about? Feel free to make a PR to add a new .sln file.
76
+
77
+
> :bulb: Pro tip: `dotnet new sln` and `dotnet sln` are one of the easiest ways to create and modify solutions.
78
+
79
+
### Known issue: NU1105
80
+
81
+
Opening solution files may produce an error code NU1105 with a message such
82
+
83
+
> Unable to find project information for 'C:\src\AspNetCore\src\Hosting\Abstractions\src\Microsoft.AspNetCore.Hosting.Abstractions.csproj'. Inside Visual Studio, this may be because the project is unloaded or not part of current solution. Otherwise the project file may be invalid or missing targets required for restore.
84
+
85
+
This is a known issue in NuGet (<https://github.com/NuGet/Home/issues/5820>) and we are working with them for a solution. See also <https://github.com/aspnet/AspNetCore/issues/4183> to track progress on this.
86
+
87
+
**The workaround** for now is to add all projects to the solution.
This must come **before** any other installation of `dotnet`. In Windows, we recommend removing `C:\Program Files\dotnet` from PATH in system variables and adding `%USERPROFILE%\.dotnet\x64` to PATH in user variables.
On Windows, we recommend using the `startvs.cmd` command to launch Visual Studio.
77
116
78
117
## Building on command-line
79
118
@@ -89,6 +128,14 @@ On macOS/Linux:
89
128
./build.sh
90
129
```
91
130
131
+
### Building a subset of the code
132
+
133
+
This repository is large. Look for `build.cmd`/`.sh` scripts in subfolders. These scripts can be used to invoke build and test on a smaller set of projects.
134
+
135
+
#### Known issue: not every subfolder has a build.cmd script
136
+
137
+
We'll be adding more. See https://github.com/aspnet/AspNetCore/issues/4247.
138
+
92
139
#### Build properties
93
140
94
141
Additional properties can be added as an argument in the form `/property:$name=$value`, or `/p:$name=$value` for short. For example:
@@ -99,8 +146,8 @@ Additional properties can be added as an argument in the form `/property:$name=$
0 commit comments