Skip to main content

LightSwitch HTML Client Tutorial - Contoso Moving

This tutorial walks through building out the mobile client used by Contoso Movers’ planning specialists. This sample was created for Visual Studio 2012, but it will also upgrade and run in Visual Studio 2013.

VB.NET (6.3 MB)
 
 
 
 
 
4.5 Star
(13)
16,367 times
Add to favorites
12/6/2013
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

VB.NET
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>
    </ProductVersion>
    <SchemaVersion>
    </SchemaVersion>
    <ProjectTypeGuids>{01074E5A-9000-460e-AB81-3A9263818D40};{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
    <ProjectGuid>{EE20585E-E574-4852-BFA9-F55200FF8180}</ProjectGuid>
    <OutputType>Library</OutputType>
    <RootNamespace>
    </RootNamespace>
    <AssemblyName>Contoso Moving.Client</AssemblyName>
    <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
    <LightSwitchVersion>v2.0</LightSwitchVersion>
    <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
    <SilverlightApplication>true</SilverlightApplication>
    <SupportedCultures>en-US</SupportedCultures>
    <XapOutputs>true</XapOutputs>
    <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
    <XapFilename>ContosoMoving.Client.xap</XapFilename>
    <XapOutputFile>ContosoMoving.Client.xap</XapOutputFile>
    <SilverlightManifestTemplate>My Project\AppManifest.xml</SilverlightManifestTemplate>
    <SilverlightAppEntry>
    </SilverlightAppEntry>
    <OutOfBrowserSettingsFile>My Project\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
    <EnableOutOfBrowser>False</EnableOutOfBrowser>
    <TestPageFileName>default.htm</TestPageFileName>
    <CreateTestPage>false</CreateTestPage>
    <ValidateXaml>true</ValidateXaml>
    <ThrowErrorsInValidation>false</ThrowErrorsInValidation>
    <LightSwitchProjectType>Client</LightSwitchProjectType>
    <OptionExplicit>On</OptionExplicit>
    <OptionCompare>Binary</OptionCompare>
    <OptionStrict>Off</OptionStrict>
    <OptionInfer>On</OptionInfer>
    <LightSwitchPath Condition=" '$(LightSwitchPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0@InstallDir)</LightSwitchPath>
    <WCFRIASERVICESSDKPath Condition=" '$(WCFRIASERVICESSDKPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WCFRIAServices\v1.0@InstallPath)</WCFRIASERVICESSDKPath>
    <WCFRIASERVICESSDKPath Condition=" '$(WCFRIASERVICESSDKPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\WCFRIAServices\v1.0@InstallPath)</WCFRIASERVICESSDKPath>
    <WCFDATASERVICESInstallPath Condition=" '$(WCFDATASERVICESInstallPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft WCF Data Services\5.0@InstallLocation)</WCFDATASERVICESInstallPath>
    <WCFDATASERVICESInstallPath Condition=" '$(WCFDATASERVICESInstallPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft WCF Data Services\5.0@InstallLocation)</WCFDATASERVICESInstallPath>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <DefineDebug>true</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <MyType>Empty</MyType>
    <OutputPath>bin\Debug\</OutputPath>
    <DocumentationFile>Contoso Moving.Client.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
    <DefineConstants>SILVERLIGHT=1</DefineConstants>
    <UseDesignTimeFeatures>true</UseDesignTimeFeatures>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <DefineDebug>false</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DocumentationFile>Contoso Moving.Client.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
    <DefineConstants>SILVERLIGHT=1</DefineConstants>
    <UseDesignTimeFeatures>false</UseDesignTimeFeatures>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Microsoft.LightSwitch, Version=10.0.11.0, Culture=neutral, PublicKeyToken=8e9329cecb4700e9, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(LightSwitchPath)\LightSwitch\Client\Microsoft.LightSwitch.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="Microsoft.LightSwitch.Base.Client, Version=11.0.0.0, Culture=neutral, PublicKeyToken=8e9329cecb4700e9, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(LightSwitchPath)\LightSwitch\Client\Microsoft.LightSwitch.Base.Client.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="Microsoft.LightSwitch.Client, Version=10.0.11.0, Culture=neutral, PublicKeyToken=8e9329cecb4700e9, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(LightSwitchPath)\LightSwitch\Client\Microsoft.LightSwitch.Client.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="Microsoft.LightSwitch.Client.Internal, Version=10.0.11.0, Culture=neutral, PublicKeyToken=8e9329cecb4700e9, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(LightSwitchPath)\LightSwitch\Client\Microsoft.LightSwitch.Client.Internal.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.LightSwitch.Cosmopolitan.Client">
      <HintPath>..\_Pvt_Extensions\Microsoft.LightSwitch.Cosmopolitan\Client\Reference\Microsoft.LightSwitch.Cosmopolitan.Client.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.LightSwitch.Extensions.Client">
      <HintPath>..\_Pvt_Extensions\Microsoft.LightSwitch.Extensions\ClientGen\Reference\Microsoft.LightSwitch.Extensions.Client.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.LightSwitch.Extensions.Design.Client">
      <HintPath>..\_Pvt_Extensions\Microsoft.LightSwitch.Extensions\Client\DebugOnlyRef\Microsoft.LightSwitch.Extensions.Design.Client.dll</HintPath>
      <ExtensionReferenceType>DebugOnly</ExtensionReferenceType>
    </Reference>
    <Reference Include="Microsoft.LightSwitch.SDKProxy, Version=10.0.11.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(LightSwitchPath)\LightSwitch\Client\Microsoft.LightSwitch.SDKProxy.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.LightSwitch.CodeMarker, Version=11.0.0.0, Culture=neutral, PublicKeyToken=8e9329cecb4700e9, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(LightSwitchPath)\LightSwitch\Client\Microsoft.LightSwitch.CodeMarker.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="Microsoft.LightSwitch.ExportProvider, Version=10.0.11.0, Culture=neutral, PublicKeyToken=8e9329cecb4700e9, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(LightSwitchPath)\LightSwitch\Client\Microsoft.LightSwitch.ExportProvider.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="Microsoft.LightSwitch.ManifestService.Client, Version=11.0.0.0, Culture=neutral, PublicKeyToken=8e9329cecb4700e9, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(LightSwitchPath)\LightSwitch\Client\Microsoft.LightSwitch.ManifestService.Client.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.LightSwitch.Model.Xaml.Client, Version=11.0.0.0, Culture=neutral, PublicKeyToken=8e9329cecb4700e9, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(LightSwitchPath)\LightSwitch\Client\Microsoft.LightSwitch.Model.Xaml.Client.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Data.Services.Client.SL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(WCFDATASERVICESInstallPath)\bin\Silverlight\Microsoft.Data.Services.Client.SL.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="System.ComponentModel.Composition">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="System.ComponentModel.DataAnnotations" />
    <Reference Include="System.Runtime.Serialization">
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="System.ServiceModel" />
    <Reference Include="System.ServiceModel.Extensions" />
    <Reference Include="System.ServiceModel.DomainServices.Client.Web, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(WCFRIASERVICESSDKPath)\v1.0\Libraries\Silverlight\System.ServiceModel.DomainServices.Client.Web.dll</HintPath>
    </Reference>
    <Reference Include="System.ServiceModel.PollingDuplex" />
    <Reference Include="System.ServiceModel.Web.Extensions" />
    <Reference Include="System.Windows" />
    <Reference Include="System.Windows.Browser" />
    <Reference Include="System.Windows.Controls.Data" />
    <Reference Include="System.Windows.Controls" />
    <Reference Include="System.Windows.Controls.Data.Input">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(LightSwitchPath)\Tbd\Client\System.Windows.Controls.Data.Input.dll</HintPath>
    </Reference>
    <Reference Include="System.Windows.Controls.Input" />
    <Reference Include="System.Windows.Controls.Navigation" />
    <Reference Include="System.ServiceModel.DomainServices.Client, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>$(WCFRIASERVICESSDKPath)\v1.0\Libraries\Silverlight\System.ServiceModel.DomainServices.Client.dll</HintPath>
    </Reference>
    <Reference Include="System.Windows.Data" />
    <Reference Include="mscorlib" />
    <Reference Include="system" />
    <Reference Include="System.Core" />
    <Reference Include="System.Net" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Xml.Linq" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\Common\Common.vbproj">
      <Name>Common</Name>
      <Project>{c008ae2b-dced-4411-b6b7-4c014afd9ba1}</Project>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <ModelReference Include="..\Common\Common.vbproj">
      <Visible>false</Visible>
    </ModelReference>
    <ServiceMetadataReference Include="..\Server\Server.vbproj">
      <Visible>false</Visible>
    </ServiceMetadataReference>
  </ItemGroup>
  <ItemGroup>
    <Import Include="Microsoft.VisualBasic" />
    <Import Include="System" />
    <Import Include="System.Linq" />
    <Import Include="System.ComponentModel" />
    <Import Include="System.Collections.Generic" />
    <Import Include="System.IO" />
    <Import Include="System.IO.IsolatedStorage" />
    <Import Include="System.Net" />
    <Import Include="System.Xml" />
    <Import Include="System.Windows" />
    <Import Include="System.Windows.Controls" />
    <Import Include="System.Windows.Documents" />
    <Import Include="System.Windows.Ink" />
    <Import Include="System.Windows.Input" />
    <Import Include="System.Windows.Media" />
    <Import Include="System.Windows.Media.Animation" />
    <Import Include="System.Windows.Shapes" />
    <Import Include="Microsoft.LightSwitch" />
    <Import Include="Microsoft.LightSwitch.Framework" />
    <Import Include="Microsoft.LightSwitch.Framework.Client" />
    <Import Include="Microsoft.LightSwitch.Presentation" />
    <Import Include="Microsoft.LightSwitch.Presentation.Extensions" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="My Project\AssemblyInfo.vb" />
    <Compile Include="UserCode\AppointmentDetail.vb" />
    <Compile Include="UserCode\CreateNewAppointment.vb" />
    <Compile Include="UserCode\CreateNewCustomer.vb" />
    <Compile Include="UserCode\CreateNewEmployee.vb" />
    <Compile Include="UserCode\CreateSampleData.vb" />
    <Compile Include="UserCode\CustomerDetail.vb" />
    <Compile Include="UserCode\EmployeeDetail.vb" />
    <Compile Include="UserCode\Home.vb" />
    <Compile Include="UserCode\RoomDetail.vb" />
  </ItemGroup>
  <ItemGroup>
    <LightSwitchModel Include="My Project\Client.lsml">
      <ProjectCritical>true</ProjectCritical>
    </LightSwitchModel>
    <None Include="My Project\AppManifest.xml" />
    <None Include="My Project\OutOfBrowserSettings.xml" />
    <ClientResource Include="Config.xml" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="DataLogic\" />
    <Folder Include="DataSources\" />
    <Folder Include="Screens\" />
  </ItemGroup>
  <ItemGroup>
    <Resource Include="Resources\ContosoMovingLogo.png" />
  </ItemGroup>
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.VisualBasic.targets" />
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\LightSwitch\$(LightSwitchVersion)\Microsoft.LightSwitch.Build.Tasks.targets" />
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
        <SilverlightProjectProperties />
      </FlavorProperties>
      <FlavorProperties GUID="{01074E5A-9000-460e-AB81-3A9263818D40}" Configuration="Debug|Any CPU">
        <SpecializedConfiguration />
      </FlavorProperties>
      <FlavorProperties GUID="{01074E5A-9000-460e-AB81-3A9263818D40}" Configuration="Release|Any CPU">
        <SpecializedConfiguration />
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
</Project>