modelsbuilder / ModelsBuilder.Original

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

Problem Building Models #158

Closed georgioua closed 6 years ago

georgioua commented 7 years ago

Failed to build models. The type initializer for 'File' threw an exception.

at Roslyn.Utilities.FileUtilities.OpenFileStream(String path) at Microsoft.CodeAnalysis.MetadataReference.CreateFromFile(String path, MetadataReferenceProperties properties, DocumentationProvider documentation) at Umbraco.ModelsBuilder.ReferencedAssemblies.<>c.<.cctor>b__2_2(String x) in X:\Projects\Umbraco\ModelsBuilder\Zbu.ModelsBuilder\Umbraco.ModelsBuilder\ReferencedAssemblies.cs:line 24 at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.ModelsBuilder.ReferencedAssemblies.<>c.<.cctor>b__2_1() in X:\Projects\Umbraco\ModelsBuilder\Zbu.ModelsBuilder\Umbraco.ModelsBuilder\ReferencedAssemblies.cs:line 23 at System.Lazy1.CreateValue() at System.Lazy1.LazyInitValue() at System.Lazy`1.get_Value() at Umbraco.ModelsBuilder.Umbraco.ModelsBuilderBackOfficeController.GenerateModels(String modelsDirectory, String bin) in X:\Projects\Umbraco\ModelsBuilder\Zbu.ModelsBuilder\Umbraco.ModelsBuilder\Umbraco\ModelsBuilderBackOfficeController.cs:line 108 at Umbraco.ModelsBuilder.Umbraco.ModelsBuilderBackOfficeController.BuildModels() in X:\Projects\Umbraco\ModelsBuilder\Zbu.ModelsBuilder\Umbraco.ModelsBuilder\Umbraco\ModelsBuilderBackOfficeController.cs:line 35

georgioua commented 7 years ago

@zpqrtbnk

georgioua commented 7 years ago

@zpqrtbnk

zpqrtbnk commented 7 years ago

Which version of ModelsBuilder / Umbraco are you running? Do you have any kind of "exotic" assembly in ~/bin? This usually happens when one of the referenced assembly ends up not existing, or other weird situation, but I thought we'd taken care of these situations by now.