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

How to migrate 1.0 projects to 2.0

Tomasz Sętkowski edited this page Aug 27, 2017 · 4 revisions

The FSharp.NET.Sdk used in sdk 1.0 was deprecated in favor of including the F# sdk needed inside Microsoft.NET.Sdk.

There are some little behaviour changes, see the Summary below, but not much developer side.

More info in the F# RFC FS-1032 Support for F# in the dotnet sdk

The dotnet new templates are up to date, can be used as examples for all templates.

Summary of changes from 1.0 to 2.0

These are not all changes of sdk 2.0, but only these specific for F#

  • FSharp.NET.Sdk is deprecated, just remove it
  • the fsc f# compiler used is not from FSharp.Compiler.Tools package but the fsc is bundled with the various sdk (vs/cli/mono)
  • FSharp.Core package is added implicit as version 4.2.*

About FSharp.Core v4.2 implicit used (more info in F# RFC FS-1034)

Changes in fsproj

The FSharp.NET.Sdk in Sdk and as PackageReference is not required anymore, and should be removed.

  1. remove FSharp.NET.Sdk from Sdk attribute of Project

    from

    <Project Sdk="FSharp.NET.Sdk;Microsoft.NET.Sdk">

    to

    <Project Sdk="Microsoft.NET.Sdk">
  2. remove the PackageReference

    <PackageReference Include="FSharp.NET.Sdk" Version="1.0.*" PrivateAssets="All" />

The FSharp.Core package is now added as implicit package. That mean, by default, exists an implict

<PackageReference Include="FSharp.Core" Version="4.2.*" />

Two options for migration:

  • or remove the exists PackageReference (by default of FSharp.Core 4.1.*) and use implicit 4.2.*
  • or disable the implicit add of 4.2.* and continue to use the previous specified version (as PackageReference or by Paket) by adding a property
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>