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'm following the tutorial from the docs on how to create a custom property editor
I have made it to the last part – part 4 and more specific the section "Setup ApiController routes"
Unfortunately it seems that the page haven't been updated to use dotnet core. When I compile the project, I get errors about the namespaces:
using Umbraco.Web.WebApi; using Umbraco.Web.Editors; using Umbraco.Core.Persistence; using Umbraco.Core.Scoping;
I have tried searching around in the forum to see if there was anyone who have tried the same as me, but no luck.
I'm a newbie in building my own stuff in dotnet and right here, i'm pretty stuck! :)
Can anyone help me with updating the code or point me in the right direction about how to do it?
Any help is appreciated :)
That step should probably be
using Umbraco.Cms.Web.BackOffice.Controllers; using Umbraco.Cms.Web.Common.Attributes; namespace My.Controllers { [PluginController("My")] public class PersonApiController : UmbracoAuthorizedJsonController { // we will add a method here later } }
Thanks Huw!
Unfortunately it now results in the error "The type or namespace name 'Web' does not exist in the namespace 'Umbraco'"
"The type or namespace name 'Web' does not exist in the namespace 'Umbraco'"
I have no clue why or what to do, can you help me out?
What exact version of Umbraco are you using?
Im using Umbraco 12.0.1
Umbraco 12.0.1
And the file is located in ~/App_Code/PersonApiController.cs
~/App_Code/PersonApiController.cs
Are you using Visual Studio?
If so does your project look similar to this
I am using VS Code
And my project looks like this
Mmmm, can't see any reason it wouldn't work, the code i posted is definitely correct, I just tested in 12.0.1
Well – now i I tried on a fresh 12.0.1 and now I get no errors.
Thanks Huw :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Custom Property Editor from Tutorial
Hi
I'm following the tutorial from the docs on how to create a custom property editor
I have made it to the last part – part 4 and more specific the section "Setup ApiController routes"
Unfortunately it seems that the page haven't been updated to use dotnet core. When I compile the project, I get errors about the namespaces:
I have tried searching around in the forum to see if there was anyone who have tried the same as me, but no luck.
I'm a newbie in building my own stuff in dotnet and right here, i'm pretty stuck! :)
Can anyone help me with updating the code or point me in the right direction about how to do it?
Any help is appreciated :)
That step should probably be
Thanks Huw!
Unfortunately it now results in the error
"The type or namespace name 'Web' does not exist in the namespace 'Umbraco'"
I have no clue why or what to do, can you help me out?
What exact version of Umbraco are you using?
Im using
Umbraco 12.0.1
And the file is located in
~/App_Code/PersonApiController.cs
Are you using Visual Studio?
If so does your project look similar to this
I am using VS Code
And my project looks like this
Mmmm, can't see any reason it wouldn't work, the code i posted is definitely correct, I just tested in 12.0.1
Well – now i I tried on a fresh 12.0.1 and now I get no errors.
Thanks Huw :)
is working on a reply...