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
* Revert "Revert "Improve components infrastructure (#12145)" (#12679)"
This reverts commit e2d57e2. The improvement to components infrastructure is now reinstated with the following changes:
* Check in release JS artifacts and use them as a fallback when it's not possible to build npmproj.
* Dont' build nodejs in source build.
Write-Warning"No default group of projects was specified, so building the 'managed' subsets of projects. Run ``build.cmd -help`` for more details."
186
+
Write-Warning"No default group of projects was specified, so building the 'managed' and its dependent subsets of projects. Run ``build.cmd -help`` for more details."
187
187
188
188
# This goal of this is to pick a sensible default for `build.cmd` with zero arguments.
189
189
# Now that we support subfolder invokations of build.cmd, we will be pushing to have build.cmd build everything (-all) by default
190
190
191
191
$BuildManaged=$true
192
192
}
193
193
194
+
if ($BuildManaged-or ($All-and (-not$NoBuildManaged))) {
195
+
if ((-not$BuildNodeJS) -and (-not$NoBuildNodeJS)) {
Write-Host-f Magenta "Building of C# project is enabled and has dependencies on NodeJS projects. Building of NodeJS projects is enabled since node is detected in $nodeHome."
201
+
}
202
+
else {
203
+
Write-Host-f Magenta "Building of NodeJS projects is disabled since node is not detected on Path and no BuildNodeJs or NoBuildNodeJs setting is set explicitly."
204
+
$NoBuildNodeJS=$true
205
+
}
206
+
}
207
+
208
+
if ($NoBuildNodeJS){
209
+
Write-Warning"Some managed projects depend on NodeJS projects. Building NodeJS is disabled so the managed projects will fallback to using the output from previous builds. The output may not be correct or up to date."
210
+
}
211
+
}
212
+
194
213
if ($BuildInstallers) { $MSBuildArguments+="/p:BuildInstallers=true" }
195
214
if ($BuildManaged) { $MSBuildArguments+="/p:BuildManaged=true" }
196
215
if ($BuildNative) { $MSBuildArguments+="/p:BuildNative=true" }
# This goal of this is to pick a sensible default for `build.sh` with zero arguments.
215
215
# We believe the most common thing our contributors will work on is C#, so if no other build group was picked, build the C# projects.
216
-
__warn "No default group of projects was specified, so building the 'managed' subset of projects. Run ``build.sh --help`` for more details."
216
+
__warn "No default group of projects was specified, so building the 'managed' and its dependent subset of projects. Run ``build.sh --help`` for more details."
__warn "Building of C# project is enabled and has dependencies on NodeJS projects. Building of NodeJS projects is enabled since node is detected on PATH."
228
+
else
229
+
__warn "Building of NodeJS projects is disabled since node is not detected on Path and no BuildNodeJs or NoBuildNodeJs setting is set explicitly."
230
+
build_nodejs=false
231
+
fi
232
+
fi
233
+
234
+
if [ "$build_nodejs"=false ];then
235
+
__warn "Some managed projects depend on NodeJS projects. Building NodeJS is disabled so the managed projects will fallback to using the output from previous builds. The output may not be correct or up to date."
236
+
fi
237
+
fi
238
+
224
239
# Only set these MSBuild properties if they were explicitly set by build parameters.
Copy file name to clipboardExpand all lines: docs/BuildFromSource.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,14 +97,14 @@ The cause of this problem is that the solution you are using does not include th
97
97
```
98
98
99
99
### Common error: Unable to locate the .NET Core SDK
100
-
100
+
101
101
Executing `.\restore.cmd` or `.\build.cmd` may produce these errors:
102
102
103
103
> error : Unable to locate the .NET Core SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed version.
104
104
> error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
105
105
106
106
In most cases, this is because the option _Use previews of the .NET Core SDK_ in VS2019 is not checked. Start Visual Studio, go to _Tools > Options_ and check _Use previews of the .NET Core SDK_ under _Environment > Preview Features_.
107
-
107
+
108
108
## Building with Visual Studio Code
109
109
110
110
Using Visual Studio Code with this repo requires setting environment variables on command line first.
@@ -138,6 +138,8 @@ On macOS/Linux:
138
138
./build.sh
139
139
```
140
140
141
+
By default, all of the C# projects are built. Some C# projects requires 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 /p:BuildNodeJs=false on the command line.
142
+
141
143
### Using `dotnet` on command line in this repo
142
144
143
145
Because we are using pre-release versions of .NET Core, you have to set a handful of environment variables
<ErrorText="Building *.npmproj but NodeJS was not detected on path. Ensure NodeJS is on path or disable building NodeJS projects with /p:BuildNodeJs=false. Skipping NodeJS projects will also skip managed projects depending on them, including Components, Mvc and Analysers."Condition="'$(ErrorCode)' != '0'"/>
We check in the Release / Production build of blazor.*.js, but not the Debug builds. Consequently the former is always available to embed, the latter is only available
58
-
if Web.JS was built locally. Use the Debug build when available and building in Debug configuration.
<BlazorServerJSFileCondition="'$(Configuration)' == 'Debug' AND Exists('..\..\Web.JS\dist\Debug\blazor.server.js')">..\..\Web.JS\dist\Debug\blazor.server.js</BlazorServerJSFile>
0 commit comments