VS2013 LightSwitch Jsproj Unsupported Incompatible and could not be loaded

Corrupt Visual Studio 2013 Environment?

The other day whilst testing AIDE for Visual Studio 2013 I came across this problem. At first I thought it was something similar to another VS2010/Vs2012 .LSPROJ launcher problem (Error: this template attempted to load component assembly) but that turned out not to be the case.

Unable to open the following projects: *.jsproj

Unable to open the following projects: *.jsproj

I tried not to panic as my plans for the day started to fall apart. It was most peculiar. Repairing VS2013 crossed my mind but you don’t embark on that route unless you are really have no other option and it has no guarantee of fixing your problem. I had three VS2013 instances running LightSwitch projects with HTML client and they continued to work fine. Try to open another LightSwitch project, #fail. What next? Close one Vs2013 instance, then restart and load the project, #fail. Close everything, reboot, open VS2013 project fail!

Copy project to another machine, open, #success! So as expected projects are ok and not corrupt.

Try something crazy? Debug VS2012 AIDE project running VS2013 experimental instance, load LightSwitch project, #success!

So experimental instance good, standard development instance bad.

ooo

Let us walk through the scenario of what happened for me and how to resolve the problems. To reproduce, try opening three LightSwitch projects within a few seconds one after another. This multi-tasking and multi-threading Visual Studio 2013 start-up just does not work well and the best advice is don’t do it. This likely applies to two or more solutions containing other project types, it is just that I was using LightSwitch projects.

Package did not load correctly!

Package did not load correctly!

The ‘Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectPackage, Microsoft.VisualStudio.ProjectSystem.VS.Implementation, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ package did not load correctly.

The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file ‘…VisualStudio\12.0\ActivityLog.xml’.

This generic message turns out to not be very helpful. Then when you try to open a LightSwitch project:

Failed to load

Project could not be loaded because one or more projects it references failed to load.

This looks like this in solution explorer:

Solution explorer HTML client project incompatible

Solution explorer HTML client project incompatible

The problem stemmed from file contention when more than one Visual Studio instance is loading. Fortunately, the issue can be resolved by encouraging Visual Studio to rebuild its component cache.

Microsoft.VisualStudio.Default.cache

Microsoft.VisualStudio.Default.cache

Locate the ‘Microsoft.VisualStudio.Default.cache’ file in ‘ComponentModelCache’ directory and delete it. Restart one instance of Visual Studio 2013 and it rebuilds the cache and all is well. It is worth noting that there are other details cached here, such as SharePoint and LightSwitch ManifestCache files. You can safely clear out these files too should they ever cause similar Visual Studio environment issues.

I wish I had known about this back when using Visual Studio 2012 lots and resorting to ‘Repair’ several times.

ooo

AIDE 2013 for Visual Studio

AIDE 2013 is the market leading set of productivity power tools for Cloud Business and LightSwitch applications. The only supported way to clone and import/export screens! Local backup/restore and much more. Visualize hard-to-access metadata to complement working with the standard LightSwitch designers.

ooo

Failed upgrades, unloadable projects, old extensions, AIDE for LightSwitch will be there to help you through! Xpert360 consultants have real-world experience of reconstruction and resurrection of corrupt projects. Contact us if your need help troubleshooting your LightSwitch projects.

ooo

Company information: Xpert360 Ltd, founded in 2009, based upon three decades of IT experience, is an Independent Software Vendor and Custom Solution Provider based in the United Kingdom.

Xpert360 Lightning“, “AIDE for LightSwitch“, “AIDE 2013 for Visual Studio” are trademarks of Xpert360 Ltd, copyright 2012 – 2014.

12 responses to “VS2013 LightSwitch Jsproj Unsupported Incompatible and could not be loaded

  1. Thanks a lot! I’ve found your blog entry only after repairing VS (to no avail). It seems the component cache gets corrupted every couple of days without reason (no extension updates installed or so). Very sad.

  2. Pingback: LightSwitch Community and Content Rollup–March 2014 (+//build/) - Visual Studio LightSwitch Team Blog - Site Home - MSDN Blogs

  3. You didn’t say where to find this folder.
    %AppData%\Local\Microsoft\VisualStudio\12.0

  4. So it is, not that I can read it without clicking on the image.

    Anyway, it would have been nice if this trick would have worked for me today when the update to SSDT for SQL Server 2014 has stopped LightSwitch projects from loading, but it didn’t. So, I’m going to have to remove and reinstall Visual Studio, AGAIN.

  5. thank you so much this saved hrs

Leave a comment