F # code in the App_Code subfolder

I have a project with 2 subfolders in the App_code folder, one for VB and one for F # (C # files are in the root directory). I can easily access the VB classes (via the namespace), but not the F # file. Has anyone had such a problem and if so how did you fix it?

Application: F # code that is not in the App_Code folder works just fine. It is as if the compiler and IDE are not seeing the F # code, which is in a subfolder under the App_Code folder named FS_Code. I added a codeSubDirectories element

<codeSubDirectories>                
<add directoryName="VB_Code"/>
    <add directoryName="FS_Code"/>
</codeSubDirectories>

      

The VB code in the VB_Code subfolder compiles just fine.

0


source to share


6 answers


It has been a while since I asked this question, but I think it ended up with the F # compiler not in $ PATH (I installed it in a non-standard location).



0


source


Note that by default, if you do not declare a namespace or module, the top-level top-level code ends up in the module with the same name as the file name. See Part One

http://lorgonblog.spaces.live.com/blog/cns!701679AD17B6D310!444.entry



for details.

+1


source


Step 3: Profit!

Seriously, just placing the F # source file in App_Code won't do anything.

What preparation tasks did you do so that the F # code can be compiled by an ASP.NET application?

+1


source


+1


source


Open the actual generated assemblies via Reflector - see what the actual namespace is.

0


source


I believe that adding a <compiler ... /> config element for the F # language in web.config should help (see Brian's link) - however, I doubt you will see anything in C # IntelliSense. However, it is not clear to me how you can refer to code in one language from code in another ...

You can also check this link: http://shailkpatel.blogspot.com/2007/10/multiple-programming-languages-in.html

0


source







All Articles