-
-
Notifications
You must be signed in to change notification settings - Fork 294
Description
Describe the bug
When opening workspaces with .fsx files open in VS Code I often get
The namespace or module 'packagename' is not defined
for packages referenced with
#r "nuget: packagename"
Running the Developer: Reload Window command from the Command Palette can make the error go away after one or more attempts.
I just noticed that having multiple (as little as two) different .fsx files open in split editor (both files visible at the same time) makes it much more frequent, to the point of one file/editor causing an error almost every time.
Not entirely sure I was seeing the same issue without split editor, I thought I was but it seems hard to reproduce so could be I'm just imagining.
Steps to reproduce
Create two .fsx files both referencing some nuget packages.
View: Split Editor command from Command Palette or keyboard shortcut
Arrange so both files are open/visible at the same time in the different halves of the editor.
Developer: Reload Window command from the Command Palette (or close and restart VS Code opening the same workspace)
On my machine one of the files will fail to resolve the dependency (almost?) every time.
Expected behavior
Dependencies resolving for script files upon starting VS Code (or reloading window) even if multiple editors and files are open.
Workaround
Make sure only one .fsx file is open and visible in workspace. Reload window until it works.
Machine infos
- Operating system: Windows_NT
- Arch: x64
- VSCode: 1.88.1
- UI Kind: Desktop
- Ionide: 7.18.2
- Runtime: netcore
- Dotnet version: 8.0.100
