Click Once Deployment – Improperly Formatted

Error Message:
Cannot continue. The application is improperly formatted. Contact the application publisher for assistance.

Application validation did not succeed. Unable to continue.
Unable to retrieve application files. Files corrupt in deployment.

Solution:
For every project in your solution,

  1. Close your solution
  2. Open every project file in notepad ( csproj for c# projects )
  3. Look for the ToolsVersion attribute
  4. Make sure all projects are using the same ToolsVersion
  5. Save
  6. Load your solution and deploy.
Note: The Target Framework Framework is not the same as Tools Version

I had searched for hours for a solution, so I hope this helps someone else.