This project is read-only.

CLINQ for .NET 4.0

Mar 10, 2011 at 5:13 PM

I'm upgrading my project to .NET 4.0 and, while CLINQ appears to run, it triggers warnings that "The predefined type 'System.Action' is defined in multiple assemblies in the global alias; using definition from 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll'"

I believe this is caused by ContinuousLinq's references to 3.5's System.Action conflicting with the rest of my project's references to the 4.0 version.

I tried recompiling ContinuousLinq for 4.0, but that caused a runtime exception in SmartFilterAdapter that I don't know how to solve.

Are there any plans to recompile and validate CLINQ for .NET 4.0?



Mar 10, 2011 at 6:20 PM

I too would like to see this happen. We are using this in a .NET 4.0 project, so we ended up making the necessary source changes ourselves.

For the System.Action issue, we changed the file so that it didn't generate as many variations of the System.Action delegates. I think that was the only thing we had to do to get it compiling under .NET 4.0.

We've made a couple other tweaks here and there too. I'd prefer not to do so, but there hasn't been a lot of response from the project contributors so far. I'm hoping they are still keeping an eye on this project. If not, maybe the community could pick it up.

- Nathan

Aug 17, 2012 at 11:31 PM

Just change so that the for loops start at 17 (because .Net 4 already has the first 16 definitions) 

namespace System
 <#for(int i=17;i<=20;i++){#>public delegate TResult Func<T1, T2, T3, T4, <#FormatRange("T{0}, ", 5, i); #>TResult>(<#FormatRange("T{0} t{0}", ", ", 1, i);#>);

 <#for(int i=17;i<=20;i++){#>public delegate void Action<T1, T2, T3, T4, <#FormatRange("T{0}", ", ", 5, i); #>>(<#FormatRange("T{0} t{0}", ", ", 1, i);#>);

Dec 26, 2012 at 4:41 PM

I can tell that nsulikow's answer solves those warning issues. Good job man.