I'm using NAnt 0.85 to build a legacy project. The script itself uses the csc
task (not the msbuild
task) and works fine.
The project is on its way to migrating over .NET 3.5. We already use VS2008, and C# 3.0, while still targeting .NET 2.0 framework runtime.
Now the problem occurs when we want to upgrade our NAnt scripts, to compile C#3.0 code using csc task.
I managed to compile C#3.0 code with NAnt, by modifying the nant.exe.config to add the net-3.5 framework section, but still, I can't figure a way to ensure that resulting assemblies will execute on .NET 2.0 runtime.
More problematic : if I'm using LinqBridge to leverage Linq without System.Core and .NET 3.5 runtime, the csc task fails and gave me an error message indicating that all linq-related calls are ambiguous. In fact, NAnt csc task seems to automatically reference System.Core.dll
, which causes a conflict with the only reference I effectively added to the <references>
section, under the csc task: LinqBridge.dll
.
Do you now how to solve that?