fsprojects / fsharp-language-server

Other
214 stars 37 forks source link

Error on cracking projects and load code lense #113

Open JohnnyFasching opened 1 year ago

JohnnyFasching commented 1 year ago

Describe the bug

Code lens and auto complete not working when loading F# projects

Failed to build xxx.fsproj: Object reference not set to an instance of an object.
   at ProjectCracker.parseProjectAssets(FileInfo projectAssetsJson) in /Users/george/Documents/fsharp-language-server/src/ProjectCracker/ProjectCracker.fs:line 197
   at ProjectCracker.crack(FileInfo fsproj) in /Users/george/Documents/fsharp-language-server/src/ProjectCracker/ProjectCracker.fs:line 559

xxx.fsproj: 
  ProjectFileName: "xxx"
  SourceFiles: [||]
  ReferencedProjects: []
  OtherOptions: [|"--noframework"|]
  LoadTime: 27/10/2022 09:31:23
  ExtraProjectInfo: <null>
  IsIncompleteTypeCheckEnvironment: false
  OriginalLoadReferences: []
  ExtraProjectInfo: <null>
  Stamp: <null>
  UnresolvedReferences: <null>
  UseScriptResolutionRules: false

Failed to create code lens because project options failed to load: [{ range = { start = { line = 0
                       character = 0 }
             end = { line = 0
                     character = 1 } }
   severity = Some Error
   code = None
   source = None
   message =
            "No .fsproj or .fsx file references c:\xxx\xxx.fs" }]

Machine info

faldor20 commented 1 year ago

Sorry this took so long. I don't really use f# day to day anymore so this hasn't been on my radar. Can you please ensure that you are using this version of the extension: https://marketplace.visualstudio.com/items?itemName=faldor20.fsharp-language-server-updated it should be version 0.1.82 or thereabouts

That said, at present I'm not sure what dotnet 7 support is like for this extension and I don't really have the time to sit down and update it if it's broken. For now, I would suggest using iondie if you have any issues with this extension