Copied to clipboard

Flag this post as spam?

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


  • Craig100 1136 posts 2523 karma points c-trib
    Jun 28, 2016 @ 15:37
    Craig100
    0

    Package creation advice on Namespaces and UaaS

    Hi,

    I just developed my first plugin and would like to package it up. It includes an App_Code/xxxx.cs file which has the current project's namespace in it (fanoe). I'm guessing there must be some way to swap that out with the appropriate namespace for the end user's project. The documentation's a bit thin on the ground on this point. Also are there any pointers for UaaS package requirements anywhere? I've not found any yet.

    Any advice appreciated.

    Thnx

    Craig

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Jun 28, 2016 @ 20:32
    David Brendel
    0

    Hi Craig,

    for the maespace you can just but your own in it, maybe fthe package name or so. Thats not a prolem. No need to swap the namespace dynamically when packaging your stuff.

    The only thing I know from UaaS is that custom databases aren't synced when pushing through environments. At least as I tested UaaS after codegarden last year.

    Regards David

  • Craig100 1136 posts 2523 karma points c-trib
    Jun 30, 2016 @ 15:57
    Craig100
    0

    Hi David,

    I tried changing the namespace on the .cs file but it causes problems, the package doesn't execute it's methods.

    using System.Collections.Generic;
    using Umbraco.Web.WebApi;
    using Umbraco.Core;
    using Umbraco.Core.Persistence;
    using System.Linq;
    
    //  Changed namespace was "fanoe"    
    namespace tiucl.Controllers {
    
        public class Site {
            public int nodeId { get; set; }
            public int contentType { get; set; }
        }
        // Changed argument, was "fanoe"
        [Umbraco.Web.Mvc.PluginController("tiucl")]
        public class RelationsManagerAPIController : UmbracoAuthorizedApiController {
      ...... Various methods, etc.......
    
    }
    }
    

    Cheers,

    Craig

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Jun 30, 2016 @ 21:09
    David Brendel
    2

    Hi Craig,

    seems correct for me. Can you show where and how you call the Methode from the controller?

    Regards David

  • Craig100 1136 posts 2523 karma points c-trib
    Jul 01, 2016 @ 18:50
    Craig100
    0

    Hi David,

    Found it. Problem was in the resource.js, I was calling $http.get('backoffice/fanoe/RelationsManagerApi/GetSites') instead of $http.get('backoffice/tiucl/RelationsManagerApi/GetSites')

    Doh!

    Many thanks for the hint :)

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Jul 02, 2016 @ 12:45
    David Brendel
    0

    Hi Craig,

    glad you found it. That was also my guess.

    Regards David

Please Sign in or register to post replies

Write your reply to:

Draft