Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Upgrading Projects That Were Created in an Earlier Version

If you create a project by using the LightSwitch Extensibility Toolkit for Visual Studio 2012, you can upgrade that project for further development in Visual Studio 2013. To perform this upgrade, you modify the project files in Notepad or another text editor.

For screen extensions, you may also need to update the control ViewIDs in your code to reflect the new ClientType notation. See LightSwitch Control ViewIDs.

Note Note

Before you upgrade your project, make sure that both the LightSwitch Extensibility Toolkit for Visual Studio 2013 and the Visual Studio 2013 SDK are installed.

To upgrade the solution

  1. In Notepad, open the solution (.sln) file for your extension.

  2. At the top of the file change the # Visual Studio 2011 line to read:

    # Visual Studio 2013
    VisualStudioVersion = 12.0.21005.1
    MinimumVisualStudioVersion = 10.0.40219.1
    
  3. Save the file.

To modify the Lspkg project file

  1. Choose the ProjectName.Lspkg folder, and then open the ProjectName.Lspkg file in Notepad.

  2. In the <Project> tag, change the value of the <ToolsVersion> property from 4.0 to 12.0.

  3. Add the following line immediately below the <Project> tag:

    <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
    
  4. In the <PropertyGroup> section, change the value of the <TargetFrameworkVersion> property from 4.0 to 4.5, and then save the file.

  5. Change the value of the <LightSwitchVersion> property from v2.0 to v4.0, and then save the file.

  6. Save the file.

To modify the Client project file

  1. Choose the ProjectName.Client folder, and then open the ProjectName.Client file in Notepad.

    Note Note

    The Client project may not exist for some extension types.

  2. In the <Project> tag, change the value of the <ToolsVersion> property from 4.0 to 12.0.

  3. Locate the <PropertyGroup> that contains the line:<LightSwitchPath Condition=" '$(LightSwitchPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0@InstallDir)</LightSwitchPath>and replace it with:

    <MicrosoftSdkDir Condition="'$(MicrosoftSdkDir)' == ''">$([System.IO.Path]::Combine($(MSBuildProgramFiles32), 'Microsoft SDKs'))</MicrosoftSdkDir>
    <LightSwitchVersion Condition="'$(LightSwitchVersion)' == ''">v4.0</LightSwitchVersion>
    <LightSwitchSdkPath Condition="'$(LightSwitchSdkPath)' == ''">$([System.IO.Path]::Combine($(MicrosoftSdkDir), 'LightSwitch', $(LightSwitchVersion)))</LightSwitchSdkPath>
    <LightSwitchSdkPath Condition="'$(LightSwitchSdkPath)' != '' and HasTrailingSlash('$(LightSwitchSdkPath)')">$(LightSwitchSdkPath)\</LightSwitchSdkPath>
    
  4. Locate the <ItemGroup> that contains the line <Reference Include=”Microsoft.LightSwitch”> and change the <HintPath> to:

    <HintPath>$(LightSwitchSDKPath)\Client\Microsoft.LightSwitch.dll</HintPath>
    
  5. Locate the <ItemGroup> that contains the line <Reference Include=”Microsoft.LightSwitch.Client”> and change the <HintPath> to:

    <HintPath>$(LightSwitchSDKPath)\Client\Microsoft.LightSwitch.Client.dll</HintPath>
    
  6. Locate the <ItemGroup> that contains the line <Reference Include=”Microsoft.LightSwitch.SdkProxy”> and change the <HintPath> to:

    <HintPath>$(LightSwitchPath)\Client\Microsoft.LightSwitch.SdkProxy.dll</HintPath>
    
  7. Save the file.

