4
Vote

When a dependency is deployed to the gac, wcfextras cannot see the xml file

description

I've ran into a funky situation.
 
Service deploys with an implementation.dll and an interface.dll, both of which are linked to wcf.extras. When the service is deployed along with the xml comment files, all is fine.
 
Since other assemblies which are GACed also depend on the interface.dll, I have no choice but to also deploy the interface.dll to the GAC. The service will still activate and run but fail to export a wsdl because it cannot find the xml comment file. After stepping through the code, I found the wcf.extras was being called from a GAC'd interface assemble and simply wasn't finding the xml file. I was able to overcome this by copying this file over to the proper folder within the GAC.
 
Just thought I'd throw that out there as a concern for others

file attachments

comments

GiannisKhan wrote Nov 24, 2012 at 10:24 AM

This happen because the XmlDocumentation file is searched next to the Contract dll. If it sites in the GAC, obviously the Xml is not there.
I managed the same issue and I extended the XMLCommentsAttribute to accept a new configuration parameter that I called xmlDocumentationFilePath in witch you can explicitly specify the path where to find the xml doc file.
I am not currently using GNU, so I'm going to attach files I changed so you can compare this with your ones and update them if you like this solution.

In the archive file you'll find a file called XmlCommentsDataSurrogate.cs , because I splitted the XmlCommentsExporter.cs .

The configuration section will be then:
<xmlComments format="Default"
           wrapLongLines="false"
           documentable="false"
           xmlDocumentationFilePath="C:\SomeDir\XmlDocumentationFilesDirectory"
/>


Bye
Gianni

wrote Feb 21, 2013 at 10:53 PM