Copied to clipboard

Flag this post as spam?

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


  • Steve Morgan 1349 posts 4459 karma points c-trib
    Nov 26, 2015 @ 12:13
    Steve Morgan
    0

    Umbraco VS - Two Separate Projects, both reference Umbraco and each other

    Hi,

    How do you set up a Visual Studio solution which has:

    MySite.Core <- MVC and helper classes. MySite.Site <- Umbraco goodness

    I've picked up projects like this and it's a nice way of working, I'd like to be able to create my own solutions like this but I can't seem to make it work.

    Here's what I've tried:

    • Create the two projects
    • nuget Umbraco into .Site.
    • Add a reference to the project from Site to Core

    So far everything looks good in the Site dependencies but in .Core I'm missing all references for Umbraco. If I try to add a reference back I get to Site I get a circular reference warning which makes sense....

    The standard C# interview question answer is to create a middle project which is the bridge but I've seen it with just two projects in the solution (and indeed the Hybrid Framework worked like this).

    I'm sure I'm missing some obvious trick with a global reference or some such... I have looked at the Hybrid Framework but can't see what the trick is as all the references to Umbraco are listed in both .Core and .Site?!? Surely I don't install Umbraco via Nuget into the .Core too?

    This is really annoying me so any help appreciated!

    Steve

  • Steve Morgan 1349 posts 4459 karma points c-trib
    Nov 26, 2015 @ 12:39
    Steve Morgan
    102

    Wait... do I just Nuget UmbracoCmsCore?

    https://www.nuget.org/packages/UmbracoCms.Core/

    Seems to build...

  • Carl Jackson 139 posts 478 karma points
    Nov 26, 2015 @ 12:41
    Carl Jackson
    0

    Yep.

    UmbracoCMS in the project marked as startup and then UmbracoCore in everything else that needs to reference umbraco goodness.

Please Sign in or register to post replies

Write your reply to:

Draft