Namespace F # FS0039 not defined

Here's the pic of the problem in VS2017:

WTF !!

The compiler throws:

FS0039 The namespace 'Web' is not defined.

But that was ok with the "Web" in the line before that!

Of course, I referenced System.Web.Mvc.dll. In fact, open links (and code) compile correctly if I put them in a specific file in the same project (in this case Global.asax.fs).


Update:

TL; DR; the problem mysteriously disappeared ...

After several recompilations, reboots and reboots, the problem still persists. Finally, I manually edited the file order in .fsproj (moving myfile.fs after Global.asax.fs) and compiled it! Then, to check, I moved the file order back to the original order ... and it still works!?!

, . - , , . , , ... ...

+4

Source: https://habr.com/ru/post/1678969/


All Articles