I get this error everytime I change some properties, generate models and rebuild the project:
Error CS1061 'IHtmlString' does not contain a definition for 'GetContentGrid' and no accessible extension method 'GetContentGrid' accepting a first argument of type 'IHtmlString' could be found (are you missing a using directive or an assembly reference?) SimpleArticle.generated.cs
To fix it, I always have to:
Change Models Builder from AppData to PureLive
Exclude the models folder from the project
Rebuild
Start the project
Change back from PureLive to AppData
Generate the models again in Umbraco backoffice
Include the models folder again
Rebuild the project one more time.
...and the error is gone. Until the next time I wanna generate models.
Any idea what might be causing it or where I should look?
If you are using Models Builder as a separate class library (or perhaps in your main Umbraco set up) and you are using VS2019, there could be an issue with how you set up your initial project. For example, for some reason there are many ways to create class libraries/projects. Make sure that you didn't accidentally select VB instead of c#. Also, installed as a separate class library, you need to choose "Class Library (.NET Framework)" in order to target 4.7.2 .net framework.
Models Builder error after generating models
Hi guys. Umbraco v8.4, Models Builder 8.1
I get this error everytime I change some properties, generate models and rebuild the project:
To fix it, I always have to:
...and the error is gone. Until the next time I wanna generate models.
Any idea what might be causing it or where I should look?
Hi, did you fix it
Hey there, just ran into a similar issue.
If you are using Models Builder as a separate class library (or perhaps in your main Umbraco set up) and you are using VS2019, there could be an issue with how you set up your initial project. For example, for some reason there are many ways to create class libraries/projects. Make sure that you didn't accidentally select VB instead of c#. Also, installed as a separate class library, you need to choose "Class Library (.NET Framework)" in order to target 4.7.2 .net framework.
is working on a reply...