Question

I am currently maintaining a Windows Mobile 6 app.

I am trying to update the web reference added, but get the following error: "The custom tool MSDiscoCodeGenerator failed. Could not retrieve the current project."

I removed the .Net Compact Framework 3.5, and re-installed it, also installed the Power Tools for .Net Compact Framework 3.5. This did not help.

I also tried removing the web reference, and adding a new reference. The new web reference was added, but if I try to access the reference in code, I cannot access it.

How can I solve this?

Thanks

Was it helpful?

Solution

Odd sounding error message, but obviously others have gotten it.

From a website here: Web references and 'MSDiscoCodeGenerator' Error

There is a known issue where you can get into this state if settings.settings file ever gets deleted. The fix for this is to open the Settings.settings file (just double-click it). You should see entries similar to the following for you dynamic urls.

_Name____________________|_Type_____________|_Scope_|_Value____
MyApp_localhost_Service  |(Web Service URL) | User  |  http://localhost:2305/WebSite8/Service.asmx

Notice the type field - it needs to be set to "(WebService URL)" - one of the choices in type dropdown. Most likely it is set to be of type String and this causes the error.

Can you try this? We are looking at getting this fixed for SP1 of Visual Studio (it is an issue in the core VS code base so WAP cannot fix it directly.)

OTHER TIPS

I had the same problem on a fresh installation of Visual Studio 2008 plus SP 1 on Windows 10 x64

I followed multiple suggestions on how to fix this so I can't really tell if the last step helped or everything, but I suppose it was the last.

Note: After every step I rebooted and executed devenv /resetskippkgs from a Visual Studio 2008 Command Prompt

  1. Installed Power Toys for .NET Compact Framework 3.5
  2. Reinstalled Compact Framework 3.5 (uninstall, reboot, install)
  3. Installed SQL Server Compact 3.5 (finally updating the web reference worked again)

Prior to the The custom tool MSDiscoCodeGenerator failed. Could not retrieve the current project. error message I got error message that complained about sql server compact missing, so I took this as a hint.

In Control Panel Add/Remove Program SQL Server Compact 3.5 was indeed missing. Possibly because during the initial Visual Studio Setup I excluded Microsoft SQL Server 2005 Express Edition.

After manually installing all three msi files (SSCEDeviceRuntime-deu.msi, SSCERuntime-deu.msi, SSCEVSTools-deu.msi) from the visual studio 2008 dvd \German\VisualStudio2008\Professional\WCU\SSCE and running devenv /resetskippkgs one last time, the problem is gone.

You can generate the client manually using wsdl.exe instead. You only have to specify that no async code is to be generated so that the result will compile on compact framework:

wsdl.exe /protocol:SOAP /out:Reference.cs /parameters:params.xml http://url_to_service?wsdl

Content of params.xml:

<wsdlParameters xmlns="http://microsoft.com/webReference/">
  <webReferenceOptions>
    <codeGenerationOptions>properties</codeGenerationOptions>
  </webReferenceOptions>
</wsdlParameters>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top