Generating web - Cant find assembly

May 6, 2008 at 10:06 AM
Sometimes you may get an error that it cant find an assembly when the generate web services task runs. This tends to happen if you had your assemblies deployed to the GAC when you generated the services originally and the webservicedescription.xml file contains the GAC paths to the assembly rather than the ones out of your source code.

The error will happen if you run the build script and the assemblies arent already there. I have not really come across this previously because I normally generate the web services before I have GAC'd the assemblies.

There are a few workarounds to resolve this (you can use either):

1. Remove assemblies from GAC and regenerate the web services

2. Tweak the ***.Build.proj file and in the Deployment target put the call to the DeployApplication target before the call to PublishWebServices. (note: you will need to test this with your solution as depending on what other things you have going on it might have other affects if you have used the before and after overrides)

I think probably longer term workaround 1 is the best way to do it