Richard Sbarro wrote:

Just wondering what the proper syntax for referencing the Microsoft assemblies found in the Framework directory (i.e. "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322") is. It seems that the System assemblies are picked up without being explicitly referenced, but the Microsoft assemblies in that directory are not. This is a problem because not all of the developers on my project have the .NET Framework installed in the same location.

system assemblies being picked up be default is nothing to do with NAnt. This is a function of the csharp response file - look for csc.rsp in the same directory as csc.exe.

However f you reference your assemblies explicitly by name they will be found in the current framework.

for example:
<references basedir="Build">
   <include name="Microsoft.JScript.dll" />
   <include name="System.Data.dll" />
</references>

will locate Microsoft.JScript.dll in the direcory of the current framework - probably C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\ in your case.

If you'd prefer to have those assemblies resolved aotomatically then just add them to the csc.rsp file.

Ian

For example, I have a <csc> task that works when the references are set up as:

<csc output="Build\MyProject.exe" target="winexe">
<references basedir="Build">
<include name="C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Microsoft.*.dll" />
<include name="*.dll" />
</references>
<sources basedir=".">
<include name="MyProject\**\*.cs" />
</sources>
</csc>


But if I remove the reference to the "Microsoft.*.dll", I get a compile error.

Should the <csc> task implicitly reference all Framework assemblies, or am I doing something wrong? I can build a repro if my explanation isn't clear enough.

Thanks,
Rich


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users



--
Ian MacLean, Developer, ActiveState, a division of Sophos
http://www.ActiveState.com




-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to