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 Professional 2012. To perform this upgrade, you modify the Lspkg, Client, Client.Design, Common, Design, and Server project files but not the Vsix project file.

NoteNote

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

To upgrade the solution

  1. In Visual Studio Professional 2012, open the solution.

  2. In the Review Project And Solution Changes dialog box, choose the OK button.

    The solution is upgraded.

  3. On the menu bar, choose File, Close Solution.

  4. In the directory that contains the upgraded project files, open the subdirectory for your solution.

    TipTip

    You can find the directory by opening the Properties window and viewing the Path property for your solution.

To modify the Lspkg project file

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

  2. In the <PropertyGroup> section, change the value of the <LightSwitchVersion> property from v1.0 to v2.0, and then save the file.

To modify the Client project file

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

  2. In the <PropertyGroup> section, change the value of the <TargetFrameworkVersion> property from v4.0 to v5.0.

  3. In <LightSwitchPath Condition=" '$(LightSwitchPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0@InstallDir)</LightSwitchPath>, change 10.0 to 11.0.

  4. In the reference to System.ComponentModel.Composition, remove the metadata for Version, Culture, PublicKeyToken, and processorArchitecture so that the result looks like the following example:

    <Reference Include="System.ComponentModel.Composition">
       <Private>False</Private>
    </Reference>
    
  5. In the reference to Microsoft.LightSwitch, remove 1.0 from the <HintPath> property (<HintPath>$(LightSwitchPath)\LightSwitch\1.0\Client\Microsoft.LightSwitch.dll</HintPath>).

  6. In the reference to Microsoft.LightSwitch.Client, remove 1.0 from the <HintPath> property (<HintPath>$(LightSwitchPath)\LightSwitch\1.0\Client\Microsoft.LightSwitch.Client.dll</HintPath>).

  7. In the reference to Microsoft.LightSwitch.SdkProxy, remove 1.0 from the <HintPath> property (<HintPath>$(LightSwitchPath)\LightSwitch\1.0\Client\Microsoft.LightSwitch.SdkProxy.dll</HintPath>).

  8. Save the file.

To modify the Client.Design project file

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

  2. In the <PropertyGroup> section, change the value of the <TargetFrameworkVersion> property from v4.0 to v5.0.

  3. Delete the <LightSwitchPath Condition=" '$(LightSwitchPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\LightSwitch\10.0@InstallDir)</LightSwitchPath> property.

  4. In the <LightSwitchPath Condition=" '$(LightSwitchPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0@InstallDir)</LightSwitchPath> property, change 10.0 to 11.0.

  5. In the reference to System.ComponentModel.Composition, remove the metadata for Version, Culture, PublicKeyToken, and processorArchitecture so that the result looks like the following sample:

    <Reference Include="System.ComponentModel.Composition">
       <Private>False</Private>
    </Reference>
    
  6. In the reference to Microsoft.LightSwitch, remove 1.0 from the <HintPath> property (<HintPath>$(LightSwitchPath)\LightSwitch\1.0\Client\Microsoft.LightSwitch.dll</HintPath>).

  7. In the reference to Microsoft.LightSwitch.Client, remove 1.0 from the <HintPath> property (<HintPath>$(LightSwitchPath)\LightSwitch\1.0\Client\Microsoft.LightSwitch.Client.dll</HintPath>).

  8. Save the file.

To modify the Common project file

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

  2. In the <PropertyGroup> section, change the value of the <TargetFrameworkVersion> property from v4.0 to v5.0.

  3. Delete the <LightSwitchPath Condition=" '$(LightSwitchPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\LightSwitch\10.0@InstallDir)</LightSwitchPath> property.

  4. In <LightSwitchPath Condition=" '$(LightSwitchPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0@InstallDir)</LightSwitchPath>, change 10.0 to 11.0.

  5. In the reference to System.ComponentModel.Composition, remove the metadata for Version, Culture, PublicKeyToken, and processorArchitecture so that the result looks like the following example:

    <Reference Include="System.ComponentModel.Composition">   <Private>False</Private></Reference>
    
  6. In the reference to Microsoft.LightSwitch, remove 1.0 from the <HintPath> property (<HintPath>$(LightSwitchPath)\LightSwitch\1.0\Client\Microsoft.LightSwitch.dll</HintPath>).

  7. Save the file.

To modify the Design project

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

  2. Delete the <LightSwitchPath Condition=" '$(LightSwitchPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\LightSwitch\10.0@InstallDir)</LightSwitchPath> property.

  3. In the <LightSwitchPath Condition=" '$(LightSwitchPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0@InstallDir)</LightSwitchPath> property, change 10.0 to 11.0.

  4. In the reference to Microsoft.LightSwitch, remove 1.0 from the <HintPath> property (<<HintPath>$(LightSwitchPath)\LightSwitch\1.0\Server\Microsoft.LightSwitch.dll</HintPath>).

  5. Save the file.

To modify the Server project

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

  2. Delete the <LightSwitchPath Condition=" '$(LightSwitchPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\LightSwitch\10.0@InstallDir)</LightSwitchPath> property.

  3. In the <LightSwitchPath Condition=" '$(LightSwitchPath)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0@InstallDir)</LightSwitchPath> property, change 10.0 to 11.0.

  4. In the reference to Microsoft.LightSwitch, remove 1.0 from the <HintPath> property (<HintPath>$(LightSwitchPath)\LightSwitch\1.0\Server\Microsoft.LightSwitch.dll</HintPath>).

  5. Save the file.

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

Show: