Skip to content

EmbeddedText/FsYacc/FsLex items in .NET SDK projects are not recognised  #4608

@dsyme

Description

@dsyme

The VS project system in 15.6/master seems to have a problem preparing correct arguments for new-style projects using EmbeddedText, FsLex, FsYacc items.

Compare these

            fcs\Fsharp.Compiler.Service.sln
            .\FSharp.sln

Both FSharp.Compiler.Service.fsproj (new stlye) and FSharp.Compiler.Private.fsproj (old style) has

<EmbeddedText Include="$(FSharpSourcesRoot)/fsharp/FSComp.txt">
  <Link>FSComp.txt</Link>
</EmbeddedText>

In an old-style project files the item appears:

image

In new-style project files the item is absent:

image

This seems to mean that the generated file does not get passed to FCS in Visual Studio. The same applies to files like pars.fs. The corresponding generated file does get passed when using command line msbuild:

msbuild C:\GitHub\dsyme\visualfsharp\fcs\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj

            … obj\Debug\netstandard2.0\FSComp.fs …

Compare these two similar scenarios:

  1. open src\FSharp.Compiler.Service.fsproj (new-style projects), edit src\fsharp\symbols\Symbols.fs

against

  1. open FSharp.sln (old-style projects), edit src\fsharp\symbols\Symbols.fs

The first takes 240seconds of CPU time to colorize. The second takes about 40 seconds (as expected).

It might be because the project is checked twice - one for netstandard2.0 and one for net45. But I thought that wasn't implemented. That would explain only half the difference, and colorization shouldn't be delayed.

There is also a difference in treatment of signature files which I will also investigate.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions