Open
Description
Describe the bug
Given a two-project setup:
A.fsproj
targetsnet6.0, net7.0
,B.fsproj
targetsnet7.0
and referencesA.fsproj
ProjInfo defaults to net6.0
for A
, and net7.0
for B
.
B
's -r
arg points to a net7.0
ref assembly, but FSharpOptions
for A
use net6.0
, so there is no match and reference isn't loaded by FCS.
To Reproduce
Steps to reproduce the behaviour:
- Checkout https://github.com/giraffe-fsharp/Giraffe
- Crack
Giraffe.sln
using the following code
open System
open System.IO
open Ionide.ProjInfo
let slnPath = @"c:\projekty\fsharp\samples\Giraffe\Giraffe.sln"
let slnDir = Path.GetDirectoryName(slnPath)
let toolsPath = Init.init (DirectoryInfo(slnDir)) None
let globalProps = [ "Configuration", "Debug" ]
let workspaceLoader = WorkspaceLoaderViaProjectGraph.Create(toolsPath, globalProps)
let projects = workspaceLoader.LoadSln(slnPath)
let fcsProjects = FCS.mapManyOptions projects |> Seq.toArray
- See in a debugger that the
ReferencedProjects
showsA.fsproj
usingnet6.0
:
whileOtherOptions
section shows a reference to anet7.0
ref dll.
This causes a mismatch and results in not loading the referenced project.
Expected behaviour
Project options should be internally consistent and allow for project references to be recognised by FCS.
Environment (please complete the following information):
- OS: Win11
- Ionide version:
Ionide.ProjInfo.FCS
0.63.0 - dotnet SDK version: 8.0.101
Metadata
Metadata
Assignees
Labels
No labels
Activity