Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Edgar Rasquin 174 posts 467 karma points
    Aug 23, 2017 @ 10:33
    Edgar Rasquin
    0

    Error in Starterkit

    Umbraco version 7.6.5 assembly: 1.0.6428.37121

    Hi there,

    I have just installed Umbraco version 7.6.5 via NuGet including the brand new starter kit. After compiling and running the site I encountered the following error:

    The type or namespace 'Home' does not exist in the namespace 'Umbraco.Web.PublishedContentModels'

    enter image description here

    I have than dumped everything and started clean all over again with the same result.

    I am just curious to know whether I am the only one experiencing this problem...

    Please let me know Thanks

  • Edgar Rasquin 174 posts 467 karma points
    Aug 24, 2017 @ 07:28
    Edgar Rasquin
    0

    My question is, whether I can ignore those errors as VS builds it without errors or whether it's better not to rely on it since there are other errors as well:

    enter image description here

  • Nik 1413 posts 6212 karma points MVP 3x c-trib
    Aug 24, 2017 @ 07:42
    Nik
    100

    The errors are there in Visual Studio because of the Models Builder. I believe the fresh install has it configured to purelive so when the site runs the models exist, hence no errors.

    The downside, is Visual Studio doesn't provide intelli-sense for the models. In addition I don't believe you'd be able to use them in controllers (I may be mistaken).

    What you can do, is change to Dll, or another mode however Dll mode requires you logging into the back office and generating the models each time you change a document type.

  • Edgar Rasquin 174 posts 467 karma points
    Aug 24, 2017 @ 08:08
    Edgar Rasquin
    0

    Thank you Nik for your reply and suggestion.

    Unfortunately when I switch from "pureLive" to "Dll" the site does not start any more. I get the following error:

    enter image description here

  • Nik 1413 posts 6212 karma points MVP 3x c-trib
    Aug 24, 2017 @ 08:24
    Nik
    0

    Hi Edgar,

    Yep, I would expect that error when you first run the site. The "front end" of the site is going to throw that error until you log into Umbraco and generate the models.

    So, if you go to /umbraco and login, then go to the developers section, one of the tabs at the top reads "Models Builder", if you select that and then click generate models it should resolve the issue.

    This will need to be done each time you create a new document type, or change a document type so the models are up to date.

    Nik

  • Edgar Rasquin 174 posts 467 karma points
    Aug 24, 2017 @ 09:46
    Edgar Rasquin
    0

    Hi Nik,

    great! Thanks for your help.

    What happens when I'm creating new document types in my productive environment once the Website is online? I reckon this is not leading to any problems since it is a conflict within Visual Studio. Am I right?

    I'm just wondering if this method is the best way to handle this issue in Umbraco CMS for this and the future versions or whether there is going to be another solution?

  • Nik 1413 posts 6212 karma points MVP 3x c-trib
    Aug 24, 2017 @ 11:01
    Nik
    2

    Models builder has a variety of different options for it's configuration. Personally, I haven't found my preferred method of using it. What I would do in your situation is possible use DLL mode in my development environment and maybe consider using purelive mode in production.

    To learn more about the different configuration options and behaviours, I'd advise this link: https://github.com/zpqrtbnk/Zbu.ModelsBuilder/wiki

    At some point this will be merged into the main documentation here on Our, but for now it's a great repository of information.

  • Edgar Rasquin 174 posts 467 karma points
    Aug 24, 2017 @ 12:12
    Edgar Rasquin
    0

    That's a good advice. I will stick to the method of running the production in PureLive mode.

    Only problem I came accross now is, that I get an error when I Switch back to PureLive mode. After recompiling and publishing I get the following error on the production Server:

    Compiler Error Message: CS0433: The type 'Umbraco.Web.PublishedContentModels.Home' exists in both 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\b8a17847\1ff0dc10\assembly\dl3\d0cd19b9\00bb796dbc1cd301\Umbraco.Web.PublishedContentModels.DLL' and 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\b8a17847\1ff0dc10\AppWeb_all.generated.cs.8f9494c4.tlkj40i2.dll'

  • blackhawk 313 posts 1367 karma points
    Aug 24, 2017 @ 13:29
    blackhawk
    0

    By looking at your error, trying clearing out the Temp directory located under the /APP_Data folder. Also, recycle your app pool "if" your project is wired up to IIS. And finally rebuilding the project out of Visual Studio.

    These steps may help.

  • Edgar Rasquin 174 posts 467 karma points
    Aug 24, 2017 @ 14:07
    Edgar Rasquin
    0

    Thanks for your reply.

    In the meantime I managed to solve this issue by deleting the Umbraco.Web.PublishedContentModels.dll from the bin folder.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies