Making WSE 3.0 work in Visual Studio 2008
Added Thursday, March 26, 2009 by Thevin Sattayatam, Developer · 2 Comments
WSE 3.0 or Web Service Enhancements 3.0 was phased out by WCF (Windows Communication Foundation) and hence Microsoft did not add support for WSE 3.0 in Visual Studio 2008. When creating proxy classes from the wsdl, any class that references WSE 3.0 won’t be generated. The problem is that the classes are generated by the standard extension mechanism uses the ServiceDescriptionImporter class which is invoked by the MSDiscoCodeGenerator custom tool. We’ll have to add WseExtensionImporter (which is in Microsoft.Web.Services3.dll, download WSE 3.0 from Microsoft) manually.
This is a three step process:
1. Modify the devenv.exe configuration file which is located in the same directory as the main Visual Studio executable. Add the following into the configuration file:
<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>
2. Create an Addin Project with the Visual Studio’s create new project wizard.
2.A Add the following references: Microsoft.Web.Services3, VSLangProj (the correct version for your project), System.Web.Services
2.B Modify OnConnection in Connect.cs to the following:
public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)
{
_applicationObject = (DTE2)application;
_addInInstance = (AddIn)addInInst;
WseExtensionImporter.IsWseReferencedActiveProjectImplementation = delegate()
{
foreach (object activeProjectObj in (Array)_applicationObject.ActiveSolutionProjects)
{
Project project = activeProjectObj as Project;
if (project == null)
continue;
VSLangProj.VSProject vsProject = project.Object as VSLangProj.VSProject;
if (vsProject == null)
continue;
if (vsProject.References.Find("Microsoft.Web.Services3") != null)
return true;
}
return false;
};
}
3. Build, then use the Add-in Manager (Tools -> Add-in Manager) to enable it.
4. (may be required) Update the Web Reference to rebuild the proxy classes.

Hello Thevin.
I really appreciate what you have posted here.
I tried what you have in this post, but even after refeshing the web reference (or deleting and re-adding), the WSE instance is still NOT created. I am getting one error on this line “Dim proxy As New TripExportService.TripExportServiceWse”
The Addin Project is created without an error and shows up in the Addin Manager.
Any help you can provide would be gratefully appreciated.
Thanks,
Tony
Where can I find more info on this topic?