none
Error: this template attempted to load component assembly ‘Microsoft.LightSwitch.Design.VSTemplateWizard,

    Question

  • Unfortunately, I'm still running into the problem reported at this (meanwhile closed) post.

    Whenever I try to create a new LightSwitch application, I get that Error: this template attempted to load component assembly ‘Microsoft.LightSwitch.Design.VSTemplateWizard, Version=10.0.0.0, Culture=neutral, PublickKeyToken=b03f5f7f11d50a4a', For more information on this problem and how to enable this template, please see documentation on Customising Project Template.

    This does not occur when I open an already existing LightSwitch application.

    Ugh.

    Two workarounds:

    * Repair on VS12: always works, but the repair itself takes about an hour and after a couple of days I run into the issue again.

    * Reuse older LightSwitch projects :-)

    Because of my laziness (don't judge me, my laziness is why I love LightSwitch in the first place ;-)) I stick with option 2, but of course would rather see this issue fixed / find a faster workaround than the repair VS12 option.

    Additional information that might help:

    My OS is still Win7 (not by choice) 

    My laptop has two users, one domain user (day job) and one local user (community fun).

    I have both VS10 as VS12 installed, and especially during my day job I open the large solution that we work on in VS10 while simultaneously opening a "scratchbook" console app in VS12 (because it's so much faster).

    Any help / advice / tests to run / cold beer would be enormously appreciated.

    Keep rocking LS!

    Jan


    It's your story - time to switch on the innovation. || About me || LightSwitch blog

    Wednesday, November 21, 2012 8:41 PM

Answers

  • Okay, we know of an issue where if you install VS2012 and then install our LightSwitch 2011 product that you will hit this exact error.   But in several threads we are seeing that users are hitting this issue over and over again even if they have installed LS 2011 and then VS 2012 second.   What seems to be happening here is somehow the LS 2011 setup is getting "rerun" in some fashion (maybe via windows update changes) which causes the below registry key to get overwritten back to the v10 version. 

    SO, if you hit this issue please in the future, instead of running thru the long repair/reinstall of VS2012 and you do feel confortable making this change yourself, you can just open your registry under HKCR\.lsproj and change the "default" value from "VisualStudio.Launcher.lsproj.10.0" to "VisualStudio.Launcher.lsproj.11.0" as seen below.  This should take care of the problem.


    Robert Schoen (Microsoft Visual Studio LightSwitch Team)

    Tuesday, December 04, 2012 9:41 PM

All replies

  • Not sure how this post ended up in the extensibility forum :-)

    It's your story - time to switch on the innovation. || About me || LightSwitch blog

    Wednesday, November 21, 2012 11:40 PM
  • Hi, this problem has not happened to me since September (Win 7 Ultiate VS20120 & VS2012 + everthing) and my main laptop (Win 8 only VS2012 pro) it has never happened (yet?).

    I figured as you only notice it on creating a new project I am often too far past the point it happened to track back.

    I have hyper-V vm's, checkpoints etc but not encountered it there either at a convenient time.

    Repair always works for me too (usually over lunchtime!).

    I do have an pristine VS2012 LS solution zipped just in case.


    Dave Baker | Xpert360 blog | twitter : @xpert360 Opinions are my own. Please mark as answer if this helps solve your problem.


    • Edited by Xpert360 Thursday, November 22, 2012 9:40 AM
    Thursday, November 22, 2012 9:38 AM
  • Hi Jan,

    This is one annoying issue and I had the same issue over and over because of a Windows update for TFS that was failing and after it attempted to install and failed it seemed to cause the same issue.  Like you a long reinstall fixed it but only to reappear as soon as the bloody Windows Update ran and failed.

    I tried my best to resolve the Windows Update issue but eventually gave up and decided to bite the bullet and migrate from Windows 7 Ultimate to Windows 8 Pro. 

    I went through the paid approach ($50) and it took close to 14 hours but I was pleasantly surprised that it worked with a few issues.  All my applications and settings migrated perfectly.

    Once over to Win 8 this problem is no longer an issue for me. This is likely more to do with the fact I am not running the failing Windows Update. I see from your comments that you may not be able to upgrade, so look to see if there is a Windows Update that is failing.

    On a side note, I really like Windows 8 Pro as my development environment. It did however break my local IIS setting which I still need to resolve.  It has Hyper-V client capabilities directly built into the OS (you do need to enable it to use it though).  One other concern I hit was the VPN client that use to work on Win 7 was not yet supported, so within an hour I created a Hyper-V Win 7 VHD and use that when I need to VPN.

    I hope that helps you out.

    Cheers

    Johnny Larue




    • Edited by JLarue Tuesday, November 27, 2012 11:17 PM
    Tuesday, November 27, 2012 11:12 PM
  • Well bad news ... the issue has just returned to my Windows 8 development environment. 

    This is really annoying!!!!


    Johnny Larue, http://www.softlandingcanada.com

    Monday, December 03, 2012 10:53 PM
  • Hey, do you still have this occuring? 


    Robert Schoen (Microsoft Visual Studio LightSwitch Team)

    Tuesday, December 04, 2012 4:52 PM
  • Johnny

    please can you do the following:

    1.  Do you have the LightSwitch HTML 5 Client Preview 2 installed?

    2. What  Lightswitch project "template" are you using that is hitting this?  Please provide the name of it that you see in the New Project dialog (eg. "LightSwitch Application (Visual Basic)")

    3. How many project templates do you see under LightSwitch in the New Project dialog?

    thanks!


    Robert Schoen (Microsoft Visual Studio LightSwitch Team)

    Tuesday, December 04, 2012 5:00 PM
  • Hi Robert not sure if that question was directed towards Jan or myself... I just re-installed VS 2012 (takes like 2 hours) for like the umpteenth time so I could continue to develop LS within VS 2012 and the problem has gone away once again. 

    The only way I know how to get rid of the issue is to run a re-install, but it is a great pain in the rear.

    I really would like to see this resolved. 

    What can we do to help you figure this out? 


    Johnny Larue, http://www.softlandingcanada.com

    Tuesday, December 04, 2012 5:02 PM
  • 1. I do have the HTML 5 Client Preview 2 but... this issue occurred well before I installed the HTML 5 Client Preview 2.

    2. Both the C# and VB.net templates fail to run when the issue is present. I don't recall if I tried the HTML templates when the issue occurred.

    3. I normally see four templates (Application and Extension Library for both C# and Visual Basic) but as I currently have the Client Preview also installed, I see the two others for HTML C# and Visual Basic


    Johnny Larue, http://www.softlandingcanada.com

    Tuesday, December 04, 2012 5:14 PM
  • I was really hoping to get a look at your new project templates.  I am suspecting that they are getting poluted/corrupted.  TO be clear, I am assuming you were getting the error that Jan mentioned in the first posting (load error for Microsoft.LightSwitch.Design.VSTemplateWizard, Version=10.0.0.0...).

    If you encounter this again, can you please answer the following:

    • Go to your local template cache directory: ...\Microsoft Visual Studio 11.0\Common7\IDE\ProjectTemplatesCache\LightSwitch\1033\DesktopCSharpLightSwitchProjectTemplate.  With Notepad, open the the "LightSwitchProject.vstemplate" file and go to the bottom.  At the bottom you should see the element "<WizardExtension>" which contains assembly info for the VSTemplateWizard.  Please tell me what the "version" value is there. 
    • I suspect that you will see version "10.0.0.0" and not the expected "11.0.0.0". 
    • If you see "10.0.0.0" then please also go to the project non-cache at ...\Microsoft Visual Studio 11.0\Common7\IDE\ProjectTemplates\LightSwitch\1033\DesktopCSharpLightSwitchProjectTemplate\LightSwitchProject.vstemplate (open this file with notepad) and again tell me what version value you see for the VSTemplateWizard. 

    Robert Schoen (Microsoft Visual Studio LightSwitch Team)

    Tuesday, December 04, 2012 5:22 PM
  • Yes it is the exact error that Jan reported as have many others...

    I will report back what I discover.

    Assuming that's what is happening, the next question is why and how do we prevent this?

    Is there something we can run to revert out the invalid templates to the proper ones?


    Johnny Larue, http://www.softlandingcanada.com

    Tuesday, December 04, 2012 5:29 PM
  • Currently both template folders appear correct ...


    Johnny Larue, http://www.softlandingcanada.com

    Tuesday, December 04, 2012 5:57 PM
  • Thanks Johnny,

    I am not clear on the extra templates you are talked about earlier: "Application and Extension Library for both C# and Visual Basic".  Can you tell me where/how you got those templates?  Note - in your images supplied above I do not see those extra templates listed in the "cache or non-cache" folder?   

    I am assuming you have both Lightswitch 2011 and VS 2012 installed here together on the same box. 

    You mentioned "TFS" components and Windows Update - Do you know what TFS bits are attempted with updates?

    Depends on where the "polution" is.  If it is "ONLY" in the TemplateCache folder (other folder is correct still), then you should be able to just run from an elevated (Admin) VS 2012 Command Prompt  the following command which will "rebuild" the template cache based upon what is in the "Non-cache" directory.  The command is "Devenv /setup".  

    thanks

     


    Robert Schoen (Microsoft Visual Studio LightSwitch Team)

    Tuesday, December 04, 2012 6:37 PM
  • So the "template" stuff I listed above is likely not the cause.  Looking further...

    Robert Schoen (Microsoft Visual Studio LightSwitch Team)

    Tuesday, December 04, 2012 9:15 PM
  • Okay, we know of an issue where if you install VS2012 and then install our LightSwitch 2011 product that you will hit this exact error.   But in several threads we are seeing that users are hitting this issue over and over again even if they have installed LS 2011 and then VS 2012 second.   What seems to be happening here is somehow the LS 2011 setup is getting "rerun" in some fashion (maybe via windows update changes) which causes the below registry key to get overwritten back to the v10 version. 

    SO, if you hit this issue please in the future, instead of running thru the long repair/reinstall of VS2012 and you do feel confortable making this change yourself, you can just open your registry under HKCR\.lsproj and change the "default" value from "VisualStudio.Launcher.lsproj.10.0" to "VisualStudio.Launcher.lsproj.11.0" as seen below.  This should take care of the problem.


    Robert Schoen (Microsoft Visual Studio LightSwitch Team)

    Tuesday, December 04, 2012 9:41 PM
  • Thanks Robert I hope this resolves the issue... I will let you know if it does not!

    As this is Jan's thread he can mark this as resolved.

    Cheers


    Johnny Larue, http://www.softlandingcanada.com

    Wednesday, December 05, 2012 2:55 AM
  • Just wanted to report back that this issue did arise shortly after attempting to get the HTML Preview 2 install to work and your instructions to reset via the registry worked like a charm!

    Thanks


    Johnny Larue, http://www.softlandingcanada.com

    Thursday, December 06, 2012 1:18 AM
  • God I luv these fourms.  Saved me tons of time.

    Derek

    Thursday, April 04, 2013 3:01 PM
  • Saved lot of time.

    Thank you,

    Monday, January 27, 2014 3:19 PM