Trying umbraco models builder but having this message:
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 C:\Users\Stéphane\Documents\Development\Umbraco\Zbu\Zbu.ModelsBuilder\Umbraco.ModelsBuilder\ReferencedAssemblies.cs:line 24
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Umbraco.ModelsBuilder.ReferencedAssemblies.<>c.<.cctor>b__2_1() in C:\Users\Stéphane\Documents\Development\Umbraco\Zbu\Zbu.ModelsBuilder\Umbraco.ModelsBuilder\ReferencedAssemblies.cs:line 23
at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Lazy`1.get_Value()
at Umbraco.ModelsBuilder.Umbraco.ModelsBuilderBackOfficeController.GenerateModels(String modelsDirectory, String bin) in C:\Users\Stéphane\Documents\Development\Umbraco\Zbu\Zbu.ModelsBuilder\Umbraco.ModelsBuilder\Umbraco\ModelsBuilderBackOfficeController.cs:line 108
at Umbraco.ModelsBuilder.Umbraco.ModelsBuilderBackOfficeController.BuildModels() in C:\Users\Stéphane\Documents\Development\Umbraco\Zbu\Zbu.ModelsBuilder\Umbraco.ModelsBuilder\Umbraco\ModelsBuilderBackOfficeController.cs:line 35
Have you managed to resolve this issue? I experience the same problem,
it works in dev environment, but after deploying to production server I'm not able to generate models. I found this article, but creating new bindingRedirect
didn't help.
Did you adjust the Web.config file to "AppData" or something else? After that you can generate the models in the "Developer" section in the Umbraco backend. Should do the trick... If not, try to rebuild the solution in Visual Studio.
Today I was facing the same issue, using the "AppData" mode for the ModelsBuilder. The binding redirect seems to work, only I had to use a different version.
In my /bin folder is a System.IO.FileSystem.dll with version 4.0.3.0 so in my case the binding redirect turned out like this:
The same issue in Umbraco 7.15.3 in live invironment, everything is ok in localhost.
I just removed System.IO.FileSystem.dll from bin folder and everything became fine. Actually I don't know why that happened, I checked the pure umbraco solution and there was the same file in bin folder.
Umbraco models builder
Hi all,
Trying umbraco models builder but having this message:
Thanks, Mike
Hi Michael,
Have you managed to resolve this issue? I experience the same problem, it works in dev environment, but after deploying to production server I'm not able to generate models. I found this article, but creating new bindingRedirect didn't help.
https://github.com/zpqrtbnk/Zbu.ModelsBuilder/issues/124
Thanks, Piotr
Hi Mike,
Did you adjust the Web.config file to "AppData" or something else? After that you can generate the models in the "Developer" section in the Umbraco backend. Should do the trick... If not, try to rebuild the solution in Visual Studio.
Kind regards,
Benoit
Hi Piotr,
Today I was facing the same issue, using the "AppData" mode for the ModelsBuilder. The binding redirect seems to work, only I had to use a different version.
In my /bin folder is a System.IO.FileSystem.dll with version 4.0.3.0 so in my case the binding redirect turned out like this:
I actually found the right assembly version by listing all assemblies and filtering on FileSystem:
Greetings,
SSA.
This worked for me! Thanks for posting.
can any one help me after upgrading form 7.14 to 7.15.3 ...a get this error when building models :(
tried everything and nothing any ideas ?
thank you
Angelo
The same issue in Umbraco 7.15.3 in live invironment, everything is ok in localhost.
I just removed
System.IO.FileSystem.dll
frombin
folder and everything became fine. Actually I don't know why that happened, I checked the pure umbraco solution and there was the same file in bin folder.Wondering what went wrond on live environment
is working on a reply...