New MVVM Light templates with bug fixes

.NET, MVVM, Phone, Silverlight, Technical stuff, Windows Phone, Work, WPF
See comments

The current version of MVVM Light had a couple of issues in the project templates. The most annoying one was causing a problem when creating new projects: The GUIDs used to uniquely identify the project were in fact not re-generated properly every time, and we ended up with the same GUID in every new project. The symptoms are the following: If you side-load an MVVM Light application, and then side-load another one, you will see that the first one is overwritten. Note however that this is only an issue when side-loading applications: The GUIDs are properly re-generated and overwritten by Microsoft during the app approval process.

This was not really an issue with WPF and Silverlight applications (which is why the bug was never found until now), however the Windows Phone uses these GUIDs to check if the application is already installed on the Windows Phone device or not.

I also took this occasion to update the templates with some information in the AssemblyInfo.cs, so that should make it even easier to fill the assembly information.

I just published a new MSI that corrects the issue. You can install the new MSI on top of the existing one. As usual, there is an MSI for MVVM Light V3 and one for MVVM Light V4 beta.

Fixing the issue in existing applications

If you encounter this issue in existing application, you can use the following steps to correct it. Note that I recommend you to follow these steps for every MVVM Light application.

  • Start the GUID generator installed with Visual Studio (open the Start menu and type GUID to find it).
  • In the GUID generator, select the Registry Format.
  • Press the New GUID button and then the Copy button.


  • Open the CSPROJ file in Notepad (or any text editor).
  • Locate the <ProjectGuid> attribute.
  • Select its content and paste the GUID you previously copied.

For Windows Phone projects only, in addition:

  • In the GUID generator, press the New GUID button and then the Copy button.
  • Open the file WMAppManifest.xml (in the Properties folder).
  • Find the ProductID attribute and replace its content with the GUID you previously copied.

Projects exposed to COM

Some project also have a GUID in the AssemblyInfo.cs. Open this file in Visual Studio or in Notepad and check if you can see a GUID there. If there is one, copy a new GUID from the GUID generator and replace the old one with the one you just copied. Be careful to remove the opening ‘{‘ and closing ‘}’.

That’s it

Apologies for this bug, and thanks to everyone who reported it and helped make MVVM Light better.


Previous entry | Next blog entry

Comments for New MVVM Light templates with bug fixes