Copied to clipboard

Flag this post as spam?

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


  • blockingHD 5 posts 35 karma points
    Aug 06, 2021 @ 09:36
    blockingHD
    0

    Test projects in Umbraco V9 (RC1)

    Hi all o/

    We have added a few test projects to our Umbraco solution which have a reference to the main Umbraco project. This is causing the 'base' front end folders and files to be generated on the tests running.

    • Is this intended?
    • Even if so is there anything we can do to stop this from happening?

    This is also a problem when trying to separate out sections of the solution into different projects as well due to the need to reference Umbraco.Cms.

    Thanks

  • Bjarke Berg 7 posts 130 karma points hq
    Aug 06, 2021 @ 11:20
    Bjarke Berg
    101

    You should make references to

    Umbraco.Cms.Web.BackOffice 
    

    and/or

    Umbraco.Cms.Web.Website 
    

    depending on that you are testing.

    The Umbraco.Cms package is just a meta-package only having dependencies but no code.

  • blockingHD 5 posts 35 karma points
    Aug 10, 2021 @ 18:53
    blockingHD
    0

    After playing around with your suggestion and looking at some other options I have come across 2 things.

    1. The suggestion of using the base packages is perfect for projects that are referenced by the Umbraco project. (No idea why I didn't just do this!)
    2. This doesn't help for test projects as you need to reference the main Umbraco project. However I found you can use the private asset = contentfiles;analyzers;build;buildTransitive; flag on the reference and that stops those files being generated in 'parent' projects.

    This solves the issue however I am not yet sure of any side effects of doing this.

  • 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