Copied to clipboard

Flag this post as spam?

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


  • jonok 297 posts 658 karma points
    May 06, 2022 @ 04:28
    jonok
    0

    Build errors when upgrading from v9.3.0 to v9.5.0

    I'm getting an error when upgrading my Umbraco version. I'm not very experienced with .NET core, nuget and upgrading, but I'm pretty sure I ran an upgrade a couple of months ago that worked, but might have been on a different machine.

    When running dotnet build it starts to run like this:

      Determining projects to restore...
      All projects are up-to-date for restore.
      Copying Umbraco content files: C:\Users\Administrator\.nuget\packages\umbraco.cms.staticassets\9.5.0\buildTransitive\..\content\umbraco\**\*.* - #47 files
      Copying Umbraco wwwroot content files: C:\Users\Administrator\.nuget\packages\umbraco.cms.staticassets\9.5.0\buildTransitive\..\content\wwwroot\umbraco\**\*.* - #2513 files
    

    But then lists hundreds of errors like this...

    C:\Websites\Project\appname\publish\umbraco\Data\TEMP\InMemoryAuto\models.generated.cs(19,11): error CS0579: Duplicate 'ModelsBuilderAssembly' attribute [C:\Websites\Project\appname\appname.csproj]
    

    and also errors like this...

    C:\Websites\Project\appname\publish\umbraco\Data\TEMP\InMemoryAuto\models.generated.cs(703,23): error CS0102: The type 'UmbracoMediaAudio' already contains a definition for 'UmbracoBytes' [C:\Websites\Project\appname\appname.csproj]
    

    These are the steps I'm following to do the upgrade:

    dotnet add package Umbraco.Cms
    dotnet add package Umbraco.Cms.Core
    dotnet add package Umbraco.Cms.SqlCe
    dotnet restore
    dotnet build
    

    If anybody has any ideas that might help me then that would be great, as I can't find much information about this error on the web.

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    May 06, 2022 @ 08:44
    Dave Woestenborghs
    100

    Hi jonok,

    Can you clear the folder C:\Websites\Project\appname\publish\umbraco\Data\TEMP on your machine and see if that works.

    Dave

  • jonok 297 posts 658 karma points
    May 09, 2022 @ 01:31
    jonok
    0

    Thanks very much Dave! That worked perfectly.

Please Sign in or register to post replies

Write your reply to:

Draft