Share via


The custom tool 'MSDiscoCodeGenerator' failed" while building projects.

This issue is seen when Visual Studio 2008 is installed using SMS. While trying to update a web reference (WSDL) the error pops up "The custom tool 'MSDiscoCodeGenerator' failed" while building projects"

While facing this issue it is also seen that the Tool Box is there but its empty, Not sure if the Administration Guide is followed to deploy Visual Studio 2008 using SMS. You can always refer to the web link listed to follow the deployment process of Visual Studio 2008

 

Visual Studio 2008 Administration Deployment Guide

Also to come out of this situation one can try reinstalling the Microsoft .Net Compact Framework 3.5

1. Go to Control Panel Add/Remove

2. Select Microsoft .Net Compact Framework 3.5

3. Remove it

.NET Compact Framework 3.5 Redistributable

1. Install the .Net Compact Framework 3.5

2. Also install Power Toys for .NET Compact Framework 3.5

2. Click Start Run and Type devenv /resetskippkgs

3. Star Visual Studio

4. This above command needs to be run only once. This command is use when initially the packages which fail to load and once running this it make sure next time the packages are getting loaded

These above steps should help resolving this issue.

Comments

  • Anonymous
    October 12, 2008
    Hi Joy ! I have the very same problem, & I tried reinstalling the .NET Compact Framework 2 SP2, 3.5 & SQL Server Compact 3.5 SP1 (& then started devenv /resetskippkgs), it didn't change anything to my problem. Do you have any idea ? I got an error message (in French, sorry) that suggest to reinstall SQL Server Compact 3.5 & then devenv /resetskippkgs, but as I said it didn't solve anything. :-

  • Anonymous
    October 14, 2008
    Hi Le, Sorry to respond late as I was on a vacation. Can you mail me more details about the issue and in case you have any screen shot I will be more then happy to help you. Regards Joy

  • Anonymous
    October 14, 2008
    The comment has been removed

  • Anonymous
    October 15, 2008
    Hi Le, Thank you for the detail information. Can you send me your email address. I would be happy to work with you on this. Regards Joy

  • Anonymous
    October 15, 2008
    I just sent you an e-mail. Thanks for your help.

  • Anonymous
    October 19, 2008
    A complete uninstall + registry cleaning (the keys to clean were given by Joy) + a custom application to check everything is perfectly cleaned + reinstallation solved my problem. It took a long time, but now everything works perfectly. Thanks again Joy for your help. :)

  • Anonymous
    October 21, 2008
    The comment has been removed

  • Anonymous
    November 06, 2008
    The comment has been removed

  • Anonymous
    November 17, 2008
    Reinstall the compact framework was  enough for me (after reinstall the visual 2008 3 times) thx a lot!!

  • Anonymous
    November 23, 2008
    i have the same issue, in a mobile project i try to add a web reference. It shows me that MSDiscoCodeGenerator failed. Is there any solution, other then uninstall + reg clean ? ... i tried to uninstal compact framework 3.5 and install again, i got the sql compact server error i reinstalled but the same ... 10x

  • Anonymous
    November 25, 2008
    Hey Mike, Can you update me the error from the event viewer. Regards Joy

  • Anonymous
    January 20, 2009
    Please, I have the same issue. I already follow all the steps that are here, and I still have the error. can anybody help me Best Regards Ricardo

  • Anonymous
    January 20, 2009
    Please, I have the same issue. I already follow all the steps that are here, and I still have the error. can anybody help me Best Regards Ricardo

  • Anonymous
    February 03, 2009
    Hi Joy ! I worked perfectly for me. Thank you Best Regards Mads

  • Anonymous
    July 22, 2009
    Hi Joy! It solved my issue too. Thanks. Hansheng

  • Anonymous
    September 06, 2009
    Is there any other solution to this problem??? i uninstalledinstalled every thing and its still not working : (imitsu@walla.co.il)

  • Anonymous
    September 21, 2009
    Hi It didn't work for me... Please help.......... My problem is that while adding a web reference to a device application , the reference.cs is not getting generated. I am getting the following error message: "The custom tool 'MSDiscoCodeGenerator' failed. Could not retrieve the current project." And while creating a new dataset, the DataSet1.designer.cs is not getting generated .In this case ,I'm getting the following error message: "Custom tool error: Failed to generate code. Object reference not set to an instance of an object." I have VS 2008 SP1 , and Sql CE 3.5 SP1 on my machine. Thanks in advance fatentohme@gmail.com

  • Anonymous
    September 30, 2009
    I alsa had the same problem. I did following to resolve this problem. My code was under source control. And the Settings.Designer.cs file under the Properties are readonly. I removed the read only flag and I was able to add the web references. Hope this helps. Thanks, Neilesh

  • Anonymous
    October 26, 2009
    Worth of reading this posting and comments posted. It worked for me as well. Once again bunch of thanks -Rich

  • Anonymous
    December 09, 2009
    I have the same problem - adding a web reference to any smart device project in visual studio (2008 Professioanl edition) does not create a proxy class (cs file). It just creates map, disco and wsdl files. Referencing the same web service from any other project type (using the full .Net framework as opposed to the compact framework) works just fine. I have uninstalled everything that has anything to do with visual studio and/or the .net framework, deleted the MSVS 9.0 folder, cleaned the registry keys listed above and reinstalled MSVS 2008 Pro. The problem remains. I just need to create the proxy class by any method. I cannot use the wsdl.exe tool because it generates code that relies on the full .Net framework and won't compile in a compact framework project. Please, please help!?!

  • Anonymous
    April 12, 2010
    I had this issue as well, base don some of the discussions here, I tried:

  1. Removing the settings.settings and Settings.Designer.cs files
  2. removing the web reference
  3. adding the reference
  4. unloading the project from the solution 5)reloading the project (not removing/adding)
  5. build project. That worked.
  • Anonymous
    June 29, 2010
    Thank you, Joy, very match. Reinstall .NET Compact Framework 3.5 Redistributable help me success.

  • Anonymous
    July 14, 2010
    For Goodness Sake, A Hotfix! This is really too much, especially since this used to work and simply stopped. Cheers

  • Anonymous
    September 25, 2010
    That solved my issue at last. Thanks

  • Anonymous
    March 09, 2011
    MY suggestion is a complete uninstall + registry clean + installing everything again From what I can gather, there are leftover's from VS2008 beta... no matter, the only solutions out there involved reinstalling, which means lots of time wasted. My recommendation here is to delete any references you have to other projects within your solution and recreate them.

  • Anonymous
    August 08, 2013
    For me also same Issue occurred.  The settings file is having the conflict. after resolving the conflict it worked. So just make sure incase of any file in conflict state/error state.

  • Anonymous
    January 01, 2014
    Hi Joy, I'm Chinese,I see your blog when I seaching the solution about the issue that occurred on my computer.I try as your steps,but the issue occurred agian .Can you help me? My email is 525106433@qq.com.Thank you !

  • Anonymous
    August 10, 2014
    The comment has been removed

  • Anonymous
    April 01, 2015
    I have the same above issue. Tried removing all and a fresh reinstall.  Still the same.