Rename LightSwitch 2013 HTMLClient

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!

  1. Open your solution in Visual Studio 2013
  2. Rename {mySolution}.HTMLClient to your new name {mySolution}.App
  3. Close the solution
  4. Important… Close Visual Studio
  5. Open a Windows Explorer, navigate to your solution folder
  6. In your favorite text editor, open the {mySolution}.sln file
  7. Replace all instances of the name HTMLClient with your new name, App
  8. Save
  9. Next level down, open the {mySolution}.lsxproj file
  10. Replace all instances of the name HTMLClient with your new name, App
  11. Save
  12. Rename the HTMLClient folder to your new name, App
  13. Save
  14. Next level down, in your App folder (old HTMLClient folder)
  15. Open the App.jsproj file, this should already reflect the new name
  16. Replace all instances of the name HTMLClient with your new name, App
  17. Save
  18. Open the ModelManifest.xml file
  19. Replace all \{mySolution}.HTMLClient\ with your new name, App
  20. Save
  21. Start Visual Studio 2013 again, open your solution
  22. Once fully loaded, select Build, Clean Solution
  23. Then select Build, Build Solution
  24. Double click on a screen to validate the editor is still working
  25. Double click on a table also to validate the editor is still working
  26. 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 :)

Tagged , ,

One thought on “Rename LightSwitch 2013 HTMLClient

  1. MSDN Blogs says:

    […] Rename LightSwitch 2013 HTMLClient […]

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 116 other followers

%d bloggers like this: