Search code examples
c#modelumbracobuilderumbraco8

Umbraco 8 Model builder not unable to find doctype generated file


I am working on an existing Umbraco 8 project and seeing some very strange behaviour. I created a doctype via my localhost and it generated the doctype.generated.cs file added it to visual studio and everything was fine.

When it came to deploy the changes, I went into Model Builder regenerated the models, saw them appear in the folder, went to the page and got the error

The type or namespace named 'Blog' does not exist in the namespace 'Umbraco.Web.PublishedModels' (are you missing an assembly reference?)

I am running the model builder in AppData mode to a custom path so they are not hidden in the AppData folder.

I have tried restarting, changing the mode to PureLive and LiveAppData and still no joy

Any help would be greatly appreciated


Solution

  • One thing that always catches me out, if you are going to use AppData for your Model builder then you need to always copy across the project Dll's, I thought that just because I was updating views i didn't need to worry, how wrong I was.

    Copy across your project Dlls and the error disappears