Sometimes if you attempt to publish the same LightSwitch project to different targets (e.g. first publishing to IIS then publishing to Azure) you can get some weird errors in the publish wizard.  If you have switched your publish targets or if you have manually updated/removed settings from your .lsproj or .lsproj.user file, you can do what I refer to as “declaring publish wizard bankruptcy” to start with a clean slate (i.e. the following will wipe out all previous state the publish wizard was keeping track of):

  1. Close Visual Studio
  2. Make a backup copy of your entire solution directory (I’d rather be safe than sorry)
  3. Delete your .lsproj.user file
  4. Open your .lsproj file in a text editor and remove any of the following settings you see in the first <PropertyGroup> section:


5.  Save this file

6.  Open your project in VS

7.  Attempt to publish, re-specifying all your settings.


So if you ever can’t get publish to work (after it has already worked) try these steps to see if it helps.  Otherwise, I will see you on the forums Smile