Question

I am working with a .NET 3.5 class library that was created in Visual Studio 2008, and later updated and recompiled in Visual Studio 2010. The strangest thing is happening: One of the Web References that is listed in the Solution Explorer does not actually compile into the DLL (proven by inspecting the DLL with .NET Reflector), and there are no errors or warnings respectively. I tried Googling and searching this site and I could not find any applicable information. Any advice about why this is occurring will be greatly appreciated! Hopefully the information provided is enough; otherwise I should be able to provide more.

Edit: The namespace for the Web Reference shows up in the Solution Explorer, but not in the Object Browser. Some of my colleagues are saying that this is an issue with the Web service itself. I should mention that it is an SAP Web service and during development we are interfacing with a test environment that was recently upgraded and could be acting problematically. I will confirm whether this is the cause once I am more certain, so please don't hesitate to share any relevant information meanwhile.

Edit (2): See my first response to Cyborgx37's answer for further clarification including the client-side error that is generated.

Was it helpful?

Solution

This is slightly baffling: All I did to get the Web Reference into the Object Browser - and hence into the actual DLL at compile time - was rename it to something else, and then revert it back to its old name (which was optional to keep the name the same). Gotta love strange Microsoft issues. Hopefully this helps someone else who ends up running into the same issue!

OTHER TIPS

If I understand correctly, you are wondering why the referenced assembly is not compiled into your DLL.

Referenced assemblies are typically not compiled into the DLL. Your DLL will instead contain a pointer to the external resource and .NET will attempt one of several strategies for locating it (and then loading it into memory so your application can use it).

You may find this article enlightening:

How the Runtime Locates Assemblies
To successfully deploy your .NET Framework application, you must understand how the common language runtime locates and binds to the assemblies that make up your application. ...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top