Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, July 21, 2008 4:07 AM
Hi, I have a problem: in my class library project, I don't have the option to "Add webreference". There's something similar, "Add service reference" that retrieves the structure of the webservice and acts in a similar way to add webreference, but after that the proxy is not generated, and instead a weird System.Xml.XmlElement.datasource is put under Properties/Datasources
I was just trying to move the business logic from my application to a DLL to make it reusable, but I can't find a way to effectively add the webreference.
Is there a way? Thanks
All replies (7)
Monday, July 21, 2008 5:20 AM âś…Answered
try these
bytes.com/forum/thread553573.html
msdn.microsoft.com/en-us/library/ms242487(VS.80).aspx
www.pcreview.co.uk/forums/thread-3403020.php
Monday, July 21, 2008 5:35 AM
Works fine, thank you. But now I have another question. From that article it seems like "add web reference" is kinda outdated. What's the improvement in using "Add service reference"?
Thank you.
Monday, July 21, 2008 5:43 AM
You can use disco.exe (command-line utility) to manually create the discovery files (.wsdl, .xsd, .disco and .discomap files).
And then use wsdl.exe to create the proxy file. Add reference to this proxy file in your class library and you will be fine.
Refer to this article for a complete example of this approach.
Hope this helps.
Wednesday, April 29, 2009 7:24 AM
i also had the same issue i found a workaround ;)
1. Right click on the project and select properties
2. Change the Target Framework from ".net Framework 3.5" to ".net Framework 2.0"
3. save it
4. now when you right click on the project you will get "Add Web reference"
5. Add web reference you want to add
6. change the target framework back to ".net Framework 3.5" .
now you got it Add web reference there permanently in your project.
so enjoy
kazim
Hi, I have a problem: in my class library project, I don't have the option to "Add webreference". There's something similar, "Add service reference" that retrieves the structure of the webservice and acts in a similar way to add webreference, but after that the proxy is not generated, and instead a weird System.Xml.XmlElement.datasource is put under Properties/Datasources
I was just trying to move the business logic from my application to a DLL to make it reusable, but I can't find a way to effectively add the webreference.
Is there a way? Thanks
Thursday, October 15, 2009 3:59 PM
1. Right click on the project and select properties
2. Change the Target Framework from ".net Framework 3.5" to ".net Framework 2.0"
3. save it
4. now when you right click on the project you will get "Add Web reference"
5. Add web reference you want to add
6. change the target framework back to ".net Framework 3.5" .
now you got it Add web reference there permanently in your project.
This worked like a charm. Thanks!
Tuesday, November 24, 2009 11:22 AM
it works great :)
thank you
Tuesday, March 2, 2010 10:41 AM
i also had the same issue i found a workaround ;)
1. Right click on the project and select properties
2. Change the Target Framework from ".net Framework 3.5" to ".net Framework 2.0"
3. save it
4. now when you right click on the project you will get "Add Web reference"
5. Add web reference you want to add
6. change the target framework back to ".net Framework 3.5" .
now you got it Add web reference there permanently in your project.
A slightly shorter method would be to go to the "Add Service Reference" form and click the "Advanced..." button. At the bottom of the Service Reference Settings form is a Compatibility section with a "Add Web Reference..." button.