When dynamically matching assemblies in .fsx using #I
and #r
, VS highlights the following types of imported types and writes: "The namespace or module" XXX "is not defined." This is normal?
For example, in the following code
#I @".\Tools\FAKE" #r "FakeLib.dll" open Fake Target "Hello" (fun _ -> trace "hello!") Run "Hello"
VS highlights Fake
and says, βThe namespace or the Fake module is not defined,β it also highlights Target
and Run
. I have this problem in VS 2010 SP1 and in VS 11 CTP. This problem makes writing F # scripts more difficult than it can be.
By the way, IntelliSence works well for "regular" types. FakeLib.dll
and FakeLib.xml
are present in the .\Tools\FAKE
directory. The code works well.
Update 1 Here is a screenshot of the situation. You can see that VS resolves the assembly FakeLib
correctly (in a tooltip), and that at the same time the Intellisense "sees" the standard types (tooltip on the Console
).

Update 2 I think that something is wrong with IntelliSense on my workstation, because it (IntelliSense) behaves rather strange. When I launch VS and open the .fsx file, IntelliSense refuses to allow even standard types / classes, and it does not emphasize Fake
classes, it does nothing. But after some period of time and some manipulation of the code, IntelliSense starts working for standard types and emphasizes Fake
types.
In addition, when I created the same code on my home workstation, there were no problems, IntelliSense works as it should.
source share