Copied to clipboard

Flag this post as spam?

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


  • Owain Williams 411 posts 1216 karma points MVP 3x c-trib
    Mar 24, 2020 @ 11:27
    Owain Williams
    0

    Models - Missing namespace or type.

    The type or namespace name 'Umbraco' could not be found (are you missing a using directive or an assembly reference?)
    

    I know I'm missing something obvious here - I have seen this error before and I just can't remember how I fixed it!

    I have my main ProjectX.Web project and my ProjectX.Core project. I'm using Models Builder API and all works fine locally. But when I check it in and try and build up on Azure DevOps I get a load of these errors. So I know I'm just missing something from the checkin.

      ProjectX.Core\Models\File.generated.cs(15,7): Error CS0246: The type or namespace name 'Umbraco' could not be found (are you missing a using directive or an assembly reference?)
    
    ProjectX.Core\Models\File.generated.cs(16,7): Error CS0246: The type or namespace name 'Umbraco' could not be found (are you missing a using directive or an assembly reference?)
    
    ProjectX.Core\Models\File.generated.cs(17,7): Error CS0246: The type or namespace name 'Umbraco' could not be found (are you missing a using directive or an assembly reference?)
    
    ProjectX.Core\Models\File.generated.cs(18,7): Error CS0246: The type or namespace name 'Umbraco' could not be found (are you missing a using directive or an assembly reference?)
    
    ProjectX.Core\Models\File.generated.cs(19,7): Error CS0246: The type or namespace name 'Umbraco' could not be found (are you missing a using directive or an assembly reference?)
    
    ProjectX.Core\Models\Folder.generated.cs(15,7): Error CS0246: The type or namespace name 'Umbraco' could not be found (are you missing a using directive or an assembly reference?)
    
    ProjectX.Core\Models\Folder.generated.cs(16,7): Error CS0246: The type or namespace name 'Umbraco' could not be found (are you missing a using directive or an assembly reference?)
    
    ProjectX.Core\Models\Folder.generated.cs(17,7): Error CS0246: The type or namespace name 'Umbraco' could not be found (are you missing a using directive or an assembly reference?)
    
    ProjectX.Core\Models\Folder.generated.cs(18,7): Error CS0246: The type or namespace name 'Umbraco' could not be found (are you missing a using directive or an assembly reference?)
    
    ProjectX.Core\Models\Folder.generated.cs(19,7): Error CS0246: The type or namespace name 'Umbraco' could not be found (are you missing a using directive or an assembly reference?)
    
    ProjectX.Core\Models\Image.generated.cs(15,7): Error CS0246: The type or namespace name 'Umbraco' could not be found (are you missing a using directive or an assembly reference?)
    
  • Patrick de Mooij 8 posts 98 karma points c-trib
    Mar 24, 2020 @ 12:44
    Patrick de Mooij
    0

    What steps do you have in Azure DevOps? It sounds like you are missing a nuget restore step.

  • Owain Williams 411 posts 1216 karma points MVP 3x c-trib
    Mar 24, 2020 @ 13:24
    Owain Williams
    0

    That's what I thought too but it's there and it runs without any issue.

Please Sign in or register to post replies

Write your reply to:

Draft