How can I use netcoreapp2.0 instead of netcoreapp1.0?
oscarvarto opened this issue · comments
Is it possible/easy?
All this is still pretty new and confusing to me: https://docs.microsoft.com/en-us/dotnet/standard/net-standard
See my attempts here:
dotnet/docs#3180
Do I even need netcoreapp1.0 installed if I want the example to run with mono?
In that case, what do I have to install from here? Everything?
https://github.com/dotnet/core/blob/master/release-notes/download-archives/1.0.5-download.md
EDIT:
I downloaded and installed the Runtime installer (64 bits) for mac osx. I also edited the example/example.fsproj
like this:
<Project Sdk="FSharp.NET.Sdk;Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.0;net462</TargetFrameworks>
<AssemblyName>Foobar</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FSharp.NET.Sdk" Version="1.0.*" PrivateAssets="All" />
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<PackageReference Include="Suave" Version="2.*"/>
<DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="1.0.0"/>
<DotNetCliToolReference Include="dotnet-mono" Version="0.1.6-alpha001"/>
</ItemGroup>
<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>
</Project>
It seems to be working...
Seems strange that I needed to install the 1.0.5 dotnetcore version (even if I "targeted" netcoreapp2.0)
Hmm, interesting. Thanks for bringing to to my attention. I'll have to do some research on how tools should support netstandard1.0 vs 2.0.
This should be solved with #15 .
Use the 0.2.0-alpha001
to test https://www.nuget.org/packages/dotnet-mono/0.2.0-alpha001
Just to clarify why this happened. Since the tool dotnet-mono
was targeting only netcoreapp1.0
when dotnet tried using it, it wasn't able to run even though your application was targeting a higher version. I'm guessing to run netcoreapp1.0
apps you'll need the 1.0.x
sdk.
Now dotnet-mono
targets both runtimes. Hopefully this works 😅