To modify the Client.Design project file

  1. Choose the ProjectName.Client.Design folder, and then open the ProjectName.Client.Design file in Notepad.

    Note Note

    The Client.Design project may not exist for some extension types.

  2. In the <Project> tag, change the value of the <ToolsVersion> property from 4.0 to 12.0.

  3. Locate the <PropertyGroup> that contains the line:<LightSwitchPath Condition=" '$(LightSwitchPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0@InstallDir)</LightSwitchPath>and replace it with:

    <MicrosoftSdkDir Condition="'$(MicrosoftSdkDir)' == ''">$([System.IO.Path]::Combine($(MSBuildProgramFiles32), 'Microsoft SDKs'))</MicrosoftSdkDir>
    <LightSwitchVersion Condition="'$(LightSwitchVersion)' == ''">v4.0</LightSwitchVersion>
    <LightSwitchSdkPath Condition="'$(LightSwitchSdkPath)' == ''">$([System.IO.Path]::Combine($(MicrosoftSdkDir), 'LightSwitch', $(LightSwitchVersion)))</LightSwitchSdkPath>
    <LightSwitchSdkPath Condition="'$(LightSwitchSdkPath)' != '' and !HasTrailingSlash('$(LightSwitchSdkPath)')">$(LightSwitchSdkPath)\</LightSwitchSdkPath>
    
  4. Locate the <ItemGroup> that contains the line <Reference Include=”Microsoft.LightSwitch”> and change the <HintPath> to:

    <HintPath>$(LightSwitchSDKPath)\Client\Microsoft.LightSwitch.dll</HintPath>
    
  5. Locate the <ItemGroup> that contains the line <Reference Include=”Microsoft.LightSwitch.Client”> and change the <HintPath> to:

    <HintPath>$(LightSwitchSDKPath)\Client\Microsoft.LightSwitch.Client.dll</HintPath>
    
  6. Save the file.

To modify the Common project file

  1. Choose the ProjectName.Common folder, and then open the ProjectName.Common file in Notepad.

  2. In the <Project> tag, change the value of the <ToolsVersion> property from 4.0 to 12.0.

  3. Locate the <PropertyGroup> that contains the line:<LightSwitchPath Condition=" '$(LightSwitchPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0@InstallDir)</LightSwitchPath>and replace it with:

    <MicrosoftSdkDir Condition="'$(MicrosoftSdkDir)' == ''">$([System.IO.Path]::Combine($(MSBuildProgramFiles32), 'Microsoft SDKs'))</MicrosoftSdkDir>
    <LightSwitchVersion Condition="'$(LightSwitchVersion)' == ''">v4.0</LightSwitchVersion>
    <LightSwitchSdkPath Condition="'$(LightSwitchSdkPath)' == ''">$([System.IO.Path]::Combine($(MicrosoftSdkDir), 'LightSwitch', $(LightSwitchVersion)))</LightSwitchSdkPath>
    <LightSwitchSdkPath Condition="'$(LightSwitchSdkPath)' != '' and !HasTrailingSlash('$(LightSwitchSdkPath)')">$(LightSwitchSdkPath)\</LightSwitchSdkPath>
    
  4. Locate the <ItemGroup> that contains the line <Reference Include=”Microsoft.LightSwitch”> and change the <HintPath> to:

    <HintPath>$(LightSwitchSDKPath)\Client\Microsoft.LightSwitch.dll</HintPath>
    
  5. Save the file.

