Phidiax Tech Blog

Adventures in custom software and technology implementation.

BizTalk: WCF Service Publishing Wizard and Path Length

You may be familiar with this warning if you're still working with TFS 2010 and BizTalk's WCF Service Publishing Wizard.

TF205022: The following path contains more than the allowed 259 characters: $/MyTeamProjectCollection/MyTeamProject/MyProject/MyCompany.BizTalk.MyService/MyCompany.BizTalk.MyService.Deployment/MyWcfServices/MyWcfService/App_Data/MyCompany.BizTalk.MyService.Schema.MyNamespace.MyNamespace2.MySchemaFolder.MySchemaSubFolder.MyOperationRequestEnvelope.MyOperationRequest.xsd. Specify a shorter path.

The WCF Service Publishing Wizard creates filenames for each of the schemas which are being exposed by using the namespace and type name specified by the file properties. This is all well and good as far as getting unique files names but leaves you in a lurch when it creates a file path that exceeds TFS 2010's path length limit.

In order to get around this you'll need to modify the filenames and references to them within the service. A typical service created has this structure

Shortening those filenames takes three steps.

  1. Actually shorten the names in the file system. I'm going to assume you need no instruction here.
  2. Update paths to the files in ServiceDescription.xml 

  3. If any schemas import others, update the schema import. You'll notice that the import statements refer to the schemas by what looks like a fully qualified class name. By trial and error, I've found only the class name actually matters. The assembly specification can be left alone.

  4. (Optional) Update the paths to the files in SchemaIndex.xml. This isn't required for the service to continue operating but it'll help with any confusion later on.

If anything is wrong, you'll be able to tell because the exposed WSDL for your service will no longer import the required schemas.

And that's it! With the shorter filenames, you should be able to check-in to TFS without error. (73.1KB)

Privacy Policy  |  Contact  |  Careers

2009-2017 Phidiax, LLC - All Rights Reserved