You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 shows A.fsproj using net6.0:
while OtherOptions section shows a reference to a net7.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
The text was updated successfully, but these errors were encountered:
safesparrow
changed the title
When some projects target net7.0, and their dependencies dual-target net6.0 and net7.0, cracking doesn't work
When some projects target net7.0, and their dependencies dual-target net6.0, net7.0, cracking doesn't work
Feb 18, 2024
I'm pretty sure this is a consequence of our 'first TFM wins' approach to ordering here. The minimal workaround would be to swap the order of TFMs in A.fsproj, but of course that won't work as a general solution.
A proper treatment would likely have to include us redoing our handling of multi-targeted projects - they don't really have a sensible default for OutputPath and other related properties - instead those properties should only ever be valid at a single-TFM level.
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
forA
, andnet7.0
forB
.B
's-r
arg points to anet7.0
ref assembly, butFSharpOptions
forA
usenet6.0
, so there is no match and reference isn't loaded by FCS.To Reproduce
Steps to reproduce the behaviour:
Giraffe.sln
using the following codeReferencedProjects
showsA.fsproj
usingnet6.0
:while
OtherOptions
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):
Ionide.ProjInfo.FCS
0.63.0The text was updated successfully, but these errors were encountered: