Dec 29, 2009 at 7:35 PM


anyone knowing where to find in VS 2010 WCFProxyGenerator?  Microsoft.VisualStudio.Editor.dll doesn't exist (which makes sense) so I guess it is moved to some other DLL




Feb 24, 2010 at 6:38 PM

I have not tried to update this for VS 2010 as yet. The source is available here on codeplex if anyone has time to do it before I find the time!

Mar 22, 2010 at 5:26 PM

Another vote for some poor soul to do this. I don't know anything about visual studio extensibility. I'm guessing it's going to be more than a simple change since the way plugins etc work in 2010 is different.

Mar 22, 2010 at 9:20 PM

Ok, let me bget through the VS 2010 launch first please, and then I will look for some time to update this for VS 2010 ok?

Mar 22, 2010 at 9:57 PM

I'm hoping a nice community member gets to it before you do. I'll give it a try myself.

Apr 28, 2010 at 8:14 PM

Any updates on this?

May 17, 2010 at 5:40 AM

Just another push on this...

I also went to look at the source code and couldn't see anything in the repo??

May 17, 2010 at 12:35 PM
Not sure what you mean about repo? The source is all up there.
May 19, 2010 at 6:27 PM
Edited May 19, 2010 at 6:30 PM

Hey people,

I don't have the source for this but following other peoples examples of custom proxy generators, here are the basics to getting it to work in VS 2010:

 - Change the sln to use framework 4.0

 - Remove the reference to Microsoft.VisualStudio.Editors

 - Add reference to Microsoft.VisualStudio.Editors (which will only show up if you have done step 1)

Hope this works for this project.

OK, so the real reason that I was writing a note:

I have been looking at using RIA Services. They use a different generator altogether, but it has a really nice extension point such that you can add an attribute to the service which points a type in your service project (or other project that is referenced by the service project). This lets you jump into the code generation to add certain features. 

For example:

public class MyService

What I really want to do is create a basic custom WCF Proxy Generator such that this functionality is available (It makes testing so much easier and you only have to install one custom generator, but you can apply lots of different types to do your custom generation)

Does anyone have any clue how to achieve this???

Once I get passed that point I then want to be able to create a base type for extension that maps the generated types to the proxies such that you have a keyed dictionary (just like RIA Services) so that you can examine the original type and the proxy.

Cheers for any suggestions


May 20, 2010 at 12:59 PM
Edited May 20, 2010 at 1:26 PM

I tried your solution, but if i use it about "Run Custom Tool" on the refernce.svcmap then it shows up an error:

Fehler    1    Fehler in benutzerdefiniertem Tool: Fehler beim Generieren der Datei: Methode nicht gefunden: "Microsoft.VSDesigner.WCFModel.VSWCFServiceContractGenerator

Error    1    Error in custom tool: Error on generating file: Methode couldn't be found: "Microsoft.VSDesigner.WCFModel.VSWCFServiceContractGeneratorMicrosoft.VSDesigner.WCFModel.VSWCFServiceContractGenerator.GenerateCodeAndConfiguration(Microsoft.VSDesigner.WCFModel.SvcMapFile, System.Configuration.Configuration, System.CodeDom.Compiler.CodeDomProvider, System.String, System.Configuration.Configuration, System.String, System.IServiceProvider, Microsoft.VSDesigner.WCFModel.IContractGeneratorReferenceTypeLoader, Int32, System.Type)"


May 20, 2010 at 1:09 PM

Hi Michele,

I am using tortoisesvn as my svn access, this is what I see at the root level:


with no children. Can I not use tortoise with this code base?

May 20, 2010 at 1:10 PM

Hi Helmut,

I am having (more than likely my own stupid fault) problems with getting the source code.

Once I get this sorted I will be able to help you more. But that is the steps that I took, but I wasn't using this codebase as the source of my custom proxy, I just thought that this might be the problem here too



May 20, 2010 at 1:23 PM
Edited May 20, 2010 at 1:37 PM

Hi Dewy,

it was my foult, it works with your solution. It's just a bit mysterious... The Microsoft.VisualStudio.Editors wasn't displayed in add refernce, altough i migraded it to .net 4.0. So i decided to add it manually to "%windir%\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.Editors\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Editors.dll". Seemed to work first, but in background it added a refernce to the old 9 version. Now i just copied it in my solution folder and point on that dll.

And it just works fine :)

Thanks you very much.

The source code is available on this page http://wcfproxygenerator.codeplex.com/releases/view/29584. If you have trouble with downloading i could send you the sourcecode on email.

And thanks again...

And thanks michelebustamante for that nice generator :)

May 20, 2010 at 4:39 PM

The source is not in the root folder. I just uploaded a zip with source as a release.

May 26, 2010 at 1:15 PM

That's odd.. all I see are a registry file, some code samples and the msi, and as far as I can tell, the samples zip doesn't contain the generator..

  // Cheers, Morten

May 26, 2010 at 1:25 PM

Look on the right border of home- or downloadpage under Releases.
There are 2 releases. One contains the source and the other one contains the samples and msi.

May 31, 2010 at 8:59 AM

I have migrated the solution to .NET 4.0, fixed the missing reference to Microsoft.VisualStudio.Editors, updated the install_x64.reg and install_x86.reg registry entries for VS2010, installed the new DLL into the GAC and finally updated the SetNewProxyGenerator.reg registry entry for VS2010...and it looks like it's not simply a matter of rebuilding the dll and configuring everything for VS2010. When I regenerate the proxy the following error occurs:

Error 6 Custom tool error: Failed to generate file: Method not found: 'Microsoft.VSDesigner.WCFModel.VSWCFServiceContractGenerator Microsoft.VSDesigner.WCFModel.VSWCFServiceContractGenerator.GenerateCodeAndConfiguration(Microsoft.VSDesigner.WCFModel.SvcMapFile, System.Configuration.Configuration, System.CodeDom.Compiler.CodeDomProvider, System.String, System.Configuration.Configuration, System.String, System.IServiceProvider, Microsoft.VSDesigner.WCFModel.IContractGeneratorReferenceTypeLoader, Int32, System.Type)'. [MyLocalDirectory]\Reference.svcmap 1 1 [MyDLLName] 

Unfortunately I am not able to spend any more time on this. I hope this generator is updated, I am keen to start working with VS2010 and .NET 4.0.


May 31, 2010 at 9:10 AM

Did you tried the solution i wrote a few posts about? Got the same error, because it still pointed to the old version of Microsoft.VisualStudio.Editors.

Jun 2, 2010 at 8:09 AM

Ah thanks HelmutE, it turns out I was pointing to the old version of Microsoft.VisualStudio.Editors, even though I copied it to the solution directory and added it as a reference from there. The way I resolved that problem is by editing the csproj and csproj.user files to point to the 4.0 version. The proxy now generates.

I have come across 1 issue so far. When generating the proxy for a .NET 3.5 WCF service the following warning is raised:

Warning 1 Custom tool warning: Cannot import wsdl:portTypeDetail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporterError: Referenced type 'System.Type, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' with data contract name 'Type' in namespace 'http://schemas.datacontract.org/2004/07/System' cannot be used since it does not match imported DataContract. Need to exclude this type from referenced types.XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='[MyInterfaceName]'] [MyLocalDirectory]\Reference.svcmap 1 1 [MyDLLName]

It appears the proxy is having trouble with the fact the mscorlib.dll is different between .NET 4 and .NET 3.5. The way I resolved it is by configuring the service reference to not reuse types in the mscorlib assembly.

I will do more thorough testing over the next few days and report any issues I come across.

Oct 9, 2010 at 11:44 PM
Edited Oct 10, 2010 at 4:03 AM

