ReferencePathWithRefAssemblies missing for CoreCompile during DesignTime builds in Ionide.ProjInfo #14250
Labels
Area-Build
Everything related to building F# compiler, tooling and VS extension.
Bug
Impact-High
(Internal MS Team use only) Describes an issue with extreme impact on existing code.
Milestone
馃憢 Hey there!
I've been running down the issue ionide/proj-info#171 with regard to getting
Ionide.ProjInfo
working on dotnet 7. After doing some updates, I was able to get it to load projects but when trying to typecheck files, Fsharp.Compiler.Service would give the error:Since
System.Array
is inSystem.Runtime.dll
I started looking at the difference in dlls thatProjInfo
findsWith a working version it finds in in the References
C:\\Program Files\\dotnet\\packs\\Microsoft.NETCore.App.Ref\\6.0.9\\ref\\net6.0\\System.Runtime.dll
With a nonworking version, it doesn't find find it in the references, and just looks it up viaC:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\Facades\System.Runtime.dll
.So after doing some binlog investigation I noticed that the FSCTask for the 7 branch was not outputting any reference files.
Working .net 6 version:
Not working dotnet 7 version:
There was a change recently #13567 that changed the
Inputs
of theCoreCompile
step to useReferencePathWithRefAssemblies
instead of the previousReferencePath
. Looking for where that pops up, I found over in the Roslyn targets, a shim for this:I added this to my local
Microsoft.FSharp.targets
file and it seems to resolve the issue.Screenshot of it working on dotnet 7
I discussed this with @vzarytovskii @baronfel on FSSF Slack. I can send a PR for this shim or if anyone knows of another way to get
ReferencePathWithRefAssemblies
set during DesignTime related build.Repro steps
Provide the steps required to reproduce the problem:
If possible attach a zip file with the repro case. This often makes it easier for others to reproduce.
The zip file should ideally represent the situation just before the call/step that is problematic.
Expected behavior
Provide a description of the expected behavior.
Actual behavior
Provide a description of the actual behaviour observed.
Known workarounds
Provide a description of any known workarounds.
Related information
Provide any related information (optional):
The text was updated successfully, but these errors were encountered: