[#VS2012] Sobre el error raro de #LightSwitch for HTML Client Preview 2 y #ReSharper


image

Buenas,

hace unos días se liberó LightSwitch for HTML Client Preview 2 (el blog oficial aquí y el post aquí), como justo andaba necesitado de algo similar decidí probarlo. Antes del golpazo que me pegué pongo un poco de contexto, LightSwitch está bien. No muy bien, pero bien. En poco tiempo se pueden crear aplicaciones Data Driven que nos sacan de un apuro. Además la publicación en Azure es muy natural y claro, si tienes todo el paquete completo, puedes crear algo en modo demo o mantenimiento en pocos pasos.

Nota: Si piensas que LightSwitch solucionará todos tus problemas, pues estás frito, en una APLICACION REAL, no la típica demo o aplicación de usar y tirar, lo que creas en 15 minutos con LightSwitch no es suficiente, tienes que DEDICARLE MAS TIEMPO Y UN POCO DE SESERA. Ahí quedas advertido.

Como iba diciendo, la Client Preview 1 estaba solo disponible para probar en una máquina virtual, esta versión es más amigable y la podemos instalar como una extensión de Visual Studio 2012. Yo me fui a descargar la versión desde el link oficial y decidí probarla.

Sin embargo al momento de crear mi primer proyecto de prueba, me encontré con el siguiente error:

—————————
Microsoft Visual Studio
—————————
Cannot load the application item provider:\nSequence contains no elements\nThis may indicate the model file is corrupted.
—————————
OK  
—————————

image

Y listo!!! Visual Studio 2012 quedaba más frito que un huevo en pascua. Yo no soy de los que suelen pensar maquinaciones raras cuando algo no funciona, sin embargo esta vez todo me apuntaba a un plan maléfico para reventar una semana que viene siendo eterna … así que me armé de paciencia, comencé a buscar respuestas en internet y nada >> llegó el momento de depurar el IDE.

Nota 2: En mi caso cualquier excusa es buena para hacer un DUMP del IDE de Visual Studio 2012 y depurar cosillas a un nivel debajo de lo normal. No creo que mi búsqueda en BING haya tardado más de 2 segundos, porque he buscado de nuevo y he encontrado mi error reportado y solucionado.

Después de atacharme al IDE y de ver un poco las trazas del mismo, me di cuenta de que el problema estaba en que no hay amistad entre LightSwitch y ReSharper. Así que la solución más recomendable fue desactivar ReSharper desde el menú “Tool // Options” luego seleccionamos ReSharper y lo pausamos.

image

A partir de este momento LightSwitch comenzó a funcionar de perlas y pude seguir probando este new toy.

Descarga: http://go.microsoft.com/fwlink/?LinkID=255924

Forum: http://social.msdn.microsoft.com/Forums/en-US/lightswitchhtml/thread/5c7f5652-4712-4db7-8cd3-e9df4858d4a5

Saludos @ Home

El Bruno

image image image

[# VS2010] On LightSwitch and how works internally with their databases


image47dd1de4

Hi,

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.

image

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

$(SqlExpressInstanceName)

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)"
   3:              ProjectPath="$(MSBuildProjectFullPath)"
   4:              OutputDirectory="Bin\Data"
   5:              SqlExpressInstanceName="$(SqlExpressInstanceName)"
   6:              ExternalDataSources="@(ServerExternalDataSources)"/>
   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"
  10:                          Name="_IntrinsicData"
  11:                          Key="Data Source"
  12:                          Value=".\$(SqlExpressInstanceName)"/>

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:

   1: <PropertyGroup>
   2:   <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
   3:   <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
   4:   <SchemaVersion>2.0</SchemaVersion>
   5:   <ProjectGuid>c3800149-599b-4dbc-ba07-190956453c17</ProjectGuid>
   6:   <OutputType>WinEXE</OutputType>
   7:   <CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
   8:   <RootNamespace>Application5</RootNamespace>
   9:   <AssemblyName>Microsoft.LightSwitch.Server.Host</AssemblyName>
  10:   <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
  11:   <LightSwitchVersion>v1.0</LightSwitchVersion>
  12:   <LightSwitchProjectVersion>v1.0</LightSwitchProjectVersion>
  13:   <Name>Application5</Name>
  14:   <LightSwitchProjectType>LightSwitch</LightSwitchProjectType>
  15:   <GenerateManifests>true</GenerateManifests>
  16:   <SignManifests>false</SignManifests>
  17:   <BaseIntermediateOutputPath>bin</BaseIntermediateOutputPath>
  18:   <ApplicationClientType>Desktop</ApplicationClientType>
  19:   <ApplicationServerType>LocalHost</ApplicationServerType>
  20:   <RequireSecureConnection>true</RequireSecureConnection>
  21:   <AuthenticationType>None</AuthenticationType>
  22:   <ApplicationName>Application5</ApplicationName>
  23:   <AssemblyVersion>1.0.0.0</AssemblyVersion>
  24:   <ServiceDefinitionFile>ServiceDefinition.csdef</ServiceDefinitionFile>
  25:   <ServiceConfigurationFile>ServiceConfiguration.cscfg</ServiceConfigurationFile>
  26:   <SqlExpressInstanceName>.\sqlexpress</SqlExpressInstanceName>
  27: </PropertyGroup>

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 Risa

Greetings @ Here

The Bruno

[#VS2010] Sobre LightSwitch y como trabaja con sus bases de datos internamente


image47dd1de4

Buenas,

desde hace un par de días me estoy dando un baño de Visual Studio LightSwitch. Puede gustarte o no, pero para sacarte de un apuro en la generación de un CRUD rápido, pues es bastante potente. Sin embargo, cuando tienes un ordenador con más versiones de prueba de producto que versiones estables, sueles encontrarte con errores como los siguientes.

Lo primero que me encontré, fue al momento de lanzar mi aplicación de LightSwitch un error relacionado con la versión de 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

Claro, la versión express de Denali que tengo instalada no le gusta a LightSwitch. Así que decidí cambiarla desde la configuración de Visual Studio: “Tools // Options” y luego en la sección “Database Tools // DataConnections”. En mi caso la opción que aparecía era “.\SQLEXPRESS” y esa versión de SQL es la 11.

image

Cambié el valor por una versión 10 de SQL Express que tengo instalada en local, pero tampoco funcionó la aplicación. Lo siguiente fue ir a ver el target de ejecución. Ya que teníamos la ruta del target en

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v1.0\Microsoft.LightSwitch.targets

Pues  veamos que tiene el código del mismo dentro. Me encontré con varias cosas, pero lo que más me llamó la atención era que se utilizaba siempre una propiedad

$(SqlExpressInstanceName)

que no estaba declarada por ningún lado.

   1: <!--The Development Database is built in the same location - Bin\Data - for all configurations.-->

   2: <BuildSchema Inputs="@(LightSwitchModel)"

   3:              ProjectPath="$(MSBuildProjectFullPath)"

   4:              OutputDirectory="Bin\Data"

   5:              SqlExpressInstanceName="$(SqlExpressInstanceName)"

   6:              ExternalDataSources="@(ServerExternalDataSources)"/>

   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"

  10:                          Name="_IntrinsicData"

  11:                          Key="Data Source"

  12:                          Value=".\$(SqlExpressInstanceName)"/>

 

Así que lo siguiente fue editar el proyecto de LightSwitch. Este valor no es configurable por ningún sitio, salvo que edites el archivo de proyecto *.lsproj y dentro del mismo puedes ver algo similar a lo siguiente:

   1: <PropertyGroup>

   2:   <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

   3:   <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>

   4:   <SchemaVersion>2.0</SchemaVersion>

   5:   <ProjectGuid>c3800149-599b-4dbc-ba07-190956453c17</ProjectGuid>

   6:   <OutputType>WinEXE</OutputType>

   7:   <CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>

   8:   <RootNamespace>Application5</RootNamespace>

   9:   <AssemblyName>Microsoft.LightSwitch.Server.Host</AssemblyName>

  10:   <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>

  11:   <LightSwitchVersion>v1.0</LightSwitchVersion>

  12:   <LightSwitchProjectVersion>v1.0</LightSwitchProjectVersion>

  13:   <Name>Application5</Name>

  14:   <LightSwitchProjectType>LightSwitch</LightSwitchProjectType>

  15:   <GenerateManifests>true</GenerateManifests>

  16:   <SignManifests>false</SignManifests>

  17:   <BaseIntermediateOutputPath>bin</BaseIntermediateOutputPath>

  18:   <ApplicationClientType>Desktop</ApplicationClientType>

  19:   <ApplicationServerType>LocalHost</ApplicationServerType>

  20:   <RequireSecureConnection>true</RequireSecureConnection>

  21:   <AuthenticationType>None</AuthenticationType>

  22:   <ApplicationName>Application5</ApplicationName>

  23:   <AssemblyVersion>1.0.0.0</AssemblyVersion>

  24:   <ServiceDefinitionFile>ServiceDefinition.csdef</ServiceDefinitionFile>

  25:   <ServiceConfigurationFile>ServiceConfiguration.cscfg</ServiceConfigurationFile>

  26:   <SqlExpressInstanceName>.\sqlexpress</SqlExpressInstanceName>

  27: </PropertyGroup>

 

En mi caso, cambié la línea 26 por el valor correcto, hice un reload del proyecto y todo funcionó. Pero antes de seguir un par de datos a tener en cuenta

  • Cuando creas un proyecto de LightSwitch siempre tomará el valor configurado en Visual Studio. Si cambias los settings de Visual Studio, este cambio no se refleja en el proyecto.
  • Tanto Visual Studio como LightSwitch tiempre trabajan con un sql local. Y esto que parece un detalle muy simple hace que el nombre de la instancia con el formato “.\INSTANCIA” sea inválido. Hay que poner solo el nombre de la instancia “INSTANCIA”

Bueno a seguir con el mega proyecto Risa

 

Saludos @ Here

El Bruno

   

[VS2010] Visual Studio LightSwitch official launch on 26 July


image

Good,

I’m in it to avoid losing it to me: the launch of the best code generator for applications from business or one of the tools that more noise has been made between the developers Visual Studio 2010 LightSwitch is scheduled for next July 26.

Inspirandome in the original post, I leave these links that can help

 

Greetings @ Barajas

The Bruno

   

Source: http://blogs.msdn.com/b/lightswitch/archive/2011/07/05/visual-studio-lightswitch-2011-is-launching-july-26th.aspx

[VS2010] Lanzamiento OFicial de Visual Studio LightSwitch el próximo 26 de julio


 image

Buenas,

me lo apunto para no perdermelo: el lanzamiento del mejor generador de código para aplicaciones de negocio o de una de las herramientas que más ruido ha hecho entre los developers Visual Studio 2010 LightSwitch está previsto para el próximo 26 de Julio.

Inspirandome en el post original, dejo estos links que pueden ayudar

 

Saludos @ Barajas

El Bruno

   

Fuente: http://blogs.msdn.com/b/lightswitch/archive/2011/07/05/visual-studio-lightswitch-2011-is-launching-july-26th.aspx

[EVENT] Materials of the event Zero Code + Azure + LightSwitch


image47dd1de4

Good,

a small webcast to showcase some of the capabilities of LightSwitch with JuanLu we did yesterday with changed schedules. To him falls the responsibility of sharing examples of code in my case only the slides

These can be downloaded from https://skydrive.live.com/#!/?cid=bef06dffdb192125 & sc = documents & nl = 1 & uc = 1 & id = BEF06DFFDB192125% 213506

Greetings @ Redmond

The Bruno

   

[EVENTO] Materiales del evento Zero Code + Azure + LightSwitch


image47dd1de4

Buenas,

ayer con los horarios cambiados hicimos un pequeño webcast para mostrar algunas de las capacidades de LightSwitch con JuanLu. A él le cae la responsabilidad de compartir los ejemplos de código, en mi caso solo las slides

las mismas se pueden descargar desde https://skydrive.live.com/#!/?cid=bef06dffdb192125&sc=documents&nl=1&uc=1&id=BEF06DFFDB192125%213506

Saludos @ Redmond

El Bruno