Rename HTML Client Project in LightSwitch

LightSwitch Client Sub-Project Names

When you create a LightSwitch project using the desktop application template you can upgrade the project (to LightSwitch V3) and then add a new HTML client whilst specifying a custom name for it. That works.

However, if you create a project from the HTML template, the client name is always ‘HTMLClient’. The designer will not allow you to rename it or remove the client (it does for the Silverlight client).

Before manually editing the JSPROJ file please do take a backup.

To rename a HTML client:

Close Visual Studio or just unload the LightSwitch project.

  • Then locate and edit the XML in the client project’s JSPROJ file.
  • Change: <ClientProjectName>CoreHtmlClient</ClientProjectName>
  • Change: <LightSwitchDisplayName>CoreHtmlClient</LightSwitchDisplayName>

The new client sub-project name will appear in the designer, the project will build and the new name will appear in the HTML client URL.


One response to “Rename HTML Client Project in LightSwitch

  1. That worked 🙂 Make sure to also edit this line in web.config in server project:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s