CodeConnect/SourceBrowser

Generator does not work after updating Roslyn DLLs

AmadeusW opened this issue · 4 comments

            Generator.Model.WorkspaceModel workspaceModel;
            try
            {
                workspaceModel = UploadRepository.ProcessSolution(solutionPath, repoRootPath);
            }
            catch (ReflectionTypeLoadException ex)
            {
                ViewBag.Error = "Sorry, there was an error processing solution " + Path.GetFileName(solutionPath) + ". ";
                ViewBag.Error += ex.ToString();
                foreach (var item in ex.LoaderExceptions)
                {
                    ViewBag.Error += "\n; " + item.ToString();
                }
                return View("Index");
            }

ex.ToString():

            System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) at System.Reflection.RuntimeAssembly.get_DefinedTypes() at System.Composition.Hosting.ContainerConfiguration.<WithAssemblies>b__0(Assembly a) at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext() at System.Composition.TypedParts.TypedPartExportDescriptorProvider..ctor(IEnumerable`1 types, AttributedModelProvider attributeContext) at System.Composition.Hosting.ContainerConfiguration.CreateContainer() at Microsoft.CodeAnalysis.Host.Mef.MefHostServices.Create(IEnumerable`1 assemblies) at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.CreateMefHostServices() at SourceBrowser.Generator.SolutionAnalayzer..ctor(String solutionPath) at SourceBrowser.Site.Repositories.UploadRepository.ProcessSolution(String solutionPath, String repoRootPath) at SourceBrowser.Site.Controllers.UploadController.Submit(String githubUrl) 

ex.LoaderExceptions[0]:

            System.MissingMethodException: Method not found: 'Boolean Microsoft.Build.Tasks.Hosting.IAnalyzerHostObject.SetAdditionalFiles(Microsoft.Build.Framework.ITaskItem[])'.

https://www.google.ca/search?q=Microsoft.Build.Tasks.Hosting.IAnalyzerHostObject.SetAdditionalFiles

Steps taken:
Updated Visual Studio to CTP4
Restarted the entire machine

In progress:
Repairing MS Build Tools 2013 (installer had repair/uninstall option, because the tools were already there)
Restarting the entire machine

Check out the modules tab of visual studio when the debugger is attached to see the location the dlls are being loaded from (Debug > Windows > Modules). This might give you a bit of info about what is being loaded instead of the version that you want.

You can also use the Fusion log viewer to see where the CLR is trying to load the assemblies from.

Thanks @mattchamb! I've just installed VS 2015 and its corresponding VSSDK. And MSBuild appears to work. I'm still doing some testing and it looks like Fuslog will come in handy!

Generator works after installing VS 2015 and its corresponding SDK.