This project is read-only.


Exception while loading an msbuild project


In the current master branch when loading a C# project I get an exception from ProjectFileLoader.cs in GetLoaderForProjectTypeGuid. It tries to read the ProjectTypeGuid which is a string for me and not a string array:
        public static IProjectFileLoader GetLoaderForProjectTypeGuid(Workspace workspace, Guid guid)
            return workspace.Services.FindLanguageServices<IProjectFileLoader>(
                d => ((string[])d["ProjectTypeGuid"]).Any(g => guid == new Guid(g)))
Looking at the history, GetLoaderForProjectFileExtension seems to have been updated but GetLoaderForProjectTypeGuid may have been forgotten?

Changing the delegate to d => (guid == new Guid((string)d["ProjectTypeGuid"]))) fixed that for me.


dcazzulino wrote Jan 3, 2015 at 11:46 PM

Sent PR that fixes this. I've verified it on a clean VM with just VS2012 Update 4.