-
Notifications
You must be signed in to change notification settings - Fork 25
.NET Core SDK rc4
Links for installation:
- Directly for sdk installer or binaries (no VS, xplat) https://github.com/dotnet/core/blob/master/release-notes/rc4-download.md
- Or https://www.microsoft.com/net/download/core -> the Visual Studio 2017 Tools (RC) links.
Use the simpler instructions but use -lang f#
for dotnet new
The dotnet new
args are changed, see below
F# works after install all supported os.
Some fsproj examples for rc4
To check version, you can run
dotnet --version
and the output should be 1.0.0-rc4-004771
An quickstart, to create a console app and run it:
dotnet new console -lang f#
dotnet restore
dotnet run
To run an ASP.NET Core app, is the same, just use another template
dotnet new mvc -lang f#
dotnet restore
dotnet run
NOTE Ionide/VSCode doesnt support yet FSharp.NET.Sdk
version 1.0.0
NOTE See below in IDE Support
section how to fix that, using previous FSharp.NET.Sdk
To use Visual Studio Code with Ionide with full intellisense,build,run (debug doesnt work) do dotnet build
BEFORE opening the VSCode. You can also reload the language services by invoking the "Reload Window" command from the command palette by pressing F1
or Ctrl+Shift+P
and typing Reload Window
. Reloading the window can also help if the F# language services stall in VSCode for any reason.
dotnet new lib -lang f#
dotnet restore
dotnet build
code .
Like rc3
, 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
To help in converting from project.json
to .fsproj
, see this post for information about the equivalent options in each.
-
CHANGED
dotnet new
arguments
Is now based on https://github.com/dotnet/templating and cli args are changed a bit
See msdn blog post who contains info about dotnet new
For example:
- in rc3:
dotnet new -t console -l fsharp
(or-l fs
or-l f#
) - in rc4:
dotnet new console -lang f#
In rc4 argument is -lang f#
(no more alias like fsharp
or fs
)
Do dotnet new -lang f#
to show all template for F#.
Or dotnet new -l
for all templates (C# and F#)
dotnet migrate
doesnt support F# yet:
- WORKAROUND: see tutorial in How-to-migrate-preview2-projects-to-rc4
using <TargetFrameworks>net451;netcoreapp1.0</TargetFrameworks>
the dotnet build
/pack
fails. It's normal.
- WORKAROUND: pass runtime to build
net451
, for example-r win7-x64
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
-
WORKAROUND: see issue, if applicable
-
WORKAROUND (with mono installed): set
FrameworkPathOverride
environment variable to use .net framework assemblies installed by monoFind where
.../mono/4.5/mscorlib.dll
is on your machine and setFrameworkPathOverride
as an environment variable-
OSX (assuming mono install with xamarin studio):
export FrameworkPathOverride=/Library/Frameworks/Mono.framework/Versions/4.6.2/lib/mono/4.5/
-
OSX (assuming mono installed with brew):
export FrameworkPathOverride=/usr/local/Cellar/mono/4.6.2.16/lib/mono/4.5/
-
Debian:
export FrameworkPathOverride=/usr/lib/mono/4.5/
You can then build by specifying the target framework and runtime identifier (run will not work):
dotnet build -f net462 --runtime osx.10.11-x64
To know the runtime id, just do
dotnet --info
Or you can set theRuntimeIdentifier
environment variable like so:export RuntimeIdentifier=$(dotnet --info | grep "RID" | awk '{print $2}')
-
- VS Code with F# Ionide extension: ok (build/run/intellisense), ko (debug)
-
NOTE: doesnt work yet with
FSharp.NET.Sdk
version1.0.0
(version1.0.0-beta-*
resolve1.0.0
sigh) -
NOTE: require to use
FSharp.NET.Sdk
pin specific version1.0.0-beta-060000
anddotnet-compile-fsc
.<PackageReference Include="FSharp.NET.Sdk" Version="1.0.0-beta-060000" PrivateAssets="All" /> <DotNetCliToolReference Include="dotnet-compile-fsc" Version="1.0.0-preview2-020000" />
-
NOTE: the VSCode should be opened after the first
dotnet build
(ref ionide/ionide-vscode-fsharp#312 )
-
- VS 2017RC: no
- Notepad and cli: from day 0 all
dotnet
sdk commands, ok (new
,restore
/build
/run
/pack
/publish
/test
), ko (migrate
)
- Home
- Status
- FAQ
- Info-for-library-maintainers
- Current Stable (LTS) Version:
- Next Version (WIP):
- Previous Versions: