What's new on MySQL for Visual Studio 1.2.0 alpha, part one

MySQL for Visual Studio 1.2.0 was just released the last week. In this post we will make a quick introduction on what's coming up in this new version. 


The 1.2 version of this product intends to make it easier for new users the development of applications bound to MySQL databases, by having new MySQL Project templates inside Visual Studio.

The new features included in this version are:

- A new MySQL project template for Windows Forms
- A new MySQL project template for ASP.NET MVC 3
- A new option to use the ASP.NET Personalization provider with a MySQL database.
- A new option to use the ASP.NET SiteMap provider with a MySQL database.
- Support for multiple versions of Connector/Net.

In this post we'll review the new wizards functionality and the rest of the features will be reviewed in the second part of this post.

MySQL for Visual Studio 1.2.0 Requirements

- Visual Studio 2010, 2012 or 2013 professional edition or higher.
- A MySQL Server running instance. The recommended versions are 5.5.x or 5.6.x
- Connector/Net 6.7.4, or  6.8.3 or 6.9.0 alpha. Download at http://dev.mysql.com/downloads/connector/net/

This version is an alpha release thus is not recommended to be used at any Production environment. It has significant limitations but allows to introduce the new features and how these will work in a more stable version.

MySQL project template for Windows Forms

This feature allows the users to create a simple Windows Forms application by using an existing MySQL database and a table that is bound to a Windows Form. To create a new application using this template, Open the Visual Studio instance and select the Menu File -> New Project. 

If the installation was successful a new MySQL category should exists in the New Project dialog. As is shown in the image 1:

Image 1. 

 The First page of the Wizard allows to configure a database connection, and list all the existing tables. The tables list allows to select one table that will be used for the generation of a  Windows Form bound to this table. The Entity Framework options are currently disabled since these are not fully implemented yet. 

This page is shown in the image number 2. 

 Image 2.

The second page allows to set up basic validation rules based on the Data type. For example a validation for an integer field can set up a valid range's values. Also a default value can be defined, and optionally a field can be flagged as required. See image number 3. 

Image 3. 

After this step the project is ready to be generated. 

The form generated without any changes is shown in the image number 4.

Image 4.

This feature requires that the Connector/Net 6.7.5 or 6.8.3 driver is previously installed in order for it to work properly. 

MySQL project template for ASP.NET MVC

This wizards allows to create an MVC application that includes the MySQL Membership, Profiles and Role ASP.NET providers. Users can easily include these providers in the application after selecting any of the wizard will automatically do the set up to use the selected database. 

The MySQL Membership configuration section allows to set some basics settings like Write Exceptions to Eventlog. When this option is enabled a log with the information of any exception raised will be linked a listener set in the web configuration file of the application. The Require Question and Answer option specifies to the wizard that in the creation of any user a Question and an answer will be required so the user can be created. Otherwise the user will be created just with a user name and a password. By default the length for the password will be 7 characters including at least one numeric char. 
The Create Administrator user option makes that the wizard creates a user with the "administrator" name that has the provided password. If the "Require question and answer" option is checked, a default question and answer will be assigned. 
The Use MySQL Role provider and Profile Provider are optional and will be included only if any of these options are checked.
The first page of this wizard is shown in the image number 5.

Image 5

The second page of the MVC Wizard template includes the options to set up the Entity Data Model information. In this alpha version EF functionality is still in development. 
If the Include Sensitive information on connection string is not checked, the connection string will not include the password information of the user for connecting to the database when this is added to the web configuration file.

 Image 5.1

Once the application is generated the Web site should be ready to use. By entering the user's credentials as shown in the image 6 the Web application is ready to use.

Image 6 shows the Web application running.

Image 6.

Image 7 

This feature requires that the Connector/Net 6.7.5 or 6.8.3 driver is previously installed in order for it to work properly. 

Known issues

After the Windows Forms Wizard creates the Form, if this form is opened in the designer, it shows the following error:

Image 8.

This error is completely resolved after building the application.


This is a sneak preview of what will be shipped in the 1.2 version. There are still significant limitations on this version but we hope you now have a general idea about the main features that are coming in the next major version of the MySQL for Visual Studio product. We love to hear your feedback at the official forum where we answer your questions and look forward to reading your comments.

Quick links

- MySQL for Visual Studio documentation 

- MySQL Community Bugs

- MySQL Forums

Hope you found this information useful.

Happy MySQL/.Net coding! 


Post a Comment:
  • HTML Syntax: NOT allowed

Here's where you'll hear about all the new and fun stuff we are doing with MySQL on Windows.


« June 2016