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

.NET Core SDK preview4

Enrico Sada edited this page Jan 26, 2017 · 8 revisions

Use the simpler instructions but use --lang fsharp for dotnet new

F# works after install all supported os.

To check version, you can run

dotnet --version

and the output should be 1.0.0-preview4-004233

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

dotnet new -l fsharp
dotnet restore
dotnet run

To run an ASP.NET Core app, is the same, just use another template

dotnet new --lang fsharp -t web
dotnet restore
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
dotnet build
code .

Notes

Like preview3, this version is msbuild based

  • This version is based on msbuild (version 15.0) so .fsproj for project file
  • normal command (dotnet build, dotnet pack, etc) continue to work, but invoke the msbuild
  • use dotnet msbuild to run msbuild directly

Known issues

dotnet-migrate

dotnet migrate doesnt support F# yet:

error on build/pack using multiple frameworks (<TargetFrameworks>)

using <TargetFrameworks>net451;netcoreapp1.0</TargetFrameworks> the dotnet build/pack fails

  • WORKAROUND: pass runtime to build net451, for example -r win7-x64

using .NET Framework as targets framework, the osx/unix build fails

Use a .net framwork (not core) like <TargetFramework>net451</TargetFramework> (or in TargetFrameworks) the dotnet build/pack fails on osx/unix, instead on windows work

IDE Support

  • VS Code with F# Ionide extension: ok (build/run/intellisense), ko (debug)
  • VS 2017RC: no
  • Notepad and cli: from day 0 all dotnet sdk commands, ok (new,restore/build/run/pack/publish/test), ko (migrate)