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.
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.
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.
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?
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.
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
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.
is working on a reply...