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.
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.
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.......
}
}
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')
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
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
Hi David,
I tried changing the namespace on the .cs file but it causes problems, the package doesn't execute it's methods.
Cheers,
Craig
Hi Craig,
seems correct for me. Can you show where and how you call the Methode from the controller?
Regards David
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 :)
Hi Craig,
glad you found it. That was also my guess.
Regards David
is working on a reply...