You cannot reference the DLLs in the GAC using NAnt (which I know), you need to have a physical DLL somewhere (for example, in the lib project folder) and refer to it as a regular DLL:
<include name="lib\System\System.ComponentModel.DataAnnotations.dll"/>
One way to grab a copy of the GAC DLL is to cd in C: \ Windows \ assembly \ GAC_MSIL from the command line and list the contents with dir. This is the hidden GAC directory. If you find the assembly you need, cd, and you will find folders for different versions of .NET (for example, 3.5.0.0). cd is in the correct order, and you should find the very dll that you can copy. On my computer, I found it at:
C: \ Windows \ assembly \ GAC_MSIL \ System.ComponentModel.DataAnnotations \ 3.5.0.0__31bf3856ad364e35
I think that if you use MSBuild instead of csc, you do not need hard links to the GACed DLL, it will find them for you.
source share