I would give a little recap for those that are struggling with making the ModelsBuilder work with Umbraco Cloud and Visual Studio, like me.
I tried looking for UmbracoViewPage on Google, but without success. Now that should work with this post.
In your Web project - not the Core one - you just need to make some changes in the Web.config file:
Make sure ModelsBuilder.Enable is set to true (default):
<add key="Umbraco.ModelsBuilder.Enable" value="true" />
Set the Mode to AppData or LiveAppData.
This will ensure you can use ModelsBuilder with Visual Studio. The only other way is to use the API mode, but that is
a different story. See the above mentioned link for how to do that. So in your Web.config, you should to have:
<add key="Umbraco.ModelsBuilder.ModelsMode" value="AppData" />
Then add the key explained in this tread.
Create a directory called Models in your App_Code folder in the .Web directory of your site. Then add:
<add key="Umbraco.ModelsBuilder.ModelsDirectory" value="~/App_Code/Models/" /> to Web.config.
As said above, this should do the trick! And thanks to Søren for posting this solution in the first place.
Models Builder with Umbraco Cloud?
Is it possible to use the Models Builder with Umbraco Cloud? Here are the issues, as I see them:
You can use the dll mode. That will generate a dll in your bin folder.
Or you can set your output location to App_Code via the Umbraco.ModelsBuilder.ModelsDirectory setting.
https://github.com/zpqrtbnk/Zbu.ModelsBuilder/wiki/Install-And-Configure
I set ModelsDirectory to a folder under App_Code, and it's working well. Thanks for the tip!
Thanks Søren, it worked for me as well.
I would give a little recap for those that are struggling with making the ModelsBuilder work with Umbraco Cloud and Visual Studio, like me. I tried looking for UmbracoViewPage on Google, but without success. Now that should work with this post.
In your Web project - not the Core one - you just need to make some changes in the Web.config file:
<add key="Umbraco.ModelsBuilder.Enable" value="true" />
AppData
orLiveAppData
. This will ensure you can use ModelsBuilder with Visual Studio. The only other way is to use the API mode, but that is a different story. See the above mentioned link for how to do that. So in your Web.config, you should to have:<add key="Umbraco.ModelsBuilder.ModelsMode" value="AppData" />
<add key="Umbraco.ModelsBuilder.ModelsDirectory" value="~/App_Code/Models/" />
to Web.config.As said above, this should do the trick! And thanks to Søren for posting this solution in the first place.
is working on a reply...