Thanks a bunch!  I managed to install, compile and run successfully on Windows 7 x64.  I was able to get it to work by following the instructions here and googling (sorry, I meant binging) on the topic.  I have three questions:

1. I have to explicitly set  the custom tool field of the reference.svcmap to get it to run.  I don't remember having to do this under VS 2009.

2. What is the correct x64 registry settings?  The one included in the project didn't work for me and the one I created  explicitly references Wow6432Node, which I read was bad practice.

3. How do I contribute my changes to the project?


Here are my registry settings:


Windows Registry Editor Version 5.00

"Assembly"="CustomWcfProxyGenerator, Version=, Culture=neutral, PublicKeyToken=a47c4f0a05463cf9"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Generators\{164B10B9-B200-11D0-8C61-00A0C91E29D5}\Exception Handling WCF Proxy Generator]
@="Exception Handling WCF Proxy Generator"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Generators\{E6FDF8B0-F3D1-11D4-8576-0002A516ECE8}\Exception Handling WCF Proxy Generator]
@="Exception Handling WCF Proxy Generator"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Generators\{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}\Exception Handling WCF Proxy Generator]
@="Exception Handling WCF Proxy Generator"

Oct 11, 2010 at 6:47 AM
Edited Oct 14, 2010 at 10:59 AM

The only way i know is to override the clid entry of the default proxy generator to point to your assembly instead of the standard. But i believe you will also loose the ability to use the default proxy anymore till you redo the changes.

Default is:


Windows Registry Editor Version 5.00

"Assembly"="Microsoft.VisualStudio.Editors, Version=, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a"


new values:


"Assembly"="CustomWcfProxyGenerator, Version=, Culture=neutral, PublicKeyToken=a47c4f0a05463cf9"



For not loosing the default proxy, you could try to creat a new clsid and store the default there and changes the other 3 entrys in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Generators of the default generator to the new clsid so you should be able to use the proxy with explicitly set  the custom tool field of the reference.svcmap. But never tried that and dont know how safe that will be. Was just a idea for a work around :)

Jan 4, 2011 at 12:44 PM

I have migrated the ExceptionHandlingWCFProxyAddIn.sln solution to VS2010, .NET 4.0 and uploaded the zipped ExceptionHandlingWCFProxyAddinSource folder as patch.

It works for me, but if anybody else could give it a try and post some feedback....

Jan 8, 2011 at 7:00 PM

Thanks acryl. I have tried installing it, but it doesn't work for me (it still uses the default proxy generator and no *Proxy class is created). Do I need something more than just run install_x64.reg? I am on Windows 7.

Jan 8, 2011 at 7:02 PM

Of course I also installed the new .dll into gac using gacutil.

Jan 10, 2011 at 7:03 AM

I forgot to say i'm running Win7 64.

Did you chose X86 as solution platform when you built the dll?

I did so because most of VS2010 including devenv.exe is 32 bit as well.

After i ran setup the dll was here:


Did you run SetExceptionHandlingWCFProxyGeneratorAsDefault.reg?

Thanks for trying.

Jan 11, 2011 at 2:36 PM

Ok, good, we are on the same platform.

I was on "Any CPU" on my first try, but I experience the same problem with x86 build.

My dll is placed here: C:\Windows\Microsoft.NET\assembly\GAC_32\ExceptionHandlingWCFProxyAddin\v4.0_1.10.0.0__385b6950f1bca43c\ExceptionHandlingWCFProxyAddin.dll

I did run SetExceptionHandlingWCFProxyGeneratorAsDefault.reg.

I was unable to build the setup project due to build errors. Is it not sufficient to just use "gacutil -i ExceptionHandlingWCFProxyAddin.dll"?

Build errors:


