When creating a new Visual Studio LightSwitch HTML Client, the “powers” have hard coded the naming of what the project names shall be. For the publicly visible HTML Client project the name will be {mySolution}.HTMLClient and your deployed URL will also have the name of {url}/HTMLClient. Obviously not the best scenario for most applications.
If you follow these steps you’ll be successful at not only changing the name of your project in Visual Studio, but also changing the public URL. Replace {mySolution} with the name of your own solution name.
Obligatory Disclaimer… please backup your project/solution before attempting this procedure!
- Open your solution in Visual Studio 2013
- Rename {mySolution}.HTMLClient to your new name {mySolution}.App
- Close the solution
- Important… Close Visual Studio
- Open a Windows Explorer, navigate to your solution folder
- In your favorite text editor, open the {mySolution}.sln file
- Replace all instances of the name HTMLClient with your new name, App
- Save
- Next level down, open the {mySolution}.lsxproj file
- Replace all instances of the name HTMLClient with your new name, App
- Save
- Rename the HTMLClient folder to your new name, App
- Save
- Next level down, in your App folder (old HTMLClient folder)
- Open the App.jsproj file, this should already reflect the new name
- Replace all instances of the name HTMLClient with your new name, App
- Save
- Open the ModelManifest.xml file
- Replace all \{mySolution}.HTMLClient\ with your new name, App
- Save
- Start Visual Studio 2013 again, open your solution
- Once fully loaded, select Build, Clean Solution
- Then select Build, Build Solution
- Double click on a screen to validate the editor is still working
- Double click on a table also to validate the editor is still working
- Run your app (F5)
Your solution and browser should now be using the new name. Yay!!
Does this now open up the possibility of more than 1 HTMLClient? Absolutely!! Especially if you already had the original HTMLClient in source control. Perhaps for another post 🙂
Nicely done!
[…] Rename LightSwitch 2013 HTMLClient […]