Thanks Bob,
I'll give that a try. I remember seeing this month's back. Why it didn't
click then I have no idea!
Lionel Morrison | Build and Release Engineer | Lifeware TEK
Office: (802) 552-4465 | Cell: (386) 336-7709
Email: lmorri...@lifeware.com
From: Bob Archer [mailto:bob.arc...@amsi.com]
Sent: Wednesday, March 17, 2010 11:47 AM
To: Lionel Morrison; nant-users@lists.sourceforge.net
Subject: RE: WebRequest
Did you try the references node inside the script node? Look at the docs
for the script task:
http://nant.sourceforge.net/release/0.86-beta1/help/tasks/script.html
BOb
From: Lionel Morrison [mailto:lmorri...@lifeware.com]
Sent: Wednesday, March 17, 2010 11:12 AM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] WebRequest
I'm trying to read in a txt file from a website
(http://menumax.com/svn_info.txt) . As it is I can't find a task that
will allow me to call a URL so I thought I would use C# code block.
My question is how do I get NAnt to include the System.Net class? I
keep getting the follow error
Invalid token 'using' in class, struct, or interface member declaration
Below is my code block. Is it simply that I have the using statement in
the wrong place and if so where should I be putting it?
<script language="C#" prefix="lifeware">
<code>
<![CDATA[
using System.Net;
[Function("webrequest")]
public static string webRequest() {
WebRequest request =
WebRequest.Create("http://menumax.com/svn_info.txt");
return "blablabla";
}
]]>
</code>
</script>
Lionel Morrison | Build and Release Engineer | Lifeware TEK
Office: (802) 552-4465 | Cell: (386) 336-7709
Email: lmorri...@lifeware.com
***** CONFIDENTIALITY NOTICE - PLEASE READ FIRST *****
This e-mail message (and all attachments, if any) is intended only for
the use of the individual or the authorized representative of the entity
to which it is addressed, and may contain information which is
confidential and protected from disclosure by law as proprietary
information, legally privileged or otherwise. If you are not the
intended recipient, you are hereby notified that you are not to read the
contents and any use, disclosure, distribution or copying of the
transmitted material is strictly prohibited. If you have received this
e-mail message in error, please immediately contact the sender to
confirm the deletion or destruction of this message and all copies.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users