Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm building a site in Umbraco 9 and I am struggling because I don't have the usual intellisense for IPublishedContent.
Please can you tell me how I get intellisense to work.
I want to be able to do @Model. and see the available properties etc
What Models Builder mode are you running?
If it is PureLive, it is not expected that you can see the properties from the model in the IDE.
If you run AppData mode, you need to include the files in the project. And then you should have IntelliSense
Ok I will try that, thanks.
How do I change the models builder mode with the appSettings.json?
You can see example in this answer https://our.umbraco.com/forum/umbraco-9/105870-umbraco-9-on-net-core#comment-330183
Thanks but where are the files in the solution that I need to include please? It’s not obvious to me.
The default path is /umbraco/models
But that can be changed on the in the settings too, using the key ModelsDirectory
I've been simply including the files in umbraco/models and setting them to compile. I saw this post and tried setting ModelsDirectory.
I seem to get an error no matter what I put in ModelsDirectory.
Even when I try "ModelsDirectory": "/umbraco/models/" or "ModelsDirectory": "/umbraco/models"
ConfigurationException: Invalid models directory "/umbraco/models/".
Umbraco.Extensions.ModelsBuilderConfigExtensions.GetModelsDirectory(string root, string config, bool acceptUnsafe)
Does the directory need to be a sub-directory of something specific?
That has done the trick, thank you
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted