Copied to clipboard

Flag this post as spam?

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


  • Pieter Willaert 4 posts 84 karma points
    Sep 02, 2018 @ 12:11
    Pieter Willaert
    0

    More than one type wants to be a model for content type File.

    Hello,

    So i'm pretty new to Umbraco. I made a part of my site yesterday and all worked well. This morning I open the project and get a lot of errors. After resolving these and running my project I get this error when running the program and I don't know what it means or how i can fix it.

    More than one type wants to be a model for content type File

    enter image description here

    How I made the project:

    1. Make a new empty .net app
    2. Copy all the files from umbraco
    3. Add my sql db
    4. I made the models
    5. Went to sleep
    6. Got up openend Visual Studio and included all the folders in the project
    7. Got lot's of errors -> Had to add umbraco.dll back to register
    8. Started the application and bam -> This error

    Any help would be realy appreciated.

  • Sven Geusens 169 posts 881 karma points c-trib
    Sep 06, 2018 @ 10:35
    Sven Geusens
    0

    Hey Pieter, welcome to Umbraco!

    Got up openend Visual Studio and included all the folders in the project

    This is probably the issue. Newer versions of Umbraco use modelsbuilder to create strongly-typed models of your document types.

    Depending on the configuration of your modelsbuilder (in web.config) you might have a dll that contains all your models somewhere and a folder containing the generated .cs files that get build into your webproject.dll

    Do a search on oneofyourdoctypenames.generated.cs and remove the include of the folder containing that file.

  • Pieter Willaert 4 posts 84 karma points
    Sep 18, 2018 @ 19:33
    Pieter Willaert
    0

    Hey Sven, Thank you for the answer. However this did not solve the issue. I ended up starting over. Thanks anyway!

  • James 2 posts 71 karma points
    Jun 06, 2023 @ 10:28
    James
    0

    I am seeing this error now and cannot access back end. Is there a way to get on to fix this? I am new to Umbraco

Please Sign in or register to post replies

Write your reply to:

Draft