Bug 21228 - Adding web reference generating code with compile errors
Summary: Adding web reference generating code with compile errors
Status: RESOLVED DUPLICATE of bug 18577
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web.Services ()
Version: unspecified
Hardware: PC Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-07-10 08:03 UTC by Adam Patridge [MSFT]
Modified: 2014-10-24 12:37 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 18577

Description Adam Patridge [MSFT] 2014-07-10 08:03:09 UTC
XS Version: 5.1.2 (build 0)
Affecting Android and iOS projects

Whenever I try to add the project web reference for the Xamarin University XAM150 course's SOAP lab (http://rxnav.nlm.nih.gov/RxNormDBService.xml), I end up with a bunch of build errors in the resulting Reference.cs file. All of them are duplicate definition errors. Deleting the duplicate definitions seems to fix everything, at least for the small amount of the service this course lab actually uses.

Examples:
> Error CS0102: The type `AddWebReferenceTest.iOS.RxNav.DBManagerService' already contains a definition for `findRxcuiByIdOperationCompleted' (CS0102) (AddWebReferenceTest.iOS)
> Error CS0101: The namespace `AddWebReferenceTest.iOS.RxNav' already contains a definition for `findRxcuiByIdCompletedEventHandler' (CS0101) (AddWebReferenceTest.iOS)

1. Start a new Android project.
2. Right-click project and choose Add > Add Web Reference
3. For Web Service Url, enter "http://rxnav.nlm.nih.gov/RxNormDBService.xml".
4. For Framework, choose ".NET 2.0 Web Services" from the drop-down.
5. Optionally change the Reference to something shorter (leaving it as generated doesn't change the outcome).
6. Click OK.
7. Try to build project.

It does not occur with the default TempConvert web service (http://www.w3schools.com/WebServices/TempConvert.asmx), so it may have something to do with generating code from services with multiple method overloads varying by parameters.

In the case of this NIH web service, I get 12 build errors. Here is the build output (only paths trimmed).

> Compilation failed: 12 error(s), 0 warnings
> .../Reference.cs(35,53): error CS0102: The type `AddWebReferenceTest.iOS.rxnav.nlm.nih.gov.DBManagerService' already contains a definition for `findRxcuiByIdOperationCompleted'
> .../Reference.cs(33,53): (Location of the symbol related to previous error)
> .../Reference.cs(61,53): error CS0102: The type `AddWebReferenceTest.iOS.rxnav.nlm.nih.gov.DBManagerService' already contains a definition for `findRxcuiByStringOperationCompleted'
> .../Reference.cs(59,53): (Location of the symbol related to previous error)
> .../Reference.cs(63,53): error CS0102: The type `AddWebReferenceTest.iOS.rxnav.nlm.nih.gov.DBManagerService' already contains a definition for `findRxcuiByStringOperationCompleted'
> .../Reference.cs(59,53): (Location of the symbol related to previous error)
> .../Reference.cs(95,53): error CS0102: The type `AddWebReferenceTest.iOS.rxnav.nlm.nih.gov.DBManagerService' already contains a definition for `getProprietaryInformationOperationCompleted'
> .../Reference.cs(93,53): (Location of the symbol related to previous error)
> .../Reference.cs(121,57): error CS0102: The type `AddWebReferenceTest.iOS.rxnav.nlm.nih.gov.DBManagerService' already contains a definition for `findRxcuiByIdCompleted'
> .../Reference.cs(119,57): (Location of the symbol related to previous error)
> .../Reference.cs(147,61): error CS0102: The type `AddWebReferenceTest.iOS.rxnav.nlm.nih.gov.DBManagerService' already contains a definition for `findRxcuiByStringCompleted'
> .../Reference.cs(145,61): (Location of the symbol related to previous error)
> .../Reference.cs(149,61): error CS0102: The type `AddWebReferenceTest.iOS.rxnav.nlm.nih.gov.DBManagerService' already contains a definition for `findRxcuiByStringCompleted'
> .../Reference.cs(145,61): (Location of the symbol related to previous error)
> .../Reference.cs(181,69): error CS0102: The type `AddWebReferenceTest.iOS.rxnav.nlm.nih.gov.DBManagerService' already contains a definition for `getProprietaryInformationCompleted'
> .../Reference.cs(179,69): (Location of the symbol related to previous error)
> .../Reference.cs(2044,26): error CS0101: The namespace `AddWebReferenceTest.iOS.rxnav.nlm.nih.gov' already contains a definition for `findRxcuiByIdCompletedEventHandler'
> .../Reference.cs(2025,26): (Location of the symbol related to previous error)
> .../Reference.cs(2291,26): error CS0101: The namespace `AddWebReferenceTest.iOS.rxnav.nlm.nih.gov' already contains a definition for `findRxcuiByStringCompletedEventHandler'
> .../Users/adam/Projects/AddWebReferenceTest/AddWebReferenceTest.iOS/Web References/rxnav.nlm.nih.gov/Reference.cs(2272,26): (Location of the symbol related to previous error)
> .../Reference.cs(2310,26): error CS0101: The namespace `AddWebReferenceTest.iOS.rxnav.nlm.nih.gov' already contains a definition for `findRxcuiByStringCompletedEventHandler'
> .../Reference.cs(2272,26): (Location of the symbol related to previous error)
> .../Reference.cs(2614,26): error CS0101: The namespace `AddWebReferenceTest.iOS.rxnav.nlm.nih.gov' already contains a definition for `getProprietaryInformationCompletedEventHandler'
> .../Reference.cs(2595,26): (Location of the symbol related to previous error)
Comment 1 Shruti 2014-07-11 02:34:23 UTC
I have tried this issue by following same steps(1 to 7) as mentioned in above description and able to reproduce it.

Screencast : http://screencast.com/t/FzBUiEOE

Supplement Info :
Error Log : http://screencast.com/t/BG0V1LU6EeJq
Build Output : https://gist.github.com/Shruti360/f6d6d4d35fd1b4dbe775
IDE Log : https://gist.github.com/Shruti360/6477ee940098d58893b1

Environment Info :
=== Xamarin Studio ===

Version 5.1.2 (build 0)
Installation UUID: 1a096c6f-0678-402e-89b2-a2c10f7e80e4
Runtime:
	Mono 3.4.0 ((no/954ed3c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 304000214

=== Xamarin.Android ===

Version: 4.12.6 (Enterprise Edition)
Android SDK: /Users/360_macmini/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.iOS ===

Version: 7.2.5.5 (Enterprise Edition)
Hash: 87026b6
Branch: 
Build date: 2014-07-02 19:39:08-0400

=== Xamarin.Mac ===

Version:

=== Build Information ===

Release ID: 501020000
Git revision: 4574b1e5cf09f2e95e486c259bd9267a68c77cb3
Build date: 2014-07-02 20:50:40-04
Xamarin addins: fdea6fe3e36cda39291b39c81133e409c6d6f092

=== Operating System ===

Mac OS X 10.9.4
Darwin ShrutiMac.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 2 Rob Gibbens 2014-10-24 09:22:39 UTC
This bug is affecting every student in every session of XAM150 in Xamarin University.  This is very public and would be great to get fixed.
Comment 3 Lluis Sanchez 2014-10-24 09:35:13 UTC
This is a bug in Mono, not Xamarin Studio
Comment 4 Lluis Sanchez 2014-10-24 12:37:19 UTC

*** This bug has been marked as a duplicate of bug 18577 ***