To modify the Design project

  1. Choose the ProjectName.Design folder, and then open the ProjectName.Design file in Notepad.

    Note Note

    The Design project may not exist for some extension types.

  2. In the <Project> tag, change the value of the <ToolsVersion> property from 4.0 to 12.0.

  3. Add the following line immediately below the <Project> tag:

    <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"/>
    
  4. In the <PropertyGroup> section, change the value of the <TargetFrameworkVersion> property from 4.0 to 4.5, and then save the file.

  5. Locate the <PropertyGroup> that contains the line:<LightSwitchPath Condition=" '$(LightSwitchPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0@InstallDir)</LightSwitchPath>and replace it with:

    <MicrosoftSdkDir Condition="'$(MicrosoftSdkDir)' == ''">$([System.IO.Path]::Combine($(MSBuildProgramFiles32), 'Microsoft SDKs'))</MicrosoftSdkDir>
    <LightSwitchVersion Condition="'$(LightSwitchVersion)' == ''">v4.0</LightSwitchVersion>
    <LightSwitchSdkPath Condition="'$(LightSwitchSdkPath)' == ''">$([System.IO.Path]::Combine($(MicrosoftSdkDir), 'LightSwitch', $(LightSwitchVersion)))</LightSwitchSdkPath>
    <LightSwitchSdkPath Condition="'$(LightSwitchSdkPath)' != '' and !HasTrailingSlash('$(LightSwitchSdkPath)')">$(LightSwitchSdkPath)\</LightSwitchSdkPath>
    
  6. Locate the <ItemGroup> that contains the line <Reference Include=”Microsoft.LightSwitch”> and change the <HintPath> to:

    <HintPath>$(LightSwitchSDKPath)\Client\Microsoft.LightSwitch.dll</HintPath>
    
  7. Locate the reference to Microsoft.LightSwitch.Design.Designer replace it with:

    <Reference Include="Microsoft.LightSwitch.Design.Designer"> 
    <HintPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\LightSwitch\$(LightSwitchVersion)\Microsoft.LightSwitch.Design.Designer.dll</HintPath>
    <Private>False</Private>
    </Reference>
    
  8. Locate the reference to Microsoft.LightSwitch.Model.Xaml and replace it with:

    <Reference Include="Microsoft.LightSwitch.Model.Xaml"> 
    <HintPath>$(LightSwitchSdkPath)\Server\Microsoft.LightSwitch.Model.Xaml.dll</HintPath>
    <Private>False</Private>
    </Reference>
    
  9. Add the following reference immediately after the reference to Microsoft.LightSwitch:   

    <Reference Include="Microsoft.LightSwitchExportProvider">
    <HintPath>$(LightSwitchSdkPath)\Client\Microsoft.LightSwitch.ExportProvider.dll</HintPath>  
    <Private>False</Private>    
    </Reference>
    
  10. Save the file.

To modify the Server project

  1. Choose the ProjectName.Server folder, and then open the ProjectName.Server file in Notepad.

    Note Note

    The Server project may not exist for some extension types.

  2. In the <Project> tag, change the value of the <ToolsVersion> property from 4.0 to 12.0.

  3. Add the following line immediately below the <Project> tag:

    <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
    
  4. In the <PropertyGroup> section, change the value of the <TargetFrameworkVersion> property from 4.0 to 4.5, and then save the file.

  5. Locate the <PropertyGroup> that contains the line:<LightSwitchPath Condition=" '$(LightSwitchPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0@InstallDir)</LightSwitchPath>and replace it with:

    <MicrosoftSdkDir Condition="'$(MicrosoftSdkDir)' == ''">$([System.IO.Path]::Combine($(MSBuildProgramFiles32), 'Microsoft SDKs'))</MicrosoftSdkDir>
    <LightSwitchVersion Condition="'$(LightSwitchVersion)' == ''">v4.0</LightSwitchVersion>
    <LightSwitchSdkPath Condition="'$(LightSwitchSdkPath)' == ''">$([System.IO.Path]::Combine($(MicrosoftSdkDir), 'LightSwitch', $(LightSwitchVersion)))</LightSwitchSdkPath>
    <LightSwitchSdkPath Condition="'$(LightSwitchSdkPath)' != '' and !HasTrailingSlash('$(LightSwitchSdkPath)')">$(LightSwitchSdkPath)\</LightSwitchSdkPath>
    
  6. Locate the <ItemGroup> that contains the line <Reference Include=”Microsoft.LightSwitch”> and change the <HintPath> to:

    <HintPath>$(LightSwitchSDKPath)\Client\Microsoft.LightSwitch.dll</HintPath>
    
  7. Locate the references for System.ServiceModel.DomainServices.Hosting  and System.ServiceModel.DomainServices.Server and remove the Version, Culture, PublicKeyToken and ProcessorArchitecture attributes.

  8. Save the file.

To modify the Vsix project

  1. Choose the ProjectName.Vsix folder, and then open the ProjectName.Vsix file in Notepad.

  2. In the <Project> tag, change the value of the <ToolsVersion> property from 4.0 to 12.0.

  3. Locate the <MinimumVisualStudioVersion> tag and change the value from 11.0 to 12.0

  4. Save the file.

    You should now be able to open the solution in Visual Studio 2013 and continue to develop your extension.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.