We need to update the Nant build files for Data Mapper & Dao to use the latest version of nant and document the build targets. We need build targets for .net framework versions 2, 3.5, and 4
Comment #1
Posted on Jan 6, 2011 by Helpful MonkeyMichael:
IBatisNet.Common use specific 3.0 and 3.5 framework classes.
In the case of 2.0 it fails because of Linq (3.5) and System.ServiceModel (3.0). In 3.0 the problem is Linq.
The affected classes are:
2.0:
WcfSessionItemsInstanceExtension: System.ServiceModel HybridWebThreadSessionStore: System.ServiceModel InstanceItems: Linq WcfSessionStore: requires WcfSessionItemsInstanceExtension
In 3.0: InstanceItems: Linq WcfSessionItemsInstanceExtension: requires InstanceItems WcfSessionStore: requires WcfSessionItemsInstanceExtension HybridWebThreadSessionStore: requires WcfSessionItemsInstanceExtension
The solution I suspect we can adopt is:
For 2.0:
- Exclude SessionStore classes: it's impossible to use a 3.0 implementation. All the threads for WCF has to be droped.
WcfSessionItemsInstanceExtension HybridWebThreadSessionStore WcfSessionStore
In the case of Linq we can use LinqBridge. The effect is in the InstanceItems.cs class. Another solution is to change the InstanceItems.CleanUp method (it's the only one that uses Linq)
For 3.0:
In the case of Linq we can use LinqBridge. The effect is in the InstanceItems.cs class. Another solution is to change the InstanceItems.CleanUp method (it's the only one that uses Linq)
Please, I need your confirmation on the way I should take in order to build for 2.0, 3.0, 3.5, 4.
Greetings and sorry for my poor english!
Comment #2
Posted on Jan 10, 2011 by Happy RhinoJuan,
We'll need to do in and add a compiler directive to exclude those features for a build less than .net 3.0 and have the .nant files supply that directive
Comment #3
Posted on Jan 10, 2011 by Helpful MonkeyMichael:
I Already have done this. Today I commited the build files.
In the IBatisNet.DataMapper.build file you can see the validation for 2.0:
if target = net-2.0:
Exclude: { WcfSessionStore.cs, InstanceItems.cs, WcfSessionItemsInstanceExtension.cs, HybridWebThreadSessionStore.cs }
Else:
Exclude: { InstanceItems-net20.cs }
InstanceItems-net20.cs is a copy & paste of InstanceItems.cs. The only difference is that it does not have the Hook method (event triggered in WcfSessionItemsInstanceExtension.GetCollectionFrom).
Now you can build nant for .Net-2.0 and .Net-3.5. I have to install the 3.0 version to test on it, besides the 4.0.
Todo: add the ndoc target. Today or tomorrow i'll wait to have it.
Greetings and sorry for my poor english!
---- Nant options: ---- nant clean nant clean-zip nant debug nant release nant package
example: nant release -t:net-2.0
The output files are in the "Nant" directory.
Status: New
Labels:
Type-Defect
Priority-High
Version-Release1.x
Version-Release2.x