Copied to clipboard

Flag this post as spam?

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


  • J 420 posts 786 karma points
    Dec 09, 2021 @ 15:30
    J
    0

    How do i include a reference when building a Package?

    Ive created a dll along with some templates.

    I create a new Package and tick off what i require. In a new Umbraco i am able to install this package successfully.

    One issue i found is once i install it, the dll is in the bin directory but it doesnt add a reference in a new Umbraco project. In order for this to work i have to manually click Add Reference then navigate to the bin directory and select the dll which resolves the issue.

    Am i missing a step?

  • Søren Kottal 618 posts 3965 karma points MVP 4x c-trib
    Dec 10, 2021 @ 08:19
    Søren Kottal
    0

    How are you installing your package? If it's through the package installer in the backoffice in v8 and below, then the backoffice doesn't know anything about your csproj. In that case you should install it through nuget instead.

  • J 420 posts 786 karma points
    Dec 10, 2021 @ 09:11
    J
    0

    Thanks @Søren Kottal

    So i ran the site in Visual Studio and created it in Umbraco 8 via the packages menu, selected all the files required.

    I downloaded the zip, went to a new Umbraco 8 installation then under the same area i installed the package by selecting the zip file i created.

    If i need to use nuget, do you have a link on how to set this up as the package is only for internal use and not public?

    Thanks

  • Søren Kottal 618 posts 3965 karma points MVP 4x c-trib
    Dec 10, 2021 @ 11:16
    Søren Kottal
    0

    You need to build it as a nuget package, that will generate a nupkg file, which you can publish to a nuget server of choice. You can then install the package from that server.

Please Sign in or register to post replies

Write your reply to:

Draft