This project is read-only.

Installation failure?

Oct 20, 2009 at 3:35 AM

I downloaded the installer, install it, some options appears on tools menu (like NHydrate settings) but none of them work, nor VS have any new templates.

Is there anything wrong with installer or I missed something?

VS 2008 Team System Edition SP 1 on Windows Seven 64-bit.

Oct 20, 2009 at 5:02 AM

The options only work if you have a model loaded. I am assuming you do not. Please create a blank solution and then right click on the solution and add new item. Select the Model files and create a new model. You will then have an empty model in your solution. From there you import a database or create a model from scratch. Please let me know if you have any issues.

Oct 20, 2009 at 5:31 AM

Done as you said, but the VS popups an alert:


Microsoft Visual Studio
Invalid at the top level of the document.



And nothing is generated =(


Oct 20, 2009 at 7:39 PM

You could also test by downloading the sample project and opening its model. 

Can you send a screen shot of your visual studio environment. 

Is there any way we can do a webex tonight. If so send email to


Oct 20, 2009 at 9:07 PM

Done as you said... when I double click the Northwind.wsgen, the following exception is thrown:

System.Exception: C:\Users\JCKodel\Desktop\NorthwindExample\Northwind.wsgen does not have the correct format. ---> System.FormatException: Input string was not in a correct format.

   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)

   at System.Double.Parse(String s, NumberStyles style, NumberFormatInfo info)

   at System.Double.Parse(String s)

   at Widgetsphere.Generator.Models.Column.XmlLoad(XmlNode node)

   at Widgetsphere.Generator.Models.ColumnCollection.XmlLoad(XmlNode node)

   at Widgetsphere.Generator.Models.Database.XmlLoad(XmlNode node)

   at Widgetsphere.Generator.Models.ModelRoot.XmlLoad(XmlNode node)

   at Widgetsphere.Generator.WidgetsphereGeneratorProject.XmlLoad(XmlNode node)

   at Widgetsphere.Generator.Common.GeneratorFramework.GeneratorHelper.OpenModel(String filePath)

   --- End of inner exception stack trace ---

   at Widgetsphere.Generator.Common.GeneratorFramework.GeneratorHelper.OpenModel(String filePath)

   at Widgetsphere.Generator.Common.Forms.ModelTree.LoadFile(String filePath)

   at Widgetsphere.VsCodeTools.ModelTreeEditor.Load(String pszFilename, UInt32 grfMode, Int32 fReadOnly)


A detail I didn't said before: although my Windows is english, my current globalization configuration is set to Brazilian Portuguese.

When I set the data/time/number format for English (United States), the sample work fine, but a new blank solution still doesn't work:


Microsoft Visual Studio
Invalid at the top level of the document.



When we create a new model file, which file is used for its template?

Oct 20, 2009 at 9:47 PM

CodeTools is going to reply with a solution to the C:\Users\JCKodel\Desktop\NorthwindExample\Northwind.wsgen problem


I wanted to explain the code around new model file.

It is actually not a template The following code is run. when you click the new model file button

Line: 30 - WidgetSphere.VsCodeTools2008\CreateModelWizard.cs 

Start the New Model Form

Line: 24 - Widgetsphere.Generator.Common\Forms\NewModelForm.cs

1. Inspect for classes that implement IGenerator. This is done by looping through all dlls and classes in the installation directory. We have only implemented one type of model at this point in time.

Example Class:



	[GeneratorAttribute("{4B5CFCAF-C668-4d40-947C-83B2AAEBB2B5}", "Widgetsphere Model", typeof(Widgetsphere.Generator.Forms.ModelPropertiesControl))]

	public class WidgetsphereGeneratorProject : IGenerator, IXMLable

2. Fill a drop down with the choices. Based on attribute description



3.  User Chooses then the Generator Control specified in the attribute above is added to the control typeof(Widgetsphere.Generator.Forms.ModelPropertiesControl) in example above.

4. The control must inherit from the abstract class NewModelBaseControl. As such if implements the abstract member.



public abstract Widgetsphere.Generator.Common.GeneratorFramework.IGenerator GeneratorProject { get; }

This leads us to the following
Line: 71-75  - Widgetsphere.Generators\Forms\ModelPropertiesControl.cs - (This is where a new Widgetsphere Generator Project is created. The created project is what gets saved and loaded from disk to a file.



Oct 25, 2009 at 1:09 AM

We have found one thing that might cause this issue. If you do not have VS.NET Service Pack 1 installed, this might happen. There is a work around. Please see the following article.


Oct 28, 2009 at 10:51 PM

There is a new installation that does not have this issue. The new model is created a bit differently now. Please get the latest version and when you create a model a wizard is shown that walks you through importing a model from a database.

Nov 5, 2009 at 2:44 AM

We found that some non-US locales did have an issue loading the model. We have tested this on several machines with European settings and the models appear to create and load fine now.