Error 1 File 'webproperties.tlb' cannot be shared in Global Assembly Cache folder; only assemblies are allowed. X:\misc\forks\ExceptionHandlingWCFProxyAddinSource\Setup\Setup.vdproj SetupError 2 File 'vslangproj.olb' cannot be shared in Global Assembly Cache folder; only assemblies are allowed. X:\misc\forks\ExceptionHandlingWCFProxyAddinSource\Setup\Setup.vdproj SetupError 6 File 'dte80a.olb' cannot be shared in Global Assembly Cache folder; only assemblies are allowed. X:\misc\forks\ExceptionHandlingWCFProxyAddinSource\Setup\Setup.vdproj SetupError 7 File 'dte80.olb' cannot be shared in Global Assembly Cache folder; only assemblies are allowed. X:\misc\forks\ExceptionHandlingWCFProxyAddinSource\Setup\Setup.vdproj SetupError 8 File 'vslangproj80.olb' cannot be shared in Global Assembly Cache folder; only assemblies are allowed. X:\misc\forks\ExceptionHandlingWCFProxyAddinSource\Setup\Setup.vdproj Setup

Jan 14, 2011 at 7:02 AM

The setup did not work here as well. I must have changed it accidentally cause it worked here once.

You may fix it by excluding everything in Setup-Detected Dependencies, this is then the original setting from the 2008 project anyway.

Yes, you may use the gacutil.

But then you must run ExceptionHandlingWCFProxyAddin\RegistryEntries\install_x64.reg manually.

It's better to use the setup, cause it will remove everything it installed including the registry settings on uninstall.

Sorry for the hassle, i have fixed the setup and uploaded it into the patches.


Jan 19, 2011 at 8:35 AM

Thanks again for your help acryl.

However, it is still not working for me. I followed these steps:

1) Run setup file (tried both Debug and Release builds, not sure which one I should use)

2) Added new ConsoleApplication projet.

3) Added service reference.

4) ExceptionHandlingProxyBase class was never created.

Is there any implicit steps that I am missing out on?

I am using Visual Studio 2010 Professional (Version: 10.0.30319.1 RTMRel)

Jan 19, 2011 at 1:47 PM

There are just 2 important things which should have happened on your machine when running the setup.

1. The dll should be here C:\Windows\Microsoft.NET\assembly\GAC_32\ExceptionHandlingWCFProxyAddin\v4.0_1.10.0.0__385b6950f1bca43c\ExceptionHandlingWCFProxyAddin.dll
2. The 4 keys in  ExceptionHandlingWCFProxyAddin\RegistryEntries\install_x64.reg should be in the registry

Check 1. with Explorer

Check 2. with regedit

The 3'rd requirement is running SetExceptionHandlingWCFProxyGeneratorAsDefault.reg. Check if the key in there is in the registry, again with regedit.

When these three conditions are met... hm, well i dunno

Jan 19, 2011 at 2:06 PM
Edited Jan 19, 2011 at 2:22 PM


Don't you need a special x64 version to for SetExceptionHandlingWCFProxyGeneratorAsDefault which add the values in Wow6432Node.

And in your install_x64.reg i belive you have to use 


for InprocServer32.

Jan 20, 2011 at 9:36 AM

It is working for me now, thanks both for your help.

Somehow I had introduced a different version of ExceptionHandlingWCFProxyAddin in the GAC. I found it with the command gacutil /l ExceptionHandlingWCFProxyAddin which showed two assemblies with the same public key token, but with different version numbers and architecture.

HelmutE's solution was not needed. These were my steps on a "clean" GAC:

1) Run setup.exe (from Release-folder)

2) Run SetExceptionHandlingWCFProxyGeneratorAsDefault.reg

3) Run install_x64.reg

Jan 20, 2011 at 11:40 AM

@mbp Fine! Thanks for testing.

@HelmutE   Know what you mean. I was surprised that it puts things in the right place even if the script is pointing to somewhere else. But it worked, so i left it this way.

May 24, 2011 at 12:02 PM

Hi, after kicking around , found out how to convert it to VS 2010 , and it works perfectly.
you can download the source and the installation instruction here.