WSE 3.0 Support in Visual Studio 2010

Sometimes, for various reasons, we come across projects or solutions we have to maintain to our chagrin.  We have an application which runs on .NET 2.0 and can’t be upgraded to 3.5 or beyond.  This application consumes web services published via the old ASMX services, and uses Web Service Extensions 3.0 (WSE 3.0) – the precursor to Windows Communication Foundation (WCF).

If you are in the same position, and you have upgraded your solution to Visual Studio 2010 (but are still targeting .NET 2.0), you might find that, by default, updating those web references causes the base class to change from WebServicesClientProtocol to SoapHttpClientProtocol.

This is by design, as it is anticipated that all web services be upgraded to WCF, however sometimes this causes widespread destruction and it’s easier and more convenient to just be able to use the previous importer.  This can be done in Visual Studio 2010, but it is somewhat nasty.

Here is a step by step guide to enabling WSE 3.0 references in Visual Studio 2010:

1. Close Visual Studio 2010
2. Download and Install WSE 3.0 (if you haven’t already)
     a. http://www.microsoft.com/downloads/en/details.aspx?FamilyID=018a09fd-3a74-43c5-8ec1-8d789091255d
3. In Explorer, open the following folder:

a. C:\ProgramData\Microsoft\MSEnvShared\Addins (or)
b. C:\Documents and Settings\All Users\Application Data\Microsoft\MSEnvShared\Addins


4. Locate the following file:
     a. WSESettingsVS3.Addin
5. Open the file in Notepad
6. Replace <Version>8.0</Version> with <Version>10.0</Version>, then save
7. In Explorer open the following folder:
    a. C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE
8. Locate the following file:
   
a. devenv.exe.config
9. Open the file in Notepad
10. Add the following at the end of the file (before the </configuration>) and save:

<system.web>
<webServices>
<soapExtensionImporterTypes>
<add type="Microsoft.Web.Services3.Description.WseExtensionImporter,
Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" />
</soapExtensionImporterTypes>
</webServices>
</system.web>

11. Open Visual Studio 2010
12. In Tools -> Options -> Environment->Add-in/Macros Security ensure that this entry exists:
       a. %APPDATA%\Microsoft\MSEnvShared\Addins
13. Update web references

References:

http://stackoverflow.com/questions/433062/wse-client-project-keeps-reverting-webservicesclientprotocol-to-soaphttpclientpro
http://www.junasoftware.com/blog/how-to-use-wse-3-in-visual-studio-2010.aspx
http://www.junasoftware.com/blog/how-to-use-wse-3-in-visual-studio-2008.aspx

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

One thought on “WSE 3.0 Support in Visual Studio 2010”