FS0039: The namespace 'Linq' is not defined

FS0039: The namespace 'Linq' is not defined

How can I get System.Xml.Ling Library?

I add it to my references and then code:

#r (System.Xml.Linq) but it did not work (see below).

How can I open/use a reference library?

open System.Xml.Linq

Program.fs(195,17): error FS0039: The namespace 'Linq' is not defined

I got it! But still regarding this library.

How the path on loadPart is defined? Can I change this path 9below on bold)?

let doc = loadPart(XDocument.Load(@"..\..\document2.xml").Root)
System.IO.FileNotFoundException: Could not find file 'C:\Users\dafonseca\AppData\note.xml'.
File name: 'C:\Users\dafonseca\AppData\note.xml'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
   at System.Xml.XmlTextReaderImpl.FinishInitUriString()
   at System.Xml.XmlTextReaderImpl..ctor(String uriStr, XmlReaderSettings settings, XmlParserContext context, XmlResolver uriResolver)
   at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
   at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings, XmlParserContext inputContext)
   at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
   at <StartupCode$FSI_0061>.$FSI_0061.main@() in C:\Users\dafonseca\Documents\Visual Studio 2012\Projects\Chapter07\Chapter07_FSharp\Program.fs:line 249
Stopped due to error

Use quote marks rather than parentheses to delimit the assembly name

> #r "System.Xml.Linq"
- open System.Xml.Linq
- ;;

--> Referenced 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Xml.Linq.dll'

Copyright © 2007-2012 www.chuibin.com Chuibin Copyright