Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document minimal VS installation for samples #794

Merged
merged 3 commits into from
Mar 11, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 33 additions & 5 deletions samples/prerequisites.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,51 @@
If you're new to .NET make sure to visit the [official starting page](http://dotnet.github.io). It will guide you through installing pre-requisites and building your first app.
If you're new to .NET, make sure to visit the [official starting page](http://dotnet.github.io). It will guide you through installing pre-requisites and building your first app.
If you're already familiar with .NET make sure you've [downloaded and installed the .NET 5 SDK](https://www.microsoft.com/net/download/core).

The following pre-requisites need to be installed for building .NET 5 projects with CoreRT:
The following pre-requisites need to be installed for building .NET 5 projects with CoreRT.

# Windows

* Install [Visual Studio 2019](https://visualstudio.microsoft.com/vs/community/), including Visual C++ support.
## Install [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) with Visual C++ Build Tools

The free [Community](https://visualstudio.microsoft.com/vs/community/) edition or higher is recommended.
If you wish to save disk space and do not need Visual Studio IDE, here is the minimal [Build Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019)
AntonLapounov marked this conversation as resolved.
Show resolved Hide resolved
edition installation required. First download the [bootstrapper](https://aka.ms/vs/16/release/vs_buildtools.exe) executable.
On Windows 10 version 1803 or later you may use the `curl` tool:

```cmd
curl -L https://aka.ms/vs/16/release/vs_buildtools.exe -o vs_buildtools.exe
```

Then launch the bootstrapper passing the installation path and the two required components (requires elevation):
```cmd
vs_buildtools.exe --installPath C:\VS2019 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 Microsoft.VisualStudio.Component.Windows10SDK.19041 --passive --norestart --nocache --lang en-US
AntonLapounov marked this conversation as resolved.
Show resolved Hide resolved
```
Alternatively you may launch the bootstrapper without any options and use Visual Studio Installer UI to enable "C++ x64/x86 build tools" and "Windows 10 SDK" individual components.

Notes:
- You may skip the `Windows10SDK` component if you already have Windows 10 SDK installed on your machine.
- To target Windows ARM64, you need to add the `Microsoft.VisualStudio.Component.VC.Tools.ARM64` ("C++ ARM64 build tools") component instead.
- The `--installPath` option affects Build Tools installation only. Visual Studio Installer is always installed into
the `%ProgramFiles(x86)%\Microsoft Visual Studio\Installer` directory.

## Install Visual C++ 2019 Redistributable Package
If you have no `vcruntime140.dll` library installed in your `%SystemRoot%\System32` directory, you also need to install Visual C++ 2019 Redistributable package, which the compiler depends on:
AntonLapounov marked this conversation as resolved.
Show resolved Hide resolved
- [vc_redist.x64.exe](https://aka.ms/vs/16/release/vc_redist.x64.exe) (for x64 machine)
- [vc_redist.arm64.exe](https://aka.ms/vs/16/release/vc_redist.arm64.exe) (for ARM64 machine)

# Fedora (31+)

Tested on Fedora 31, will most likely work on lower versions, too.
* Install `clang` and developer packages for libraries that .NET Core depends on:

```sh
sudo dnf install clang zlib-devel krb5-libs krb5-devel ncurses-compat-libs
```

This was tested on Fedora 31, but will most likely work on lower versions too.

# Ubuntu (16.04+)

* Install clang and developer packages for libraries that .NET Core depends on.
* Install `clang` and developer packages for libraries that .NET Core depends on:

```sh
sudo apt-get install clang zlib1g-dev libkrb5-dev
Expand Down