fsprojects / fsharp-language-server

Other
214 stars 37 forks source link

Can't use multiple ProjectReferences in a fsproj #79

Open PhilT opened 4 years ago

PhilT commented 4 years ago

I've also posted this issue with Ionide plugin https://github.com/ionide/Ionide-vim/issues/23 however it manifests in a slightly different way. Maybe the issue is further upstream but if there are any workarounds I'd love to hear about them. Also, I'd be happy to dig into the issue further if someone could point me in the right direction.

Maybe I'm doing something wrong but this repo builds fine with dotnet build but when in Neovim I get The namespace 'Dep2' is not defined, despite having included it in the project. Dep1 can be opened but not Dep2. I get the same issue when including Dep2 in Dep1 and then trying to reference Dep2 in main.

Screenshot 2020-03-27 11 38 29

Main project file:

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

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="Program.fs" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\dep1\dep1.fsproj" />
    <ProjectReference Include="..\dep2\dep2.fsproj" />
  </ItemGroup>

</Project>

Environment: