Can't Right-Click to Generate Code

Topics: Service Factory Modeling Edition Forum
Nov 10, 2007 at 2:41 AM
I'm at bottom of Page 3 of 15MinuteWalkthrough.pdf and discover I can't right click on the datamodel or servicemodel to generate code. As soon as I right click error popup says "Error HRESULT E_FAIL has been returned from a call to a COM component." The same thing happens if I create a new Service Factory project and add a blank datacontract or servicecontract to it.

OS: Vista (running as Administrator)
VS: 2005 Professional

Any ideas?

Nov 10, 2007 at 4:41 AM
I upgraded my VS 2005 to Team System Developer, and that seems to have fixed the problem. Now when I right click in a model I get "Validate", "Validate All" and "Generate Code". I'm guessing that the inability of VS 2005 Professional to support validation is the reason I couldn't right click at all. If so I consider this a bug: the tool has to generate code no matter what.
Nov 10, 2007 at 7:00 AM
The factory should function exactly the same on VS Pro as it does on VSTS. If this is really the case then it's a bug.

Note that in some cases the generate code menu item is not visible because the model is not in a state where code can be generated.

In addition there is an issue with installing on Vista around menus etc (I don't have the exact details to hand). Are you installing on Vista?

Nov 10, 2007 at 9:52 PM
I am installed on Vista and have the VS2005 Service Pack for Vista, running VS as Administrator.
Nov 10, 2007 at 10:50 PM
Right the issue is actually with the DSL Tools setup. The last thing the installer does is run DEVENV /SETUP. In some cases this doesn't happen late enough so some things don't get configured right.

The workaround is to shut down VS. Run DEVENV /SETUP manually and restart.

Nov 11, 2007 at 12:27 AM
On Vista, you need to run DEVENV /SETUP from the "..\Microsoft Visual Studio 8\Common7\IDE" from within a command prompt that is started with "Run as Administrator" This worked for me.

Nov 11, 2007 at 7:54 AM

This is covered in the Known Issues doc which should be making an appearence shortly.

Nov 12, 2007 at 12:58 PM
os:windows 2003 server
vs:vs 2005 ts
"Validate All" is ok,however,when i clicked "generate code",i got this error:"The argument docData must implement the interface IVsTextStream." I dont know why?Do you have the same error?

Nov 26, 2007 at 4:30 PM

I tried your solution that you sent me and everything went fine. Unfortunatelly I could not repro your issue so my guess is that something went wrong in your binary installation. Assuming that you followed the installation stesp described in the documentation and you have all the prerrequisites in place, I would sugest re installing the binary and try resuming the walkthrough.

To install the Service Factory: Modeling Edition

  1. Ensure that your computer meets the system requirements. You should install the requirements in the order they appear.
  2. If you have installed any previous Service Factory: Modeling Edition community drops, follow the Uninstallation Instructions to remove the previous version.
  3. If you do not have the Visual Studio 2005 SDK version 4 installed, you must install the following installers included with the Service Factory: Modeling Edition download:
    1. DSLToolsRedist.msi
    2. ProjectAggregator2.msi
  4. Install the Web Service Software Factory binary .msi file to your preferred location. It is recommended that you install the source code to a directory with a short path name (for example, C:\Projects\WssfV3Src). This is due to the following known issue with respect to the length of file names.
Nov 26, 2007 at 7:26 PM
>>On Vista, you need to run DEVENV /SETUP from the "..\Microsoft Visual Studio 8\Common7\IDE" from within a
>>command prompt that is started with "Run as Administrator" This worked for me.

This also fixed the problem for me. is this entered as a vista setup issue?