Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorCarl Sargunar <carl@sargunar.com>2021-10-04 18:57:04 +0300
committerGitHub <noreply@github.com>2021-10-04 18:57:04 +0300
commit101c5b09dc02b7408ae59d195ebf027cb743adbd (patch)
tree0f33ce189d3c9c6decfdcc08ca67867410518430 /docs
parent97030589b64256f8ef7ee0d832100b748b56beff (diff)
Suggested fix for Issue #37240 - Update documentation for the changes I needed to install Java using the scripts (#37241)
* Update BuildFromSource.md When following these steps, I noticed an error installing the JDK in the repo using the included script, so I had to follow these additional instructions to get past that. Source for the instructions : https://stackoverflow.com/questions/4037939/powershell-says-execution-of-scripts-is-disabled-on-this-system * Update BuildFromSource.md Additional step to temporarily set environmental variable * Update BuildFromSource.md Wrong markdown
Diffstat (limited to 'docs')
-rw-r--r--docs/BuildFromSource.md17
1 files changed, 16 insertions, 1 deletions
diff --git a/docs/BuildFromSource.md b/docs/BuildFromSource.md
index 1d5d7c14c6..3c8b5147b0 100644
--- a/docs/BuildFromSource.md
+++ b/docs/BuildFromSource.md
@@ -119,17 +119,32 @@ This repo contains some Java source code that depends on an install of the JDK v
- OpenJDK <https://jdk.java.net/>
- Oracle's JDK <https://www.oracle.com/technetwork/java/javase/downloads/index.html>
-Alternatively, you can run [eng/scripts/InstallJdk.ps1](/eng/scripts/InstallJdk.ps1) to install a version of the JDK that will only be used in this repo.
+Alternatively, you can run [eng/scripts/InstallJdk.ps1](/eng/scripts/InstallJdk.ps1) to install a version of the JDK that will only be used in this repo.
```powershell
./eng/scripts/InstallJdk.ps1
```
+NOTE : In order to execute the script you may need to set the right Execution policy. If not you may get an error that the script "cannot be loaded because the execution of scripts is disabled on this system". To get past that you can do the following. As an Administrator, you can set the execution policy by typing this into your PowerShell window:
+
+```powershell
+Set-ExecutionPolicy RemoteSigned
+```
+
+And when you are finished with the script return the execution policy.
+
+```powershell
+Set-ExecutionPolicy Restricted
+```
The build should find any JDK 11 or newer installation on the machine as long as the `JAVA_HOME` environment variable is set. Typically, your installation will do this automatically. However, if it is not set you can set the environment variable manually:
- Set `JAVA_HOME` to `RepoRoot/.tools/jdk/win-x64/` if you used the `InstallJdk.ps1` script.
- Set `JAVA_HOME` to `C:/Program Files/Java/jdk<version>/` if you installed the JDK globally.
+You can temporarily set your environmental variable for the scope of the active powershell session using the command
+
+- $env:JAVA_HOME = "C:/[RepoRoot]/.tools/jdk/win-x64/"
+
#### Chrome
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>.