dotnet2 flag in 1.6.2

Skip to first unread message


May 13, 2014, 9:23:42 PM5/13/14
I'm having a trouble running the cs_release_1.6.2 tagged code from the repository.
As near as I can tell, I've traced the problem to this chunk of code:

        public ObjectFactory(bool allowCodeGeneration)
            if (allowCodeGeneration)
                // Detect runtime environment and create the appropriate factory
                if (Environment.Version.Major >= 2)
#if dotnet2
                    _objectFactory = new DelegateObjectFactory();
                    _objectFactory = new EmitObjectFactory();
                _objectFactory = new ActivatorObjectFactory();

The IBatisNet.DataAccess.csproj file included in the cs_release_1.6.2 tag does not have the dotnet2 flag set, so the path through the above code causes the _objectFactory to be null, and when I run the code I get null object exception when the code tries to dereference the _objectFactory.

If I turn on the dotnet2 flag, I get the following compiler errors:
Error    11    The name 'ConfigurationManager' does not exist in the current context    C:\Dev\Mockups\MybatisSource\IBatisNet.Common\Logging\LogManager.cs    126    39    IBatisNet.Common
Error    12    The type or namespace name 'DelegateObjectFactory' could not be found (are you missing a using directive or an assembly reference?)    C:\Dev\Mockups\MybatisSource\IBatisNet.Common\Utilities\Objects\ObjectFactory.cs    52    42    IBatisNet.Common
(+ others)

That string "ConfigurationManager" doesn't exist anywhere else that I can find.

At this point I'm having a hard time believing the code in the 1.6.2 tag was ever actually used.
Does any of this stuff work, or where is the proper, working source for the latest (1.6.2) release?
- Tuber
Reply all
Reply to author
0 new messages