# dotnet-sdk

> Platform agnostic installation of .NET Core SDK 2.0.0

Latest version **1.3.2** (published 2017-09-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install dotnet-sdk
pnpm add dotnet-sdk
yarn add dotnet-sdk
bun add dotnet-sdk
```

Provides the commands `dotnet`, `dotnet-sdk`, `-dotnet-sdk`, `dotnet-sdk-2.0.0`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.2 |
| Published | 2017-09-26 |
| First published | 2017-09-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=6.4.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 1 |
| Maintainers | windowsazure |
| Keywords | dotnet, .NET, core, sdk, 2.0, 2.0.0, install |

## Links

- npm: https://www.npmjs.com/package/dotnet-sdk
- Repository: https://github.com/olydis/dotnet-sdk-2.0.0
- Homepage: https://github.com/olydis/dotnet-sdk-2.0.0#readme
- Issues: https://github.com/olydis/dotnet-sdk-2.0.0/issues
- npm.io page: https://npm.io/package/dotnet-sdk

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.3.2 (latest) — 2017-09-26
- 1.3.1 — 2017-09-26
- 1.3.0 — 2017-09-26

## README

<!--
    Note:
    - keep dotnet and dotnet-sdk documentation in sync
    - spots that differ are (to be) marked with COWBELL
-->

# .NET Core 2.0.0 SDK<!--COWBELL-->

This package installs the .NET Core 2.0 SDK<!--COWBELL--> for your platform and provides the `dotnet` executable.

No elevation required.

Partners with the [dotnet-2.0.0](https://www.npmjs.com/package/dotnet-2.0.0) (runtime)<!--COWBELL--> package.

Usable as a standalone but also for shipping .NET based packages:

## Scenario 1: Global Installation

To make the `dotnet` command available globally, run

``` Haskell seems to provide nice highlighting
npm i -g dotnet-2.0.0      // for running dotnet apps
npm i -g dotnet-sdk-2.0.0  // for developing dotnet apps
```

## Scenario 2: Dependency

When installed as a dependency of a package, the `dotnet` command will be available to that package's `scripts`.
This enables a very simple development and shipping experience for platform-independent .NET based applications.

### Example

The following `package.json` uses both the `dotnet-sdk-2.0.0` and `dotnet-2.0.0` in order to simplify both developing and shipping the package.

``` json
{
  "name": "contoso",
  "version": "1.33.7",
  "description": "Contoso C# app",
  "scripts": {
    "build": "dotnet build src/contoso.csproj",
    "test": "dotnet test src/contoso.test.csproj",
    "start": "dotnet bin/netcoreapp2.0/contoso.dll"
  },
  "devDependencies": {
    "dotnet-sdk-2.0.0": "*"
  },
  "dependencies": {
    "dotnet-2.0.0": "*"
  }
}
```

This allows consuming the `contoso` package easily as a *standalone* using

``` Haskell seems to provide nice highlighting
npx contoso
```

or when *installed* (e.g. as a dependency of another package) using

``` Haskell seems to provide nice highlighting
npm start
```

Unsurprisingly, during *development* the following commands will work:

``` Haskell seems to provide nice highlighting
npm run build
npm run test
```

## Technical Details

### Platform Independence

We created several *platform-specific* helper packages that actually provide the promised `dotnet` installation (e.g. `dotnet-sdk-2.0.0-win`).
Such packages exist for Windows, Linux and MacOS.
Here, we will merely determine the executing platform, acquire the corresponding package and populate `.bin` with scripts forwarding any calls to the actual binaries.

### Installation Location

The *platform-specific* package (see above) is installed in a *shared location* in order to reliably deduplicate it across installations.
By default, the installation location is `~/.net/2.0.0` since it is accessible without elevation.

---
_Source: https://npm.io/package/dotnet-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
