modelsbuilder / ModelsBuilder.Original

The Community Models Builder for Umbraco
MIT License
114 stars 49 forks source link

Missing reference DLL when generating DLL #23

Closed kjac closed 9 years ago

kjac commented 9 years ago

Hi!

ModelsBuilder 2.0.2 (installed from the Our package) seems to be missing a referenced DLL (Microsoft.CodeAnalysis.Desktop, Version=0.7.0.0). The installer did warn me about this reference issue, and surely - when I attempt to use the ModelsBuilder to build a DLL, it fails with this error:

System.IO.FileLoadException: Could not load file or assembly 'Microsoft.CodeAnalysis.Desktop, Version=0.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at Zbu.ModelsBuilder.Building.Compiler.GetCompilation(String assemblyName, IDictionary2 files, SyntaxTree[]& trees) at Zbu.ModelsBuilder.Building.CodeParser.Parse(IDictionary2 files, IEnumerable`1 referencedAssemblies) at Zbu.ModelsBuilder.AspNet.ModelsBuilderApiController.GenerateModels(String appData, String bin) at Zbu.ModelsBuilder.AspNet.ModelsBuilderApiController.BuildModels()

I've tried installing Microsoft.CodeAnalysis from NuGet without luck (possibly because the current NuGet version of Microsoft.CodeAnalysis.Desktop.dll is 1.0.0.41031).

Any advice?

zpqrtbnk commented 9 years ago

Confirmed. The Umbraco Package on Our currently is missing a few Roslyn DLLs. My mistake.

Will see if I can update the 2.0.2 package ASAP else will have to release a 2.0.3. And no, you probably cannot get the proper DLLs from NuGet because at the moment MS is releasing new versions every other day ;-)

Though you might try to install the ModelsBuilder libraries from NuGet.

zpqrtbnk commented 9 years ago

Have fixed the package - still has the same version (2.0.2) - should be OK now.

kjac commented 9 years ago

It works, thanks :)

cssandstuff commented 9 years ago

any idea what this error might be? Have tried upgrading to 2.0.2 using the dlls you provided

{"Message":"An error has occurred.","ExceptionMessage":"Method not found: 'Void Microsoft.CodeAnalysis.CSharp.CSharpParseOptions..ctor(Microsoft.CodeAnalysis.CSharp.LanguageVersion, Microsoft.CodeAnalysis.DocumentationMode, Microsoft.CodeAnalysis.SourceCodeKind, System.Collections.Generic.IEnumerable`1<System.String>)'.","ExceptionType":"System.MissingMethodException","StackTrace":"   at Zbu.ModelsBuilder.Building.Compiler.GetCompilation(String assemblyName, IDictionary`2 files, SyntaxTree[]& trees)\r\n   at Zbu.ModelsBuilder.Building.CodeParser.Parse(IDictionary`2 files, IEnumerable`1 referencedAssemblies)\r\n   at Zbu.ModelsBuilder.AspNet.ModelsBuilderApiController.GetModels(GetModelsData data)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.<GetExecutor>b__c(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n   at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)"}
ZbuModelsBuilder:    at Zbu.ModelsBuilder.AspNet.ModelsBuilderApi.EnsureSuccess(HttpResponseMessage result)
cssandstuff commented 9 years ago

scrap that, it worked. must have had some old dll versions, have recopied and it works!