starter kit page is in 'InMemoryAuto' mode, I cannot change it to 'SourceCodeManual'
Hi I've been following the guide in this video series, which is quite good.
It basically involves setting up a project with the umbraco starter kit, and then having a bit of a walkthrough of how the models inside the cms maps to the models of the asp.net solution.
But when I go into settings> models builder I see this:
ModelsBuilder is enabled, with the following configuration:
The models mode is 'InMemoryAuto'. Strongl ...
ok, So I just need to find out how to disable this mode. I find this article. Seems simple enough, just edit the appsettings.json file.
And then I try to run again. which gives me this error:
The type or namespace name 'Home' could not be found (are you missing a using directive or an assembly reference?)
public class Views_home : Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Home>
Which makes sense, because it is looking for .cs files that are not there.
How do I get out of this catch-22? and actually get some models that I can look at?
My recommendation would be to comment our any references that you may have in your code to anything related to the InMemoryAuto mode (In this case, the Home doctype), so that you can safely build and run your application, in order to then run the ModelsBuilder from within the backoffice in SourceCodeManual mode!
Hmm, I feel that this leaves me in a chickednor the egg situation.
I want to use the starter kit template. I can't build the project unless I remove basically all the code in the razor pages related to the starter kit.
I could just remove all the starter kit code, but then I would not have the starter kit, which is what I want
I now tried it out. Pretty much deleting everything in the generated views, running the application in SourceCodeManual mode.
I could then generate the models from the backoffice.
I then tried shutting the application down again, and pasting the deleted stuff into the views again.
This now fails because it does not have access to the same models:
RuntimeBinderException: 'Umbraco.Cms.Core.Models.ContentModel' does not contain a definition for 'HeroBackgroundImage'
So, the generated models do not seem to the replacealbe with the ones from Inmemorymode. Also they have completely different names.
Is this the intended usage of the starter kit? or how is it supposed to work?
starter kit page is in 'InMemoryAuto' mode, I cannot change it to 'SourceCodeManual'
Hi I've been following the guide in this video series, which is quite good. It basically involves setting up a project with the umbraco starter kit, and then having a bit of a walkthrough of how the models inside the cms maps to the models of the asp.net solution.
But when I go into settings> models builder I see this:
ok, So I just need to find out how to disable this mode. I find this article. Seems simple enough, just edit the appsettings.json file.
So I add this to appsettings.json:
And then I try to run again. which gives me this error:
Which makes sense, because it is looking for .cs files that are not there.
How do I get out of this catch-22? and actually get some models that I can look at?
Hi Ask,
My recommendation would be to comment our any references that you may have in your code to anything related to the InMemoryAuto mode (In this case, the Home doctype), so that you can safely build and run your application, in order to then run the ModelsBuilder from within the backoffice in SourceCodeManual mode!
Kind regards,
Corné
Hmm, I feel that this leaves me in a chickednor the egg situation.
I want to use the starter kit template. I can't build the project unless I remove basically all the code in the razor pages related to the starter kit.
I could just remove all the starter kit code, but then I would not have the starter kit, which is what I want
I now tried it out. Pretty much deleting everything in the generated views, running the application in SourceCodeManual mode.
I could then generate the models from the backoffice.
I then tried shutting the application down again, and pasting the deleted stuff into the views again.
This now fails because it does not have access to the same models:
So, the generated models do not seem to the replacealbe with the ones from Inmemorymode. Also they have completely different names.
Is this the intended usage of the starter kit? or how is it supposed to work?
is working on a reply...