Is DataMapper a namespace? Can you share similar C# code that references the assembly and works?

By on 8/4/2010 10:29 AM ()

Hi. Yes, DataMapper is a namespace contained in the assembly IBatisNet.DataMapper.dll

The following C# code compiles fine:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Xml;

using IBatisNet.DataMapper;

using IBatisNet.DataMapper.Configuration;

namespace CT.TestApp

{

class Program

{

static void Main(string[] args)

{

DomSqlMapBuilder builder = new DomSqlMapBuilder();

ISqlMapper ff = builder.Configure(new XmlDocument());

}

}

}

This F#, with same assemblies referenced, will not compile:

open System

open System.Xml

open IBatisNet.Common

open IBatisNet.DataMapper

open IBatisNet.DataMapper.Configuration

let builder = new DomSqlMapBuilder()

let ff = builder.Configure(new XmlDocument())

Visual studio screen grabs with errors:

[link:www.flickr.com]

[link:www.flickr.com]

Tearing my hair out with this one, but suspecting something simple...

Thanks!

By on 8/5/2010 12:10 AM ()

Hi,

I have managed to solve this issue. It was down to the target framework set in the F# project properties. By default it was set to ".Net Framework 4 Client Profile". Changing it to ".Net Framework 4". Results in the solution building

Thanks for your help, hope this thread helps someone....

By on 8/5/2010 1:38 AM ()
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