Christian Gross wrote:

Is it possible in the file SysInfo.cs to add the source code:

protected override void ExecuteTask() {
...
Properties[ Prefix + "clr.version.major"] = Environment.Version.Major.ToString();
Properties[ Prefix + "clr.version.minor"] = Environment.Version.Minor.ToString();
...
}


The reason why I would like this is because I am writing code that can be compiled on both .NET 1.1, and .NET 2.0. The problem is that .NET 2.0 has generics, and that support needs to be removed.

the problem with that approach is that it gives you the version of the runtime that nant is running on rather than the version of the framework that you are targetting.


try somthing like:

|<property name="target-version" value="${framework::get-version(||framework::get-target-framework())}"/>

see:
http://nant.sourceforge.net/release/latest/help/functions/index.html#NAnt
for the docs on related functions.

Ian
|



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to