FIX: Error Message When You Add a Web Reference to the Same Web Service More Than Once (311922)
The information in this article applies to:
- Microsoft Visual C++ .NET (2002)
- Microsoft Web Services (included with the .NET Framework 1.1)
- Microsoft Web Services (included with the .NET Framework) 1.0
This article was previously published under Q311922 SYMPTOMS When you add a Web reference to the same Web service more
than one time in a Managed C++ application, you receive a compiler error
message similar to the following: c:\My
Samples\MCTestClient\WebService.h(4) : error C3846: 'Service1' : cannot import
symbol from 'c:\My Samples\MCTestClient\Service1.dll': as 'Service1' has
already been imported from another assembly 'Service11.dll' c:\My
Samples\MCTestClient\WebService.h(3) : see declaration of 'Service1'
RESOLUTION If you used the Add Web Reference Wizard to add a Web
reference, make sure that you delete the .cs, .wsdl, .dll and .h files (usually
called Service1.cs, Service1.wsdl, Service1.dll, and Webservice.h) that are
generated by the wizard from both the solution and physical file systems. Also,
be sure to delete the Service1.dll file from the Debug/Release directory. Then,
do either of the following:
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
This bug was corrected in Microsoft Visual C++ .NET (2003).
REFERENCES For more information, visit the following Microsoft
Developer Network (MSDN) Web site:
Modification Type: | Minor | Last Reviewed: | 7/24/2003 |
---|
Keywords: | kbfix kbbug kbCompiler kberrmsg kbManaged KB311922 |
---|
|