Copied to clipboard

Flag this post as spam?

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


  • DonZalmrol 220 posts 833 karma points
    Sep 14, 2022 @ 07:33
    DonZalmrol
    0

    Umbraco 10 Visual Studio build error "Conflicting assets with the same target path"

    It's the first time (ever) I'm trying out the latest Umbraco (V10.2.0) with dotnet core in a new Visual Studio project that is hosted on my own IIS server. After the initial build I receive this error message and can't seems to get it resolved.

    Previous versions I worked with/ on is V7 and V8 (pre dotnet core) and never encountered this error before in Visual Studio.

    Searching the internet doesn't provide much information that helps me out further. It seems there are duplicate files found, but when I remove them from my destination, it "breaks" Umbraco.

    Severity              Code     Description        Project  File        Line       Suppression State
    Error                   Conflicting assets with the same target path 'umbraco/assets/css/canvasdesigner.min.css'. For assets 'Identity: \\Webserver\Share$\LIVE\MyProject\MyProject\wwwroot\umbraco\assets\css\canvasdesigner.min.css, SourceType: Discovered, SourceId: MyProject, ContentRoot: \\Webserver\Share$\LIVE\MyProject\MyProject\wwwroot\, BasePath: _content/MyProject, RelativePath: umbraco/assets/css/canvasdesigner.min.css, AssetKind: All, AssetMode: All, AssetRole: Primary, RelatedAsset: , AssetTraitName: , AssetTraitValue: , CopyToOutputDirectory: Never, CopyToPublishDirectory: PreserveNewest, OriginalItemSpec: wwwroot\umbraco\assets\css\canvasdesigner.min.css' and 'Identity: C:\Users\laurens\.nuget\packages\umbraco.cms.staticassets\10.2.0\staticwebassets\umbraco\assets\css\canvasdesigner.min.css, SourceType: Package, SourceId: Umbraco.Cms.StaticAssets, ContentRoot: C:\Users\laurens\.nuget\packages\umbraco.cms.staticassets\10.2.0\staticwebassets\, BasePath: /, RelativePath: umbraco/assets/css/canvasdesigner.min.css, AssetKind: All, AssetMode: All, AssetRole: Primary, RelatedAsset: , AssetTraitName: , AssetTraitValue: , CopyToOutputDirectory: Never, CopyToPublishDirectory: PreserveNewest, OriginalItemSpec: C:\Users\laurens\.nuget\packages\umbraco.cms.staticassets\10.2.0\staticwebassets\umbraco\assets\css\canvasdesigner.min.css' from different projects. MyProject           C:\Program Files\dotnet\sdk\6.0.400\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets              411        
    

    Did somebody else encountered this before? I need to get it fixed to build my new project to install packages in my Umbraco project.

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Sep 14, 2022 @ 08:03
    Huw Reddick
    2

    try deleting the 'umbraco' folder and rebuilding

  • DonZalmrol 220 posts 833 karma points
    Sep 14, 2022 @ 10:48
    DonZalmrol
    0

    That seems to have fixed it (also needed to delete some additional files)!

    Is it normal that I need to do this each build/rebuild/publish?? Seems odd you would need to do this each build/rebuild/publish...

    For those who have the same issue, how to delete the folder: enter image description here

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Sep 14, 2022 @ 11:55
    Huw Reddick
    0

    not usually, but it may have had something cached it didn't like.

    Does it occur on every build?

  • DonZalmrol 220 posts 833 karma points
    Sep 14, 2022 @ 12:36
    DonZalmrol
    0

    Yeah, it complains about the previously mentioned files, the package (Seotoolkit) I installed and two json files each time I do a build, rebuild or publish.

  • Jeroen Visschers 3 posts 73 karma points
    Apr 18, 2023 @ 11:57
    Jeroen Visschers
    0

    Did you ever find a permanent solution for this. Running into the same issue with a project.

Please Sign in or register to post replies

Write your reply to:

Draft