Solutions To Two Microsoft Visual Studio 2012 Errors: (1) This version of SQL Server Data Tools is not compatible with the database runtime components installed on this computer. An incompatible DacFx version is installed. – and – (2) WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for ‘jquery’. Please add a ScriptResourceMapping named jquery(case-sensitive).

I wanted to share the solutions to two frequently encountered errors for ASP.Net developers using the Microsoft Visual Studio 2012 development environment:

Error 1:
This version of SQL Server Data Tools is not compatible with the database runtime components installed on this computer
[followed by]
An incompatible DacFx version is installed

Solution 1:
The only way I was able to resolve this was by upgrading to the latest version of both Sql Server Data Tools (SSDT) and DACFx via the following links (the main MSDN links didn’t fix it for me – same problem persisted):
SSDT: http://msdn.microsoft.com/en-us/data/hh297027
DacFx: http://www.microsoft.com/en-us/download/details.aspx?id=35756

Error 2:
WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for ‘jquery’. Please add a ScriptResourceMapping named jquery(case-sensitive).

Solution 2:
First, understand that  UnobtrusiveValidationMode means that the scripting logic for the validation controls is utilized from the server versus in-page scripting. This means you must have the server side script paths defined within your Web application.
However, there are two ways to fix this. Either add the server side script paths, or you can simply turn off unobtrusive validation and utilize the all-client-side in-page (obtrusive) validation scripting.
(1) Adding the jquery script path:
Add the following (Visual Basic .Net code) to your application’s Global.asax class/file (if missing, right-click your web project in Solution Explorer and select ADD>NEW ITEM>select WEB>select GLOBAL APPLICATION CLASS to add it) in the Application_Start event handler:
C#:
ScriptManager.ScriptResourceMapping.AddDefinition(“jquery”, new ScriptResourceDefinition
{
     Path = “~/scripts/jquery-1.7.2.min.js”,
     DebugPath = “~/scripts/jquery-1.7.2.min.js”,
     CdnPath = “http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.1.min.js”,
     CdnDebugPath = “http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.1.js”
});
VB:
Dim oSRD As New ScriptResourceDefinition
With oSRD
     .Path = “~/scripts/jquery-1.7.2.min.js”
     .DebugPath = “~/scripts/jquery-1.7.2.min.js”
     .CdnPath = “http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.1.min.js”
     .CdnDebugPath = “http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.1.js”
End With
ScriptManager.ScriptResourceMapping.AddDefinition(“jquery”, oSRD)

(2) Disable UnobtrusiveValidationMode –
Add the following to your application’s Web.Config file:
<add key=”ValidationSettings:UnobtrusiveValidationMode” value=”None” />

Happy coding!

About NiceTry

Observer of objective truth in pursuit of my personal happiness.
This entry was posted in Computers and Internet and tagged , , , , , , , , , , . Bookmark the permalink.

Leave a comment