sdk: F# vanilla project not compiling because of wrong version of Microsoft.NETCore.App on MacOS X
Steps to reproduce
Create new project with dotnet new --lang f#
Restore project with dotnet restore
Run project with dotnet run
Expected behavior
The project should build, run and output “Hello World”
Actual behavior
run fails the compilation after a lot of downgrade warning with the message:
Project fsharp_test (.NETCoreApp,Version=v1.0) will be compiled because expected outputs are missing
Compiling fsharp_test for .NETCoreApp,Version=v1.0
The specified framework ‘Microsoft.NETCore.App’, version ‘1.0.0-rc3-004459-00’ was not found.
- Check application dependencies and target a framework version installed at:
/usr/local/share/dotnet/shared/Microsoft.NETCore.App
- The following versions are installed: 1.0.0
- Alternatively, install the framework version ‘1.0.0-rc3-004459-00’.
Environment data
dotnet --info output:
.NET Command Line Tools (1.0.0-preview2-003121)
Product Information: Version: 1.0.0-preview2-003121 Commit SHA-1 hash: 1e9d529bc5
Runtime Environment: OS Name: Mac OS X OS Version: 10.11 OS Platform: Darwin RID: osx.10.11-x64
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17 (9 by maintainers)
Commits related to this issue
- Updated all references for .NET Core 1.0 RTM F# no longer compiles. Known issue: https://github.com/dotnet/cli/issues/3705 — committed to morrisonbrett/tesla by morrisonbrett 8 years ago
@forki Soon! We’re testing a solution right now.
@maestrow you can also use preview2.1 with a workaround.
See https://github.com/dotnet/netcorecli-fsc/wiki/.NET-Core-SDK-preview2.1#dotnet-new for more info
@forki i am really really focusing on msbuild based, finishing the WIP PR in vf# to finalize msbuild based f# with sdk.
But ihmo there are really good reason to use preview2 (LTS,xproj/project.json) not only for f# but for c# too.
If you already know/use dotnet core sdk, directly go msbuild based has some advantages for sure. But is not for new users Ihmo because is too bleeding edge
I originally installed the current release. Downloading & installing the LTS solved the problem.