Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET Core Sdk app/lib require a build before intellisense works #312

Closed
3 tasks
enricosada opened this issue Dec 16, 2016 · 6 comments
Closed
3 tasks

.NET Core Sdk app/lib require a build before intellisense works #312

enricosada opened this issue Dec 16, 2016 · 6 comments
Labels
enhancement Accepted suggestions that makes existing features better language services Problems related to language services - FSAC or FCS

Comments

@enricosada
Copy link
Contributor

Opening a new project, or cloned, or just restored, the intellisense doesnt work.

Affect projects created with the .NET Core Sdks:

  • project.json based (preview2, preview2.1)
  • msbuild based, so fsproj (preview3, preview4, ..)

Repro

dotnet new -l fsharp
dotnet restore
code .

Expected

Intellisense works

Actual

Intellisense doesnt work.

Workaround

Do a dotnet build BEFORE opening VS Code.

So the following works:

dotnet new -l fsharp
dotnet restore
dotnet build
code .

Why/TODO

That happen becauseFSAC read the response file generated after build to initialize FCS.
So no build, no response files.

Ideas for minor improvements /cc @Krzysztof-Cieslak @cloudRoutine for ideas

  • watch after build if the response file exists, and reload it ?
  • reinitialize FCS after build ?
  • watch the response file found, and reinitialize if changed?
@czifro
Copy link

czifro commented Dec 19, 2016

I figured I would comment here rather than xunit/xunit#859 since it seems more appropriate, but I upgraded dotnet core to preview4-004233 and did dotnet restore and dotnet build before opening vscode, but it still is showing errors where there is none, mainly references to packages or modules within the root namespace. Is there a step I am missing?

Additional Info:

VS Code Version => 1.8.1
Ionide-fsharp Version => 2.14.0
dotnet version => preview4-004233
OS => macOS Sierra 10.12.1

@enricosada
Copy link
Contributor Author

@czifro can you check your fsproj is similar to these generated by dotnet new -l fsharp ? Or can i see the proj?

@czifro
Copy link

czifro commented Dec 20, 2016

@enricosada
Copy link
Contributor Author

Problem is you are using an fsproj for preview3.
Please change it like preview dotnet new -l fsharp -t lib ( so Sdk attribute, no imports and use fsharp.net.sdk 1.0.0-beta-*)
I'll try to fix it tomorrow If you cannot

@czifro
Copy link

czifro commented Dec 20, 2016

That fixed it. Thank you!

@Krzysztof-Cieslak Krzysztof-Cieslak added enhancement Accepted suggestions that makes existing features better language services Problems related to language services - FSAC or FCS labels Dec 20, 2016
@enricosada
Copy link
Contributor Author

Done! fixed with 2.25.1

just dotnet restore is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Accepted suggestions that makes existing features better language services Problems related to language services - FSAC or FCS
Development

No branches or pull requests

3 participants