Monday, May 11, 2015

Debugging Old ASMX Web Services - The "Cannot Create Type XXX" Error

So I had to upgrade an old web service from a Visual Studio 2008 project to a Visual Studio 2012 project.  When I went to do a build on my local machine I kept getting the "Cannot create type xxx" error on my asmx web service.

Ultimately, after playing around and researching, the fix is this.  The webservice is looking for the dll files in the bin directory.  The problem is if you are debugging the web service on your local machine the dll's will be outputted to either the bin\debug or the bin\release folders.  You need to grab those dll's and move them up on to just the bin folder, and at least for me the error went away.

Happy Coding.