Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi, I have been trying to work with creating a webapi controller in a project separate to the main Umbraco project.
Does anyone know of any information or tutorials on doing this in umb9? I have tried including the libraries from umbraco.cms.core but it doesn't seem to be working.
There should not be any need to do this - just create the controller in your webproject.
Depending on what issues you are facing, you may need other references. In your project file, you should have the following reference:
<PackageReference Include="Umbraco.Cms.Core" Version="9.0.0" />
If the api is for backoffice, you may also need
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="9.0.0" />
Adding the libraries, should be done through packages (as per above) to ensure all dependencies are fulfilled.
Yeah I always use nuget packages, the controller I wanted in my project was so I could just package it all up into a nuget package to use internally without having to create a controller every time.
Otherwise I guess I would have to create the dll then create an umbraco package that can include the controller/plugin.
Is there a way of using the CropUrl function in a separate project? I don't want to bother with the individual settings, but grab the entire cropped image url with the crop data to supply the api.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted