Ionide-vscode-fsharp: New .fsproj net core (RC4) project support

Created on 6 Mar 2017  路  3Comments  路  Source: ionide/ionide-vscode-fsharp

Since migrated from project.json to new .fsproj project file VS Code does not recognize namespaces any more, neither from project references nor nuget package references.

Here is my project file:

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

  <PropertyGroup>
    <AssemblyTitle>MyMq</AssemblyTitle>
    <Authors></Authors>
    <TargetFramework>netstandard1.6</TargetFramework>
    <DebugType>portable</DebugType>
    <AssemblyName>MyMq</AssemblyName>
    <Version>0.0.1-alpha</Version>
    <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="Mq.fs" />
    <Compile Include="MessageWrappers.fs" />
    <EmbeddedResource Include="**\*.resx" />
  </ItemGroup>

  <ItemGroup>
    <DotNetCliToolReference Include="dotnet-compile-fsc">
      <Version>1.0.0-preview2-020000</Version>
    </DotNetCliToolReference>
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="../MyLibrary/MyLibrary.fsproj" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="FSharp.NET.Sdk" Version="1.0.1" PrivateAssets="All" />
    <PackageReference Include="Microsoft.FSharp.Core.netcore" Version="1.0.0-rc-*" />
    <PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0" />
    <PackageReference Include="RawRabbit" Version="1.10.3" />
    <PackageReference Include="RawRabbit.vNext" Version="1.10.3" />
    <PackageReference Include="RawRabbit.Extensions" Version="1.10.3" />
  </ItemGroup>

</Project>

Most helpful comment

@draganjovanovic1 @the-fool please see wiki https://github.com/dotnet/netcorecli-fsc/wiki/.NET-Core-SDK-1.0.1#ide-support for a workaround (basically setting the previous fsharp.net.sdk version(

Also as a note, Microsoft.FSharp.Core.netcore is deprecated, use FSharp.Core version 4.1.* instead

All 3 comments

@draganjovanovic1 @the-fool please see wiki https://github.com/dotnet/netcorecli-fsc/wiki/.NET-Core-SDK-1.0.1#ide-support for a workaround (basically setting the previous fsharp.net.sdk version(

Also as a note, Microsoft.FSharp.Core.netcore is deprecated, use FSharp.Core version 4.1.* instead

This workaround crashes for me when I do dotnet build

                   Task "Exec" (TaskId:66)
                     Task Parameter:Command="/usr/local/share/dotnet/sdk/1.0.1/../../dotnet" compile-fsc "@/Users/nfloris/Project/src/pr/obj/Debug/netstandard1.6/dotnet-compile.rsp"  (TaskId:66)
                     "/usr/local/share/dotnet/sdk/1.0.1/../../dotnet" compile-fsc "@/Users/nfloris/Project/src/pr/obj/Debug/netstandard1.6/dotnet-compile.rsp"  (TaskId:66)
                     Version for package `dotnet-compile-fsc` could not be resolved. (TaskId:66)

Using the exact references from your link. dotnet restore works fine, it's just dotnet build that fails

We're working on supporting new format in ionide/FSAC repo. Closing it here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cloudRoutine picture cloudRoutine  路  5Comments

gsomix picture gsomix  路  6Comments

vasily-kirichenko picture vasily-kirichenko  路  6Comments

isaacabraham picture isaacabraham  路  5Comments

MangelMaxime picture MangelMaxime  路  4Comments