you need to explicitly reference the dll.

> #r "System.Configuration.dll";;

--> Referenced '/Library/Frameworks/Mono.framework/Versions/1.2.6/lib/mono/2.0/System.Configuration.dll'

> #light;;

> open System.Configuration;;

> let mc = ConfigurationManager.OpenMachineConfiguration();;

val mc : Configuration

By on 3/9/2008 7:51 PM ()

Thanks, that seems to have fixed that problem. Why does System.Configuration require that line, while others such as open System.Web.UI.WebControls did not?

I am now receiving another error that I cannot figure out.

The message is "syntax error." It is in a file that is generated when I try to build. It's about 500 lines long, so I'll just post the first bit; the error is on the "namespace ASP" line.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#light

. . .

#nowarn "49" // uppercase argument names
#nowarn "67" // this type test or downcast will always hold
#nowarn "66" // this upcast is unnecessary - the types are identical
#nowarn "58" // possible incorrect indentation..
#nowarn "57" // do not use create_DelegateEvent
#nowarn "51" // address-of operator can occur in the code

exception ReturnExceptiond9d3ec0ea951490bbd22cdfffc4efb2f of obj
exception ReturnNoneExceptiond9d3ec0ea951490bbd22cdfffc4efb2f


namespace ASP
    #nowarn "49" // uppercase argument names
    #nowarn "67" // this type test or downcast will always hold
    #nowarn "66" // this upcast is unnecessary - the types are identical
    #nowarn "58" // possible incorrect indentation..
    #nowarn "57" // do not use create_DelegateEvent
    #nowarn "51" // address-of operator can occur in the code
    open 
    open System.Web.Security
    open System.Web
    open System.Web.SessionState
    open System.Text
    open System.Web.UI.WebControls
    open System.Web.Profile
    open System.Collections
    open System.Web.UI.WebControls.WebParts
    open System.Configuration
    open System
    open ASP
    open System.Web.Caching
    open System.Web.UI
    open System.Collections.Specialized
    open System.Text.RegularExpressions
    open System.Web.UI.HtmlControls
    
    exception ReturnExceptiond9d3ec0ea951490bbd22cdfffc4efb2f of obj
    exception ReturnNoneExceptiond9d3ec0ea951490bbd22cdfffc4efb2f

. . .
By on 3/10/2008 4:26 PM ()

Hi,
I'm not sure whether this is enough information to find the problem, but if you want send me the generated file and I'll try to see what's wrong (I worked on the CodeDOM provider for F#, so I think I should be able to find the bug :-) ). My e-mail is tomas (at) tomasp (dot) net.

By on 3/10/2008 4:48 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper