2

I use VSCode and Paket but don't understand how everything on the back-end connects to each other.

This morning I'm running into a problem in which my paket.dependencies file is correct yet when I try to open those libraries in a .FS file, I get compiler errors.

I've included a screen shot of the folder/directory structure as well as the Paket output for Paket: Install.

enter image description here

Any ideas what's causing the compiler error

The namesapce `TypeProviders` is not defined

in the RawData.fs file? The error for FSharp.Configuration is similar. I don't know why they're not available; they're both installed and in the Paket dependencies file and installed.

Steven
  • 3,238
  • 21
  • 50
  • I have not used VSCode with proj-files much (or at all in fact), but I would guess that the magic for adding the references in the proj-file (or some .json file if .net core or something) is not done. Yeah, I see that this hint at best gives you a pointer in a direction and are not immediately very helpful... So: Sorry ;-) But try to look at https://learn.microsoft.com/en-us/dotnet/articles/fsharp/tutorials/getting-started/getting-started-vscode, https://fsprojects.github.io/Paket/ and https://github.com/fsprojects/ProjectScaffold. These might help you somewhat more. – Helge Rene Urholm Oct 31 '16 at 14:06
  • Good pointers. I'm beginning to suspect that a recent upgrade of one of the components (Ionide-fsharp) may have something to do with this behavior. – Steven Oct 31 '16 at 14:17

1 Answers1

1

Can you check if the dlls exist in the packages directory as well? Then you should have the following in the .fsproj file at least for the libraries you are referencing.

   <Reference Include="FSharp.Configuration">
      <HintPath>..\packages\FSharp.Configuration.0.6.2\lib\net40\FSharp.Configuration.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="FSharp.Core">
      <HintPath>..\packages\FSharp.Core.3.1.2.5\lib\net40\FSharp.Core.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="FSharp.Data">
      <HintPath>..\packages\FSharp.Data\lib\net40\FSharp.Data.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="FSharp.Data.TypeProviders">
      <HintPath>..\packages\FSharp.Data.TypeProviders.5.0.0.2\lib\net40\FSharp.Data.TypeProviders.dll</HintPath>
      <Private>True</Private>
    </Reference>
s952163
  • 6,276
  • 4
  • 23
  • 47
  • The `.dll` files are all in the packages directory but not in the `.fsproj` file. That seems strange. I wonder if it may have had something to do with an upgrade to `Ionide-fsharp v2.8.9` this morning? This is the first time I've seen this behavior (i.e., downloading the packages but not updating the `.fsproj` file). – Steven Oct 31 '16 at 14:10
  • If I create a new project with Ionide v2.8.9 and use the same commands to install a new library from Nuget, the `.fsproj` file is updated correctly. However, it's not working after an upgrade in an existing project *to* v2.8.9. I'm not sure what to do other than open an issue on Iondide's github. – Steven Oct 31 '16 at 14:55
  • @steven if it can be reproduced that's a good idea. otherwise you might try using paket or forge from the command line. or just edit fsproj if it's a one off. – s952163 Oct 31 '16 at 14:59