Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

.NET Core SDK preview2.1

Enrico Sada edited this page Feb 8, 2017 · 2 revisions

Use the simpler instructions but add --lang f# argument to dotnet new

NOTE The SDK contains the .net core runtime plus the dotnet sdk with command like dotnet build. That's usually what you want, not .NET Core runtime alone

NOTE The preview2.1 is the Current (long term support) with .NET Core 1.1 runtime.

Download binaries/installers for all os from https://www.microsoft.com/net/download/core/#/lts/current (ensure the Current and SDK are checked)

More info, in the tutorial https://docs.microsoft.com/en-us/dotnet/articles/fsharp/tutorials/getting-started/getting-started-command-line

F# works after install, but the dotnet-new templates are wrong, see Known issues for workarounds.

To check version, you can run

dotnet --version

and the output should be 1.0.0-preview2-1-003177

BECAUSE dotnet new template are wrong atm, the dotnet restore add a dev feed with the -f argument

An quickstart, to create a console app and run it:

dotnet new --lang fsharp
dotnet restore -f https://www.myget.org/F/netcorecli-fsc-preview2-1/api/v3/index.json
dotnet run

To use Visual Studio Code with Ionide with full intellisense,build,run (debug doesnt work) do dotnet build BEFORE opening the VSCode.

dotnet new -l fsharp -t lib
dotnet restore -f https://www.myget.org/F/netcorecli-fsc-preview2-1/api/v3/index.json
dotnet build
code .

Known issues

The f# app generated by dotnet new templates doesnt work OOTB, see [dotnet new issue](## dotnet-new) All other commands works ootb on all supported os by .NET Core Sdk (win, osx 10.11, ubuntu 14.04, docker, etc).

dotnet-new

ref https://github.com/dotnet/netcorecli-fsc/issues/42

The dotnet-compile-fsc package for preview2.1 (compatibile with .net core 1.1) is not released yet on nuget.org. So you need to use the dev feed https://www.myget.org/F/netcorecli-fsc-preview2-1/api/v3/index.json

That mean every restore you need to do

dotnet restore -f https://www.myget.org/F/netcorecli-fsc-preview2-1/api/v3/index.json

Or you can add a Nuget.config file in same directory of project.jon (or parent directory) with

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="netcorecli-fsc-preview2-1" value="https://www.myget.org/F/netcorecli-fsc-preview2-1/api/v3/index.json" />
  </packageSources>
</configuration>

IDE Support

  • VS Code with F# Ionide extension: ok (build/run/intellisense), ko (debug)
  • VS 2015 with .NET Core tools: ok adding an .xproj (build/run), ko (intellisense/debug)
  • Notepad and cli: from day 0 all dotnet sdk commands (ok restore/build/run/pack/publish/test, ko new)

Notes

The .NET Core Sdk 1.0.0-preview2.1 has multiple updated released version. Each version is a patch update, so can be safely upgraded.

From newer to older:

1.0.0-preview2-1-003177

The 1.0.0-preview2-1-003177 version (released on 2016-11-16 ).

All commands except dotnet new works correctly.

Known Bugs/Workarounds:

  • the dotnet new had wrong builtin templates for F#. As workaround see [dotnet new issue](## dotnet-new).