command line compile w/ Web Service reference

g1_gatchaman

Newcomer
Joined
Aug 13, 2004
Messages
4
I'm trying to compile a project using the command line but there is a Web Reference that it keeps choking on and I'm not sure how to reference this at the command line. Should I use the WSDL.exe to produce a .vb file fromt the web service then compile that into a dll and reference that dll to do my final compile?
 
Thanks for the info.

In my case, this produces a .vb file. I took that and compiled it into a dll and then referenced it when I try to build my final dll but I get a "Type ... is not defined" and it refers to where I dim the proxy.

What do I do?
 
How are you refering to the proxy? IIRC the wsdl.exe tool doesn't put the class in a paticular namespace by default, you can specify on with the /n command line switch.
 
--Not sure how to exactly answer your question (i'm not a programmer). So, I'm gonna give you what I'm doing.

wsdl /l:vb https://mysite/pdfservice/pdfgetter.asmx /out:C:\_BuildArea\Site\includes\CommonFunctions\PDFgetter.vb

--From here I compile this into a dll (I wasn't specifying a namespace before but now I am and I am getting "..ambiguous in the namespace..." messages on top of the "Type ... is not defined")

C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\vbc.exe /out:C:\_BuildArea\Site\Bin\PDFgetter.dll /target:library /libpath:C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\ /r:system.dll /r:System.XML.dll /r:System.Web.Services.dll /rootnamespace:mynamespace /optimize+ /debug- /recurse:C:\_BuildArea\Site\includes\commonfunctions\pdfgetter.vb

--Then I just use this dll as a reference in my compile command
 
If I use the WSDL to produce a dll and reference that then how does my final dll know what the URL is for the web service?

Ugh! Help!

I tried using NAnt to compile using the Solution file to get all the reference info but I am having no luck with that either.

Anyone know of some good NAnt documentation or examples?
 
The easiest thing here (for consistency anyhow) is to just forget using the web-reference in the VS.net project and add references to your .dlls that WSDL.exe created.

This way, your NANT script is using the same .dlls as your VS project.
 
Back
Top