VS 11 Beta issue: EnvDTE.Project.CodeModel returns null for a project just loaded without open documents

Two of the unit tests of my MZ-Tools add-in failed due to a change in VS 11 Beta that took me a couple of hours to isolate: if your add-in opens a solution and no document is open (for example, because the solution was closed previously with all documents closed), the EnvDTE.Project.CodeModel property returns null. In previous Visual Studio version you could get the code model of a project even if none of its files was opened. It happens that my add-in needs to know the language of the projects of the solution, using the Project.CodeModel.Language property.

At the time of this writing I am waiting for the Visual Studio 11 Beta Performance Part #2 post on the Visual Studio blog that according to Part #1 will explain the changes loading solutions in VS 11 to perform better, which I suspect are related to this issue.

Meantime, here it is the Microsoft Connect bug report that I have opened:

EnvDTE.Project.CodeModel returns null for a project just loaded without open documents
https://connect.microsoft.com/VisualStudio/feedback/details/729987/envdte-project-codemodel-returns-null-for-a-project-just-loaded-without-open-documents#details