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
Before opening our .sln files in Visual Studio or VS Code, you need to perform the following actions.
75
+
Before opening our .sln/.slnf files in Visual Studio or VS Code, you need to perform the following actions.
76
76
77
77
1. Executing the following on command-line:
78
78
79
79
```ps1
80
80
.\restore.cmd
81
81
```
82
82
83
-
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.
83
+
This will download the required tools and build the entire repository once. At that point, you should be able
84
+
to open the .sln file or one of the project specific .slnf files to work on the projects you care about.
84
85
85
-
> :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.
86
+
> :bulb: Pro tip: you will also want to run this command after pulling large sets of changes. On the master
87
+
> branch, we regularly update the versions of .NET Core SDK required to build the repo.
86
88
> You will need to restart Visual Studio every time we update the .NET Core SDK.
87
89
88
-
2. Use the `startvs.cmd` script to open Visual Studio .sln files. This script first sets the required environment variables.
90
+
2. Use the `startvs.cmd` script to open Visual Studio .sln/.slnf files. This script first sets the required
91
+
environment variables.
89
92
90
93
### Solution files
91
94
92
-
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.
93
-
Instead, we have many .sln files which include a sub-set of projects. These principles guide how we create and manage .sln files:
95
+
We have a single .sln file for all of ASP.NET Core, but most people don't work with it directly because Visual Studio
96
+
doesn't currently handle projects of this scale very well.
97
+
98
+
Instead, we have many Solution Filter (.slnf) files which include a sub-set of projects. See the Visual Studio
99
+
documentation [here](https://docs.microsoft.com/en-us/visualstudio/ide/filtered-solutions?view=vs-2019) for more
100
+
information about Solution Filters.
101
+
102
+
These principles guide how we create and manage .slnf files:
94
103
95
104
1. Solution files are not used by CI or command line build scripts. They are meant for use by developers only.
96
105
2. Solution files group together projects which are frequently edited at the same time.
97
-
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.
98
-
99
-
> :bulb: Pro tip: `dotnet new sln` and `dotnet sln` are one of the easiest ways to create and modify solutions.
106
+
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.
100
107
101
108
### Common error: CS0006
102
109
103
-
Opening solution files and building may produce an error code CS0006 with a message such
110
+
Opening solution filters and building may produce an error code CS0006 with a message such
104
111
105
112
> Error CS0006 Metadata file 'C:\src\aspnet\AspNetCore\artifacts\bin\Microsoft.AspNetCore.Metadata\Debug\netstandard2.0\Microsoft.AspNetCore.Metadata.dll' could not be found
106
113
107
-
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.
114
+
The cause of this problem is that the solution filter 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/slnf files to include the new project. In some cases, it is sometimes the intended behavior of the .slnf which has been crafted to only include a subset of projects.
108
115
109
-
#### You can fix this in one of two ways
116
+
#### You can fix this in one of three ways
110
117
111
118
1. Build the project on command line. In most cases, running `build.cmd` on command line solves this problem.
112
-
2. Update the solution to include the missing project. You can either do this one by one using `dotnet sln`
2. If the project is missing from the .sln file entirely, you can use `dotnet sln add` to add it, or else right click on the solution/folder in Visual Studio and choose Add->Existing Project, and adding it.
120
+
3. If it is present in the .sln, but not the .slnf, you can update the solution filter to include the missing project. You can either do this one by right-clicking on project in Visual Studio and choosing to load it's direct dependencies, and then saving. Alternatively, you can hand edit the .slnf file - it's a fairly simple json format.
117
121
118
122
### Common error: Unable to locate the .NET Core SDK
119
123
@@ -230,7 +234,7 @@ TargetOsName | The base runtime identifier to build for (win, linux,
230
234
After building ASP.NET Core from source, you will need to install and use your local version of ASP.NET Core.
231
235
See ["Artifacts"](./Artifacts.md) for more explanation of the different folders produced by a build.
232
236
233
-
Building installers does not run as part of `build.cmd` run without parameters, so you should opt-in for building them:
237
+
Building installers does not run as part of `build.cmd` run without parameters, so you should opt-in for building them:
0 commit comments