Since a couple of days ago I I am giving a bath of Visual Studio LightSwitch. He may like you or not, but to get you out of a tight spot in a fast CRUD generation, as it is quite powerful. However, when you have a computer with more product trial versions that stable versions, you usually find yourself with errors such as the following.
The first thing I found was at the time of launch my LightSwitch application an error related to the version of SQL Server.
1: Error 67 Sql Server version not supported.
2: 11.00.1440 C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v1.0\Microsoft.LightSwitch.targets
Of course, the express version of Denali I have installed doesn’t like to LightSwitch. So I decided to change it from Visual Studio configuration: "Tools / / Options"and then in the section"Database Tools / / DataConnections". In my case the option that appeared was ". SQLExpress" and that version of SQL is the 11.
I changed the value for a 10 version of SQL Express that I have installed in local, but also ran the application. The next thing was to go see the execution target. That had the target path in
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v1.0\Microsoft.LightSwitch.targets)
Because we see that it has the same code inside. I found several things, but what most caught my attention was that always used a property
that it was not declared anywhere.
1: <!--The Development Database is built in the same location - Bin\Data - for all configurations.-->
2: <BuildSchema Inputs="@(LightSwitchModel)"
7: <!--The _IntrinsicData connection string should be updated to use the SQL Express Instance Name
8: from the LightSwitch Project' Property-->
9: <UpdateDataSourceSection ConfigFile="$(OutDir)\web.config"
11: Key="Data Source"
So the next thing was to edit the project of LightSwitch. This value is not configurable through any site, unless you edit the project *.lsproj file and in it you can see something similar to the following:
2: <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
3: <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
In my case, I changed the line 26 by the correct value, did a reload of the project and everything worked. But before going a couple of data to take into account
- When you create a project of LightSwitch always take the value configured in Visual Studio. If you change the settings in Visual Studio, this change is not reflected in the draft.
- Both Visual Studio LightSwitch tiempre working with a local sql. And this seems a very simple detail makes the name of the instance in the format ". \INSTANCIA" is invalid. Should be only the name of the instance "Instance"
Good to go with the mega project
Greetings @ Here