Closed Matthew-Wise closed 3 years ago
Hi @Matthew-Wise, thanks for raising this.
The first error (CS0234
) is because I missed updating a namespace.
It should be Umbraco.Cms.Web.Common.Views.ContentBlockPreviewView
instead of Umbraco.Web.Mvc.ContentBlockPreviewView
.
Whether that causes the CS0115
error too, I'm not sure.
Strange thing is that I've tested out the Content Blocks preview feature and it doesn't error in the backoffice. 🤔
I'm not sure about the Razor files compiling in the Contentment csproj itself, I haven't added anything to enable/disable that.
I'll fix up the Razor namespace reference during this week. (I'm currently holding the fort at work while others are on holiday this week).
I'm not sure about the Razor files compiling in the Contentment csproj itself, I haven't added anything to enable/disable that.
The csproj change is in my Umbraco project.
I assume it will still all work after the clear and rebuild, I haven't reached a point where I am using Contentment but know Ill need it.
Fixed in Contentment v3.0.0-alpha004.
Which Contentment version are you using?
3.0.0-alpha003
Which Umbraco version are you using? For example: 8.14.1 - don't just write v8
9.0.0-rc001
Bug summary
I am getting the following two errors:
CS0234 The type or namespace name 'Mvc' does not exist in the namespace 'Umbraco.Web' (are you missing an assembly reference?) \obj\Debug\net5.0\Razor\App_Plugins\Contentment\render\ContentBlockPreview.cshtml.g.cs 16 Active
CS0115 'App_Plugins_Contentment_render_ContentBlockPreview.ExecuteAsync()': no suitable method found to override \obj\Debug\net5.0\Razor\App_Plugins\Contentment\render\ContentBlockPreview.cshtml.g.cs
Steps to reproduce
Setup models builder to use anything other than
InMemoryAuto
, I usedSourceCodeAuto
then in the csproj file follow the comment from UmbracoSetting these to true, causes the errors above.
Expected result / actual result
The build does not error unless I have done something stupid like missing a
;
Do you have Umbraco ModelsBuilder enabled?
What browsers are you seeing the problem on?
No response