Strange. I can't find any feature or enhancement listed in issues for monthly subscriptions for 5.3 or 5.4 or, indeed, for the backlog. Which issue do we follow to see progress on this? For me it's not important because I won't be anywhere near release for a few months but it would certainly be nice to have.
@ismcagdas, @alper - thanks for the attention, I was looking for hints on how to use swagger to produce service proxy and dto code files. Previously I have used NSwag Studio with success but for some reason I'm not able to get this working with Zero. It's not your job to teach me how to use these tools so I think we can close this one for now and I will cut and paste code from the service-proxies.ts file in the angular project to use in my Ionic project. Not ideal but not a show-stopper either. Again, thanks for your attention, much appreciated.
@ismcagdas Can you point me to any reasonable documentation on how to generate the service proxies/dto's for angular using swashbuckle, nswag, nswag studio etc? I am looking for a tool where I can select the controllers/services for which I wish to generate the code. I have tried NSwag Studio but I can not get it to work with Zero, though I can get it to work with a standard .net core project.
@antonis has a good point. Why does the build process include all the demo projects for Metronic? I also noted thye big size of the assets folder during production build.
@ismcagdas Thanks for the info. I have drawn a blank in getting this to work. I can find the json url, I already had that, I add it to the tab for Swagger Specification. Then, in the tab for Web API Assembly (the one displayed below) I can not get the Load Assemblies button to load anything at all. I have tried to load the contents of service.config.nswag into the JSON Schema tab but I can still not get the Load Assemblies button to generate a list of controllers. Is this something you can help with or am I faced with hand-coding all Api calls from my Ionic project?
@ismcagdas - thanks for the advice. I removed all references to ng-dynamic-forms, upgraded @angular/cli to the latest version and then re-installed ng-dynamic-forms and rebuilt without the build-optimiser. The compile was successful and reduced to a few minutes. Thanks.
aspnet-core, angular 5.1.0 I was getting exactly the same problem.
ng build -prod
hanging at:
14% building modules 40/52 modules 12 active ...ts\demo\default\base\style.bundle.cssNode#moveTo was deprecated. Use 92% chunk asset optimization
This is not very helpful:
node --max_old_space_size=2048 ./node_modules/@angular/cli/bin/ng build --app app-name --prod
Is app-name "abp-zero-template" as per .angular-cli.json? If so the result is:
Unable to find app with name or index. Verify the configuration in `.angular-cli.json`
I downloaded a clean 5.1.0, run yarn and then the build --prod command. This worked ok which set me on the path of knowing there was something wrong with my configuration. I can find no --verbose flag for the build command and had to decouple third party components. I spent a couple of days removing third-party components one by one until I found the culprit, "ng-dynamic-forms". The build command can take a long time, in my case, with the --build-optimizer=false flag set it still took 30 minutes on a fairly hefty machine.
I would recommend that you build your system each time you add a new third-party component, compatibility problems may not show up during development.
run yarn, not npm update
Aaron, Once again I am in your debt. I'm not a great coder and at some stage I will sit down and try understand the details. To close the issue I include the finished code below, I am sure this is a very common use case.
public void Create()
{
var root = _context.OrganizationUnits.IgnoreQueryFilters().FirstOrDefault(m => m.TenantId == _tenantId && m.DisplayName == "Acme Care Home");
if (root == null)
{
using (var organizationUnitManager = IocManager.Instance.ResolveAsDisposable<OrganizationUnitManager>())
{
organizationUnitManager.Object.Create(new OrganizationUnit(_tenantId, "Acme Care Home", null));
}
}
_context.SaveChanges();
root = _context.OrganizationUnits.IgnoreQueryFilters().FirstOrDefault(m => m.TenantId == _tenantId && m.DisplayName == "Acme Care Home");
using (var scope = IocManager.Instance.CreateScope())
{
var organizationUnitManager = scope.Resolve<OrganizationUnitManager>();
var unitOfWorkManager = scope.Resolve<IUnitOfWorkManager>();
using (unitOfWorkManager.Current.DisableFilter(AbpDataFilters.MayHaveTenant))
{
var admissions = _context.OrganizationUnits.IgnoreQueryFilters().FirstOrDefault(m => m.TenantId == _tenantId && m.DisplayName == "Admissions");
if (admissions == null)
{
organizationUnitManager.Create(new OrganizationUnit(_tenantId, "Admissions", root.Id));
}
var firstFloor = _context.OrganizationUnits.IgnoreQueryFilters().FirstOrDefault(m => m.TenantId == _tenantId && m.DisplayName == "First Floor");
if (firstFloor == null)
{
organizationUnitManager.Create(new OrganizationUnit(_tenantId, "First Floor", root.Id));
}
var secondFloor = _context.OrganizationUnits.IgnoreQueryFilters().FirstOrDefault(m => m.TenantId == _tenantId && m.DisplayName == "Second Floor");
if (secondFloor == null)
{
organizationUnitManager.Create(new OrganizationUnit(_tenantId, "Second Floor", root.Id));
}
}
}
}
Thanks again.
Wow, Aaron, thanks for the speedy reply, I kind of had this set aside until Monday! The error is unusual, here is a screen capture from VS 2017: [attachment=0:191pkgx2]Capture.PNG[/attachment:191pkgx2] No error is thrown in the log (I don't think the system has hit the logger at this stage if I'm not mistaken). The root organization unit exists in the database (from a previous run). The stack trace reads:
" at Abp.Domain.Repositories.AbpRepositoryBase`2.<GetAsync>d__21.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithPostActionAndFinallyAndGetResult>d__5`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Abp.Organizations.OrganizationUnitManager.<GetCodeAsync>d__9.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Abp.Organizations.OrganizationUnitManager.<GetNextChildCodeAsync>d__7.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Abp.Organizations.OrganizationUnitManager.<CreateAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithPostActionAndFinally>d__1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task)\r\n at Nito.AsyncEx.AsyncContext.<>c__DisplayClass15_0.<Run>b__0(Task t)\r\n at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke()\r\n at System.Threading.Tasks.Task.Execute()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task)\r\n at Nito.AsyncEx.AsyncContext.Run(Func`1 action)\r\n at Abp.Organizations.OrganizationUnitManagerExtensions.Create(OrganizationUnitManager manager, OrganizationUnit organizationUnit)\r\n at Nuagecare.Migrations.Seed.Tenants.InitialChildOrganizationUnitCreator.Create()\r\n at Nuagecare.Migrations.Seed.Tenants.DefaultTenantDataBuilder.CreateChildTables()\r\n at Nuagecare.Migrations.Seed.Tenants.DefaultTenantDataBuilder.Create()\r\n at Nuagecare.Migrations.Seed.SeedHelper.SeedHostDb(NuagecareDbContext context)\r\n at Nuagecare.Migrations.Seed.SeedHelper.WithDbContext[TDbContext](IIocResolver iocResolver, Action`1 contextAction)\r\n at Nuagecare.Migrations.Seed.SeedHelper.SeedHostDb(IIocResolver iocResolver)\r\n at Nuagecare.EntityFrameworkCore.NuagecareEntityFrameworkCoreModule.PostInitialize()\r\n at Abp.Modules.AbpModuleManager.<>c.<StartModules>b__15_2(AbpModuleInfo module)\r\n at System.Collections.Generic.List`1.ForEach(Action`1 action)\r\n at Abp.Modules.AbpModuleManager.StartModules()\r\n at Abp.AbpBootstrapper.Initialize()"