-
Notifications
You must be signed in to change notification settings - Fork 1
/
add-services.ps1
607 lines (522 loc) · 58.9 KB
/
add-services.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
$name = $args[0]
$name = "Bamboo"
$abpver = "8.2.0"
$apps_path = "apps"
$sln_service = "$name.Services.All"
$shared_common = "$name/shared/common"
$use_share = "True"
$ui_enable = "True"
$admin_name = "Admin"
$services = @{}
#$services.Add('Admin', 'admin') # Use Core App
#$services.Add('Base', 'base')
#$services.Add('Blog', 'blog')
#$services.Add('Docs', 'docs')
#$services.Add('Support', 'support')
#$services.Add('Forum', 'forum')
$services.Add('Core', 'core')
#$services.Add('Crm', 'crm')
#$services.Add('Sales', 'sales')
#$services.Add('Pos', 'pos')
#$services.Add('Shop', 'shop')
#$services.Add('Inventory', 'inventory')
#$services.Add('Purchase', 'purchase')
#$services.Add('Repairs', 'repairs')
#$services.Add('Barcode', 'barcode')
#$services.Add('Accounting', 'account')
#$services.Add('Invoice', 'invoice')
#$services.Add('Payment', 'payment')
#$services.Add('Hr', 'hr')
#$services.Add('Mrp', 'mrp')
#$services.Add('Administration', 'administration')
#$services.Add('Logging', 'logging')
#$services.Add('Notification', 'notification')
#$services.Add('Push', 'push')
#$services.Add('CmsService', 'cmskit')
function CmsKitAddReference {
# CmsService SERVICES
## Domain.Shared
if ($use_share -eq "True") {
$shared_folder = "./$name/shared/$folder"
} else {
$shared_folder = "./$name/services/$folder/src"
}
$admin = "CmsService"
#dotnet add $shared_folder/$name.$admin.Domain.Shared/$name.$admin.Domain.Shared.csproj package Volo.Abp.Identity.Domain.Shared -v $abpver
#dotnet add $shared_folder/$name.$admin.Domain.Shared/$name.$admin.Domain.Shared.csproj package Volo.Abp.BackgroundJobs.Domain.Shared -v $abpver
#dotnet add $shared_folder/$name.$admin.Domain.Shared/$name.$admin.Domain.Shared.csproj package Volo.Abp.AuditLogging.Domain.Shared -v $abpver
#dotnet add $shared_folder/$name.$admin.Domain.Shared/$name.$admin.Domain.Shared.csproj package Volo.Abp.TenantManagement.Domain.Shared -v $abpver
#dotnet add $shared_folder/$name.$admin.Domain.Shared/$name.$admin.Domain.Shared.csproj package Volo.Abp.FeatureManagement.Domain.Shared -v $abpver
#dotnet add $shared_folder/$name.$admin.Domain.Shared/$name.$admin.Domain.Shared.csproj package Volo.Abp.SettingManagement.Domain.Shared -v $abpver
#dotnet add $shared_folder/$name.$admin.Domain.Shared/$name.$admin.Domain.Shared.csproj package Volo.Abp.OpenIddict.Domain.Shared -v $abpver
#dotnet add $shared_folder/$name.$admin.Domain.Shared/$name.$admin.Domain.Shared.csproj package Volo.Abp.PermissionManagement.Domain.Shared -v $abpver
dotnet add $shared_folder/$name.$admin.Domain.Shared/$name.$admin.Domain.Shared.csproj package Volo.CmsKit.Domain.Shared -v $abpver
## Domain
#dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.Emailing -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.Identity.Domain -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.OpenIddict.Domain -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.BackgroundJobs.Domain -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.AuditLogging.Domain -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.TenantManagement.Domain -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.FeatureManagement.Domain -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.SettingManagement.Domain -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.PermissionManagement.Domain.Identity -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.PermissionManagement.Domain.OpenIddict -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.CmsKit.Domain -v $abpver
## Application.Contracts
#dotnet add $shared_folder/$name.$admin.Application.Contracts/$name.$admin.Application.Contracts.csproj package Volo.Abp.ObjectExtending -v $abpver
#dotnet add $shared_folder/$name.$admin.Application.Contracts/$name.$admin.Application.Contracts.csproj package Volo.Abp.Ddd.Application.Contracts -v $abpver
#dotnet add $shared_folder/$name.$admin.Application.Contracts/$name.$admin.Application.Contracts.csproj package Volo.Abp.Account.Application.Contracts -v $abpver
#dotnet add $shared_folder/$name.$admin.Application.Contracts/$name.$admin.Application.Contracts.csproj package Volo.Abp.Identity.Application.Contracts -v $abpver
#dotnet add $shared_folder/$name.$admin.Application.Contracts/$name.$admin.Application.Contracts.csproj package Volo.Abp.TenantManagement.Application.Contracts -v $abpver
#dotnet add $shared_folder/$name.$admin.Application.Contracts/$name.$admin.Application.Contracts.csproj package Volo.Abp.FeatureManagement.Application.Contracts -v $abpver
#dotnet add $shared_folder/$name.$admin.Application.Contracts/$name.$admin.Application.Contracts.csproj package Volo.Abp.SettingManagement.Application.Contracts -v $abpver
#dotnet add $shared_folder/$name.$admin.Application.Contracts/$name.$admin.Application.Contracts.csproj package Volo.Abp.PermissionManagement.Application.Contracts -v $abpver
dotnet add $shared_folder/$name.$admin.Application.Contracts/$name.$admin.Application.Contracts.csproj package Volo.CmsKit.Application.Contracts -v $abpver
## Application
#dotnet add $name/services/$folder/src/$name.$admin.Application/$name.$admin.Application.csproj package Volo.Abp.Account.Application -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.Application/$name.$admin.Application.csproj package Volo.Abp.Identity.Application -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.Application/$name.$admin.Application.csproj package Volo.Abp.TenantManagement.Application -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.Application/$name.$admin.Application.csproj package Volo.Abp.FeatureManagement.Application -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.Application/$name.$admin.Application.csproj package Volo.Abp.SettingManagement.Application -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.Application/$name.$admin.Application.csproj package Volo.Abp.PermissionManagement.Application -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.Application/$name.$admin.Application.csproj package Volo.CmsKit.Application -v $abpver
## EntityFrameworkCore
#dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.Identity.EntityFrameworkCore -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.OpenIddict.EntityFrameworkCore -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.TenantManagement.EntityFrameworkCore -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.PermissionManagement.EntityFrameworkCore -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.FeatureManagement.EntityFrameworkCore -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.SettingManagement.EntityFrameworkCore -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.AuditLogging.EntityFrameworkCore -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.BackgroundJobs.EntityFrameworkCore -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Microsoft.EntityFrameworkCore.Tools #-v "6.0.5"
dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.CmsKit.EntityFrameworkCore -v $abpver
## HTTP API
#dotnet add $name/services/$folder/src/$name.$admin.HttpApi/$name.$admin.HttpApi.csproj package Volo.Abp.Account.HttpApi -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.HttpApi/$name.$admin.HttpApi.csproj package Volo.Abp.Identity.HttpApi -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.HttpApi/$name.$admin.HttpApi.csproj package Volo.Abp.TenantManagement.HttpApi -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.HttpApi/$name.$admin.HttpApi.csproj package Volo.Abp.PermissionManagement.HttpApi -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.HttpApi/$name.$admin.HttpApi.csproj package Volo.Abp.FeatureManagement.HttpApi -v $abpver
#dotnet add $name/services/$folder/src/$name.$admin.HttpApi/$name.$admin.HttpApi.csproj package Volo.Abp.SettingManagement.HttpApi -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.HttpApi/$name.$admin.HttpApi.csproj package Volo.CmsKit.HttpApi -v $abpver
## HTTP API CLIENT
#dotnet add $shared_folder/$name.$admin.HttpApi.Client/$name.$admin.HttpApi.Client.csproj package Volo.Abp.Account.HttpApi.Client -v $abpver
#dotnet add $shared_folder/$name.$admin.HttpApi.Client/$name.$admin.HttpApi.Client.csproj package Volo.Abp.Identity.HttpApi.Client -v $abpver
#dotnet add $shared_folder/$name.$admin.HttpApi.Client/$name.$admin.HttpApi.Client.csproj package Volo.Abp.TenantManagement.HttpApi.Client -v $abpver
#dotnet add $shared_folder/$name.$admin.HttpApi.Client/$name.$admin.HttpApi.Client.csproj package Volo.Abp.PermissionManagement.HttpApi.Client -v $abpver
#dotnet add $shared_folder/$name.$admin.HttpApi.Client/$name.$admin.HttpApi.Client.csproj package Volo.Abp.FeatureManagement.HttpApi.Client -v $abpver
#dotnet add $shared_folder/$name.$admin.HttpApi.Client/$name.$admin.HttpApi.Client.csproj package Volo.Abp.SettingManagement.HttpApi.Client -v $abpver
dotnet add $shared_folder/$name.$admin.HttpApi.Client/$name.$admin.HttpApi.Client.csproj package Volo.CmsKit.HttpApi.Client -v $abpver
}
function AdminServiceAddReference {
# ADMINISTRATION SERVICES
if ($use_share -eq "True") {
$shared_folder = "./$name/shared/$folder"
} else {
$shared_folder = "./$name/services/$folder/src"
}
$admin = $admin_name
dotnet add $shared_folder/$name.$admin.Domain.Shared/$name.$admin.Domain.Shared.csproj package Volo.Abp.AuditLogging.Domain.Shared -v $abpver
dotnet add $shared_folder/$name.$admin.Domain.Shared/$name.$admin.Domain.Shared.csproj package Volo.Abp.BackgroundJobs.Domain.Shared -v $abpver
dotnet add $shared_folder/$name.$admin.Domain.Shared/$name.$admin.Domain.Shared.csproj package Volo.Abp.FeatureManagement.Domain.Shared -v $abpver
dotnet add $shared_folder/$name.$admin.Domain.Shared/$name.$admin.Domain.Shared.csproj package Volo.Abp.PermissionManagement.Domain.Shared -v $abpver
dotnet add $shared_folder/$name.$admin.Domain.Shared/$name.$admin.Domain.Shared.csproj package Volo.Abp.SettingManagement.Domain.Shared -v $abpver
dotnet add $shared_folder/$name.$admin.Domain.Shared/$name.$admin.Domain.Shared.csproj package Volo.Abp.Identity.Domain.Shared -v $abpver
dotnet add $shared_folder/$name.$admin.Domain.Shared/$name.$admin.Domain.Shared.csproj package Volo.Abp.OpenIddict.Domain.Shared -v $abpver
dotnet add $shared_folder/$name.$admin.Domain.Shared/$name.$admin.Domain.Shared.csproj package Volo.Abp.TenantManagement.Domain.Shared -v $abpver
## Domain
dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.Emailing -n -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.AuditLogging.Domain -n -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.BackgroundJobs.Domain -n -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.FeatureManagement.Domain -n -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.PermissionManagement.Domain.Identity -n -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.PermissionManagement.Domain.OpenIddict -n -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.SettingManagement.Domain -n -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.Identity.Domain -n -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.OpenIddict.Domain -n -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.Domain/$name.$admin.Domain.csproj package Volo.Abp.TenantManagement.Domain -n -v $abpver
## Application.Contracts
#dotnet add $shared_folder/$name.$admin.Application.Contracts/$name.$admin.Application.Contracts.csproj package Volo.Abp.ObjectExtending -v $abpver
dotnet add $shared_folder/$name.$admin.Application.Contracts/$name.$admin.Application.Contracts.csproj package Volo.Abp.Ddd.Application.Contracts -v $abpver
dotnet add $shared_folder/$name.$admin.Application.Contracts/$name.$admin.Application.Contracts.csproj package Volo.Abp.Account.Application.Contracts -v $abpver
dotnet add $shared_folder/$name.$admin.Application.Contracts/$name.$admin.Application.Contracts.csproj package Volo.Abp.Identity.Application.Contracts -v $abpver
dotnet add $shared_folder/$name.$admin.Application.Contracts/$name.$admin.Application.Contracts.csproj package Volo.Abp.TenantManagement.Application.Contracts -v $abpver
dotnet add $shared_folder/$name.$admin.Application.Contracts/$name.$admin.Application.Contracts.csproj package Volo.Abp.FeatureManagement.Application.Contracts -v $abpver
dotnet add $shared_folder/$name.$admin.Application.Contracts/$name.$admin.Application.Contracts.csproj package Volo.Abp.PermissionManagement.Application.Contracts -v $abpver
dotnet add $shared_folder/$name.$admin.Application.Contracts/$name.$admin.Application.Contracts.csproj package Volo.Abp.SettingManagement.Application.Contracts -v $abpver
## Application
dotnet add $name/services/$folder/src/$name.$admin.Application/$name.$admin.Application.csproj package Volo.Abp.Account.Application -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.Application/$name.$admin.Application.csproj package Volo.Abp.Identity.Application -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.Application/$name.$admin.Application.csproj package Volo.Abp.TenantManagement.Application -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.Application/$name.$admin.Application.csproj package Volo.Abp.FeatureManagement.Application -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.Application/$name.$admin.Application.csproj package Volo.Abp.SettingManagement.Application -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.Application/$name.$admin.Application.csproj package Volo.Abp.PermissionManagement.Application -v $abpver
## EntityFrameworkCore
dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.EntityFrameworkCore.PostgreSql -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.Identity.EntityFrameworkCore -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.OpenIddict.EntityFrameworkCore -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.TenantManagement.EntityFrameworkCore -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.FeatureManagement.EntityFrameworkCore -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.PermissionManagement.EntityFrameworkCore -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.SettingManagement.EntityFrameworkCore -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.AuditLogging.EntityFrameworkCore -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.BackgroundJobs.EntityFrameworkCore -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Volo.Abp.BlobStoring.Database.EntityFrameworkCore -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.EntityFrameworkCore/$name.$admin.EntityFrameworkCore.csproj package Microsoft.EntityFrameworkCore.Tools -v "8.0.4"
## HTTP API
dotnet add $name/services/$folder/src/$name.$admin.HttpApi/$name.$admin.HttpApi.csproj package Volo.Abp.Account.HttpApi -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.HttpApi/$name.$admin.HttpApi.csproj package Volo.Abp.FeatureManagement.HttpApi -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.HttpApi/$name.$admin.HttpApi.csproj package Volo.Abp.PermissionManagement.HttpApi -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.HttpApi/$name.$admin.HttpApi.csproj package Volo.Abp.SettingManagement.HttpApi -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.HttpApi/$name.$admin.HttpApi.csproj package Volo.Abp.Identity.HttpApi -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.HttpApi/$name.$admin.HttpApi.csproj package Volo.Abp.OpenIddict.AspNetCore -v $abpver
dotnet add $name/services/$folder/src/$name.$admin.HttpApi/$name.$admin.HttpApi.csproj package Volo.Abp.TenantManagement.HttpApi -v $abpver
## HTTP API CLIENT
dotnet add $shared_folder/$name.$admin.HttpApi.Client/$name.$admin.HttpApi.Client.csproj package Volo.Abp.Account.HttpApi.Client -v $abpver
dotnet add $shared_folder/$name.$admin.HttpApi.Client/$name.$admin.HttpApi.Client.csproj package Volo.Abp.Identity.HttpApi.Client -v $abpver
dotnet add $shared_folder/$name.$admin.HttpApi.Client/$name.$admin.HttpApi.Client.csproj package Volo.Abp.TenantManagement.HttpApi.Client -v $abpver
dotnet add $shared_folder/$name.$admin.HttpApi.Client/$name.$admin.HttpApi.Client.csproj package Volo.Abp.FeatureManagement.HttpApi.Client -v $abpver
dotnet add $shared_folder/$name.$admin.HttpApi.Client/$name.$admin.HttpApi.Client.csproj package Volo.Abp.PermissionManagement.HttpApi.Client -v $abpver
dotnet add $shared_folder/$name.$admin.HttpApi.Client/$name.$admin.HttpApi.Client.csproj package Volo.Abp.SettingManagement.HttpApi.Client -v $abpver
# Admin Extensions
dotnet add ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj package Volo.Abp.AspNetCore.Mvc -v $abpver
dotnet add ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj package Volo.Abp.AspNetCore.MultiTenancy -v $abpver
dotnet add ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj package Volo.Abp.Autofac -v $abpver
dotnet add ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj package Volo.Abp.Caching.StackExchangeRedis -v $abpver
dotnet add ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj package Volo.Abp.DistributedLocking -v $abpver
dotnet add ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj package Volo.Abp.Sms -v $abpver
dotnet add ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj package Volo.Abp.Account.Application -v $abpver
dotnet add ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj package Volo.Abp.Account.HttpApi -v $abpver
dotnet add ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj package Volo.Abp.Identity.AspNetCore -v $abpver
dotnet add ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj package Volo.Abp.Identity.Application -v $abpver
dotnet add ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj package Volo.Abp.Identity.HttpApi -v $abpver
dotnet add ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj package Volo.Abp.Identity.EntityFrameworkCore -v $abpver
dotnet add ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj package Volo.Abp.OpenIddict.Domain -v $abpver
dotnet add ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj package Volo.Abp.SettingManagement.Application -v $abpver
dotnet add ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj package Volo.Abp.TenantManagement.Application -v $abpver
dotnet add ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj package Volo.Abp.TenantManagement.HttpApi -v $abpver
# Login UI
dotnet add ./$name/services/$folder/src/$name.LoginUi.Web package Volo.Abp.Caching.StackExchangeRedis -v $abpver
dotnet add ./$name/services/$folder/src/$name.LoginUi.Web package Volo.Abp.DistributedLocking -v $abpver
dotnet add ./$name/services/$folder/src/$name.LoginUi.Web package Volo.Abp.Account.Web.OpenIddict -v $abpver
dotnet add ./$name/services/$folder/src/$name.LoginUi.Web package Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared -v $abpver
dotnet add ./$name/services/$folder/src/$name.LoginUi.Web package Volo.Abp.Identity.Web -v $abpver
dotnet add ./$name/services/$folder/src/$name.LoginUi.Web package Volo.Abp.SettingManagement.Application -v $abpver
dotnet add ./$name/services/$folder/src/$name.LoginUi.Web package Volo.Abp.TenantManagement.Application -v $abpver
dotnet add ./$name/services/$folder/src/$name.LoginUi.Web package Volo.Abp.Sms -v $abpver
}
function AdminServiceAddSource {
# SOURCE CODE
$admin = $admin_name
abp add-module Volo.AuditLogging -s "services/$folder/$name.$admin.sln" --skip-db-migrations
abp add-module Volo.FeatureManagement -s "services/$folder/$name.$admin.sln" --skip-db-migrations
abp add-module Volo.PermissionManagement -s "services/$folder/$name.$admin.sln" --skip-db-migrations
abp add-module Volo.SettingManagement -s "services/$folder/$name.$admin.sln" --skip-db-migrations
abp add-module Volo.Identity -s "services/$folder/$name.$admin.sln" --skip-db-migrations
abp add-module Volo.OpenIddict -s "services/$folder/$name.$admin.sln" --skip-db-migrations
abp add-module Volo.TenantManagement -s "services/saas/$name.$admin.sln" --skip-db-migrations
}
function CreateServices {
$sln_service = "$name.Services.All"
if (-not(Test-Path -Path "./$name/services/$sln_service.sln" -PathType Leaf)) {
#dotnet new sln -n "$sln_service" -o ./services
}
if (-not(Test-Path -Path "./$name/$apps_path/angular")) {
new-item "./$name/$apps_path/angular" -itemtype directory
}
#dotnet sln "./$apps_path/$name.Web.Blazor.sln" add --solution-folder shared (Get-ChildItem -r ./$shared_common/$name.Shared.Common/$name.Shared.Common.csproj)
#dotnet sln "./$apps_path/$name.Web.BlazorServer.sln" add --solution-folder shared (Get-ChildItem -r ./$shared_common/$name.Shared.Common/$name.Shared.Common.csproj)
#dotnet sln "./$apps_path/$name.Web.MVC.sln" add --solution-folder shared (Get-ChildItem -r ./$shared_common/$name.Shared.Common/$name.Shared.Common.csproj)
foreach($service in $services.keys)
{
$folder = $services[$service]
Write-Output "PROCESS $service $folder"
if (Test-Path -Path "./$name/services/$folder") {
"$service's path exists!"
continue
}
if ($use_share -eq "True") {
$shared_folder = "./$name/shared/$folder"
new-item "$shared_folder" -itemtype directory
} else {
$shared_folder = "./$name.$services/$folder/src"
}
if ($ui_enable -eq "True") {
if ($use_share -eq "True") {
new-item "./$name/$apps_path/$folder/src" -itemtype directory
new-item "./$name/$apps_path/$folder/host" -itemtype directory
Copy-Item "./common.props*" -Destination "./$name/$apps_path/$folder/" -Force
}
#abp new "Bamboo.Base" -t module --no-open -o Bamboo/services/base --skip-installing-libs
abp new "$name.$service" -t module --no-open --no-random-port -dbms PostgreSQL -o $name/services/$folder --skip-installing-libs -v $abpver
} else {
abp new "$name.$service" -t module --no-open --no-ui --no-random-port -dbms PostgreSQL -o $name/services/$folder --skip-installing-libs -v $abpver
}
dotnet add ./$name/services/$folder/src/$name.$service.Application/$name.$service.Application.csproj package Volo.Abp.BackgroundJobs -v $abpver
#dotnet add ./$name/services/$folder/src/$name.$service.Application/$name.$service.Application.csproj package Volo.Abp.BlobStoring -v $abpver
#dotnet add ./$name/services/$folder/src/$name.$service.Application/$name.$service.Application.csproj package Volo.Abp.AutoMapper -v $abpver
#dotnet add ./$name/services/$folder/src/$name.$service.Application/$name.$service.Application.csproj package Volo.Abp.Ddd.Application -v $abpver
#dotnet add ./$name/services/$folder/src/$name.$service.Application/$name.$service.Application.csproj package NPOI -v "2.6.0"
dotnet add ./$name/services/$folder/host/$name.$service.HttpApi.Host/$name.$service.HttpApi.Host.csproj reference ./$shared_common/$name.Shared.Microservices/$name.Shared.Microservices.csproj
dotnet add ./$name/services/$folder/host/$name.$service.HttpApi.Host/$name.$service.HttpApi.Host.csproj package Volo.Abp.EntityFrameworkCore.PostgreSql -v $abpver
#dotnet remove ./services/$folder/host/$name.$service.HttpApi.Host/$name.$service.HttpApi.Host.csproj package Volo.Abp.EntityFrameworkCore.SqlServer
dotnet add ./$name/services/$folder/src/$name.$service.Domain/$name.$service.Domain.csproj package System.ComponentModel.Annotations -v 5.0.0
#dotnet add ./$name/services/$folder/src/$name.$service.EntityFrameworkCore/$name.$service.EntityFrameworkCore.csproj package Volo.Abp.EntityFrameworkCore.PostgreSql -v $abpver
dotnet add ./$name/services/$folder/src/$name.$service.EntityFrameworkCore/$name.$service.EntityFrameworkCore.csproj reference ./$shared_common/$name.Shared.EfCore/$name.Shared.EfCore.csproj
#dotnet add ./$name/services/$folder/src/$name.$service.Domain/$name.$service.Domain.csproj reference ./$shared_common/$name.Shared.Domain/$name.Shared.Domain.csproj
if ($service -ne $admin_name) {
#dotnet sln ./$name/services/$folder/$name.$service.sln remove (Get-ChildItem -r ./$name/services/$folder/host/$name.$service.AuthServer/$name.$service.AuthServer.csproj)
#dotnet sln ./$name/services/$folder/$name.$service.sln remove (Get-ChildItem -r ./$name/services/$folder/host/$name.$service.Host.Shared/$name.$service.Host.Shared.csproj)
}
if ($use_share -eq "True") {
dotnet sln ./$name/services/$folder/$name.$service.sln remove (Get-ChildItem -r ./$name/services/$folder/src/$name.$service.Domain.Shared/$name.$service.Domain.Shared.csproj)
dotnet sln ./$name/services/$folder/$name.$service.sln remove (Get-ChildItem -r ./$name/services/$folder/src/$name.$service.Application.Contracts/$name.$service.Application.Contracts.csproj)
dotnet sln ./$name/services/$folder/$name.$service.sln remove (Get-ChildItem -r ./$name/services/$folder/src/$name.$service.HttpApi.Client/$name.$service.HttpApi.Client.csproj)
Copy-Item "./$name/services/$folder/$name.$service.sln" -Destination "./$name/services/$folder/$name.$service-apps.sln" -Force
dotnet sln ./$name/services/$folder/$name.$service-apps.sln remove (Get-ChildItem -r ./$name/services/$folder/host/$name.$service.AuthServer/$name.$service.AuthServer.csproj)
dotnet sln ./$name/services/$folder/$name.$service-apps.sln remove (Get-ChildItem -r ./$name/services/$folder/host/$name.$service.Host.Shared/$name.$service.Host.Shared.csproj)
dotnet sln ./$name/services/$folder/$name.$service-apps.sln remove (Get-ChildItem -r ./$name/services/$folder/host/$name.$service.HttpApi.Host/$name.$service.HttpApi.Host.csproj)
dotnet sln ./$name/services/$folder/$name.$service-apps.sln remove (Get-ChildItem -r ./$name/services/$folder/src/$name.$service.Application/$name.$service.Application.csproj)
dotnet sln ./$name/services/$folder/$name.$service-apps.sln remove (Get-ChildItem -r ./$name/services/$folder/src/$name.$service.Domain/$name.$service.Domain.csproj)
dotnet sln ./$name/services/$folder/$name.$service-apps.sln remove (Get-ChildItem -r ./$name/services/$folder/src/$name.$service.EntityFrameworkCore/$name.$service.EntityFrameworkCore.csproj)
dotnet sln ./$name/services/$folder/$name.$service-apps.sln remove (Get-ChildItem -r ./$name/services/$folder/src/$name.$service.HttpApi/$name.$service.HttpApi.csproj)
dotnet sln ./$name/services/$folder/$name.$service-apps.sln remove (Get-ChildItem -r ./$name/services/$folder/src/$name.$service.Installer/$name.$service.Installer.csproj)
dotnet sln ./$name/services/$folder/$name.$service-apps.sln remove (Get-ChildItem -r ./$name/services/$folder/src/$name.$service.MongoDB/$name.$service.MongoDB.csproj)
dotnet sln ./$name/services/$folder/$name.$service-apps.sln remove (Get-ChildItem -r ./$name/services/$folder/test/$name.$service.Application.Tests/$name.$service.Application.Tests.csproj)
dotnet sln ./$name/services/$folder/$name.$service-apps.sln remove (Get-ChildItem -r ./$name/services/$folder/test/$name.$service.Domain.Tests/$name.$service.Domain.Tests.csproj)
dotnet sln ./$name/services/$folder/$name.$service-apps.sln remove (Get-ChildItem -r ./$name/services/$folder/test/$name.$service.EntityFrameworkCore.Tests/$name.$service.EntityFrameworkCore.Tests.csproj)
dotnet sln ./$name/services/$folder/$name.$service-apps.sln remove (Get-ChildItem -r ./$name/services/$folder/test/$name.$service.MongoDB.Tests/$name.$service.MongoDB.Tests.csproj)
dotnet sln ./$name/services/$folder/$name.$service-apps.sln remove (Get-ChildItem -r ./$name/services/$folder/test/$name.$service.TestBase/$name.$service.TestBase.csproj)
dotnet sln ./$name/services/$folder/$name.$service-apps.sln remove (Get-ChildItem -r ./$name/services/$folder/test/$name.$service.HttpApi.Client.ConsoleTestApp/$name.$service.HttpApi.Client.ConsoleTestApp.csproj)
Copy-Item "./$name/services/$folder/$name.$service-apps.sln" -Destination ./$name/$apps_path/$folder/$name.$service.sln -Force
if ($ui_enable -eq "True") {
dotnet sln ./$name/services/$folder/$name.$service.sln remove (Get-ChildItem -r ./$name/services/$folder/src/$name.$service.Blazor/$name.$service.Blazor.csproj)
dotnet sln ./$name/services/$folder/$name.$service.sln remove (Get-ChildItem -r ./$name/services/$folder/src/$name.$service.Blazor.WebAssembly/$name.$service.Blazor.WebAssembly.csproj)
dotnet sln ./$name/services/$folder/$name.$service.sln remove (Get-ChildItem -r ./$name/services/$folder/src/$name.$service.Blazor.Server/$name.$service.Blazor.Server.csproj)
dotnet sln ./$name/services/$folder/$name.$service.sln remove (Get-ChildItem -r ./$name/services/$folder/src/$name.$service.Web/$name.$service.Web.csproj)
dotnet sln ./$name/services/$folder/$name.$service.sln remove (Get-ChildItem -r ./$name/services/$folder/host/$name.$service.Blazor.Host/$name.$service.Blazor.Host.csproj)
dotnet sln ./$name/services/$folder/$name.$service.sln remove (Get-ChildItem -r ./$name/services/$folder/host/$name.$service.Blazor.Host.Client/$name.$service.Blazor.Host.Client.csproj)
dotnet sln ./$name/services/$folder/$name.$service.sln remove (Get-ChildItem -r ./$name/services/$folder/host/$name.$service.Blazor.Server.Host/$name.$service.Blazor.Server.Host.csproj)
dotnet sln ./$name/services/$folder/$name.$service.sln remove (Get-ChildItem -r ./$name/services/$folder/host/$name.$service.Web.Host/$name.$service.Web.Host.csproj)
dotnet sln ./$name/services/$folder/$name.$service.sln remove (Get-ChildItem -r ./$name/services/$folder/host/$name.$service.Web.Unified/$name.$service.Web.Unified.csproj)
#dotnet sln ./$name/services/$folder/$name.$service.sln remove (Get-ChildItem -r ./$name/services/$folder/test/$name.$service.HttpApi.Client.ConsoleTestApp/$name.$service.HttpApi.Client.ConsoleTestApp.csproj)
}
# Remove reference
dotnet remove ./$name/services/$folder/src/$name.$service.Domain/$name.$service.Domain.csproj reference "..\$name.$service.Domain.Shared\$name.$service.Domain.Shared.csproj"
#dotnet remove ./services/$folder/src/$name.$service.Domain/$name.$service.Domain.csproj reference ./services/$folder/"$name.$service".Domain.Shared/"$name.$service".Domain.Shared.csproj
dotnet remove ./$name/services/$folder/src/$name.$service.Application/$name.$service.Application.csproj reference "..\$name.$service.Application.Contracts\$name.$service.Application.Contracts.csproj"
dotnet remove ./$name/services/$folder/src/$name.$service.HttpApi/$name.$service.HttpApi.csproj reference "..\$name.$service.Application.Contracts\$name.$service.Application.Contracts.csproj"
#dotnet remove ./$name/services/$folder/host/$name.$service.HttpApi.Host/$name.$service.HttpApi.Host.csproj reference "..\$name.$service.Host.Shared\$name.$service.Host.Shared.csproj"
if ($ui_enable -eq "True") {
dotnet remove ./$name/services/$folder/src/$name.$service.Blazor/$name.$service.Blazor.csproj reference "..\$name.$service.Application.Contracts\$name.$service.Application.Contracts.csproj"
dotnet remove ./$name/services/$folder/src/$name.$service.Blazor.WebAssembly/$name.$service.Blazor.WebAssembly.csproj reference "..\$name.$service.HttpApi.Client\$name.$service.HttpApi.Client.csproj"
dotnet remove ./$name/services/$folder/src/$name.$service.Web/$name.$service.Web.csproj reference "..\$name.$service.Application.Contracts\$name.$service.Application.Contracts.csproj"
dotnet remove ./$name/services/$folder/host/$name.$service.Blazor.Host.Client/$name.$service.Blazor.Host.Client.csproj reference "..\$name.$service.Host.Shared\$name.$service.Host.Shared.csproj"
dotnet remove ./$name/services/$folder/host/$name.$service.Blazor.Host/$name.$service.Blazor.Host.csproj reference "..\$name.$service.Host.Shared\$name.$service.Host.Shared.csproj"
dotnet remove ./$name/services/$folder/host/$name.$service.Blazor.Server.Host/$name.$service.Blazor.Server.Host.csproj reference "..\$name.$service.Host.Shared\$name.$service.Host.Shared.csproj"
dotnet remove ./$name/services/$folder/host/$name.$service.Blazor.Server.Host/$name.$service.Blazor.Server.Host.csproj reference "..\..\src\$name.$service.Application\$name.$service.Application.csproj"
dotnet remove ./$name/services/$folder/host/$name.$service.Blazor.Server.Host/$name.$service.Blazor.Server.Host.csproj reference "..\..\src\$name.$service.EntityFrameworkCore\$name.$service.EntityFrameworkCore.csproj"
dotnet remove ./$name/services/$folder/host/$name.$service.Blazor.Server.Host/$name.$service.Blazor.Server.Host.csproj reference "..\..\src\$name.$service.HttpApi\$name.$service.HttpApi.csproj"
dotnet remove ./$name/services/$folder/host/$name.$service.Web.Host/$name.$service.Web.Host.csproj reference "..\..\src\$name.$service.HttpApi.Client\$name.$service.HttpApi.Client.csproj"
dotnet remove ./$name/services/$folder/host/$name.$service.Web.Host/$name.$service.Web.Host.csproj reference "..\..\src\$name.$service.HttpApi\$name.$service.HttpApi.csproj"
dotnet remove ./$name/services/$folder/host/$name.$service.Web.Host/$name.$service.Web.Host.csproj reference "..\$name.$service.Host.Shared\$name.$service.Host.Shared.csproj"
dotnet remove ./$name/services/$folder/host/$name.$service.Web.Unified/$name.$service.Web.Unified.csproj reference "..\$name.$service.Host.Shared\$name.$service.Host.Shared.csproj"
dotnet remove ./$name/services/$folder/host/$name.$service.Web.Unified/$name.$service.Web.Unified.csproj reference "..\..\src\$name.$service.Application\$name.$service.Application.csproj"
dotnet remove ./$name/services/$folder/host/$name.$service.Web.Unified/$name.$service.Web.Unified.csproj reference "..\..\src\$name.$service.EntityFrameworkCore\$name.$service.EntityFrameworkCore.csproj"
dotnet remove ./$name/services/$folder/host/$name.$service.Web.Unified/$name.$service.Web.Unified.csproj reference "..\..\src\$name.$service.HttpApi\$name.$service.HttpApi.csproj"
dotnet remove ./$name/services/$folder/test/$name.$service.HttpApi.Client.ConsoleTestApp/$name.$service.HttpApi.Client.ConsoleTestApp.csproj reference "..\..\src\$name.$service.HttpApi.Client\$name.$service.HttpApi.Client.csproj"
}
## Move Project
Move-Item -Path ./$name/services/$folder/src/$name.$service.Domain.Shared -Destination $shared_folder"/$name.$service.Domain.Shared" -Force
Move-Item -Path ./$name/services/$folder/src/$name.$service.Application.Contracts -Destination $shared_folder"/$name.$service.Application.Contracts" -Force
Move-Item -Path ./$name/services/$folder/src/$name.$service.HttpApi.Client -Destination $shared_folder"/$name.$service.HttpApi.Client" -Force
if ($ui_enable -eq "True") {
Move-Item -Path "./$name/services/$folder/src/$name.$service.Blazor" -Destination "./$name/$apps_path/$folder/src/$name.$service.Blazor" -Force
Move-Item -Path "./$name/services/$folder/src/$name.$service.Blazor.WebAssembly" -Destination "./$name/$apps_path/$folder/src/$name.$service.Blazor.WebAssembly" -Force
Move-Item -Path "./$name/services/$folder/src/$name.$service.Blazor.Server" -Destination "./$name/$apps_path/$folder/src/$name.$service.Blazor.Server" -Force
Move-Item -Path "./$name/services/$folder/src/$name.$service.Web" -Destination "./$name/$apps_path/$folder/src/$name.$service.Web" -Force
Move-Item -Path "./$name/services/$folder/host/$name.$service.Blazor.Host" -Destination "./$name/$apps_path/$folder/host/$name.$service.Blazor.Host" -Force
Move-Item -Path "./$name/services/$folder/host/$name.$service.Blazor.Host.Client" -Destination "./$name/$apps_path/$folder/host/$name.$service.Blazor.Host.Client" -Force
Move-Item -Path "./$name/services/$folder/host/$name.$service.Blazor.Server.Host" -Destination "./$name/$apps_path/$folder/host/$name.$service.Blazor.Server.Host" -Force
Move-Item -Path "./$name/services/$folder/host/$name.$service.Web.Host" -Destination "./$name/$apps_path/$folder/host/$name.$service.Web.Host" -Force
Move-Item -Path "./$name/services/$folder/host/$name.$service.Web.Unified" -Destination "./$name/$apps_path/$folder/host/$name.$service.Web.Unified" -Force
# Angular client
Move-Item -Path "./$name/services/$folder/angular" -Destination "./$name/$apps_path/angular/$folder" -Force
#if (-not(Test-Path -Path "./$name/$apps_path/angular/projects/dev-app")) {
# Move-Item -Path "./$name/services/$folder/angular/projects/dev-app" -Destination "./$name/$apps_path/angular/projects/" -Force
#}
#Remove-Item -Recurse -Force ./$name/services/$folder/angular*
}
## Add reference back to projects
dotnet add ./$name/services/$folder/src/$name.$service.Domain/$name.$service.Domain.csproj reference "$shared_folder/$name.$service.Domain.Shared/$name.$service.Domain.Shared.csproj"
dotnet add ./$name/services/$folder/src/$name.$service.Application/$name.$service.Application.csproj reference "$shared_folder/$name.$service.Application.Contracts/$name.$service.Application.Contracts.csproj"
dotnet add ./$name/services/$folder/src/$name.$service.HttpApi/$name.$service.HttpApi.csproj reference "$shared_folder/$name.$service.Application.Contracts/$name.$service.Application.Contracts.csproj"
dotnet add ./$name/$apps_path/$folder/src/$name.$service.Blazor/$name.$service.Blazor.csproj reference "$shared_folder/$name.$service.Application.Contracts/$name.$service.Application.Contracts.csproj"
dotnet add ./$name/$apps_path/$folder/src/$name.$service.Blazor.WebAssembly/$name.$service.Blazor.WebAssembly.csproj reference "$shared_folder/$name.$service.HttpApi.Client/$name.$service.HttpApi.Client.csproj"
dotnet add ./$name/$apps_path/$folder/src/$name.$service.Web/$name.$service.Web.csproj reference "$shared_folder/$name.$service.Application.Contracts/$name.$service.Application.Contracts.csproj"
#dotnet add ./$name/$apps_path/$folder/src/$name.$service.Web/$name.$service.Web.csproj reference "$shared_folder/$name.$service.HttpApi.Client/$name.$service.HttpApi.Client.csproj"
if ($ui_enable -eq "True") {
#dotnet add ./$name/$apps_path/$folder/host/$name.$service.Blazor.Host/$name.$service.Blazor.Host.csproj reference ./$name/services/$folder/host/$name.$service.Host.Shared/$name.$service.Host.Shared.csproj
dotnet add ./$name/$apps_path/$folder/host/$name.$service.Blazor.Server.Host/$name.$service.Blazor.Server.Host.csproj reference ./$name/services/$folder/host/$name.$service.Host.Shared/$name.$service.Host.Shared.csproj
dotnet add ./$name/$apps_path/$folder/host/$name.$service.Blazor.Server.Host/$name.$service.Blazor.Server.Host.csproj reference ./$name/services/$folder/src/$name.$service.Application/$name.$service.Application.csproj
dotnet add ./$name/$apps_path/$folder/host/$name.$service.Blazor.Server.Host/$name.$service.Blazor.Server.Host.csproj reference ./$name/services/$folder/src/$name.$service.EntityFrameworkCore/$name.$service.EntityFrameworkCore.csproj
dotnet add ./$name/$apps_path/$folder/host/$name.$service.Blazor.Server.Host/$name.$service.Blazor.Server.Host.csproj reference ./$name/services/$folder/src/$name.$service.HttpApi/$name.$service.HttpApi.csproj
#dotnet add ./$name/$apps_path/$folder/host/$name.$service.Web.Host/$name.$service.Web.Host.csproj reference ./$name/services/$folder/host/$name.$service.Host.Shared/$name.$service.Host.Shared.csproj
#dotnet add ./$name/$apps_path/$folder/host/$name.$service.Web.Host/$name.$service.Web.Host.csproj reference ./$name/services/$folder/src/$name.$service.HttpApi/$name.$service.HttpApi.csproj
dotnet add ./$name/$apps_path/$folder/host/$name.$service.Web.Host/$name.$service.Web.Host.csproj reference "$shared_folder/$name.$service.HttpApi.Client/$name.$service.HttpApi.Client.csproj"
dotnet add ./$name/$apps_path/$folder/host/$name.$service.Web.Unified/$name.$service.Web.Unified.csproj reference ./$name/services/$folder/host/$name.$service.Host.Shared/$name.$service.Host.Shared.csproj
dotnet add ./$name/$apps_path/$folder/host/$name.$service.Web.Unified/$name.$service.Web.Unified.csproj reference ./$name/services/$folder/src/$name.$service.Application/$name.$service.Application.csproj
dotnet add ./$name/$apps_path/$folder/host/$name.$service.Web.Unified/$name.$service.Web.Unified.csproj reference ./$name/services/$folder/src/$name.$service.EntityFrameworkCore/$name.$service.EntityFrameworkCore.csproj
dotnet add ./$name/$apps_path/$folder/host/$name.$service.Web.Unified/$name.$service.Web.Unified.csproj reference ./$name/services/$folder/src/$name.$service.HttpApi/$name.$service.HttpApi.csproj
dotnet add ./$name/services/$folder/test/$name.$service.HttpApi.Client.ConsoleTestApp/$name.$service.HttpApi.Client.ConsoleTestApp.csproj reference "$shared_folder/$name.$service.HttpApi.Client/$name.$service.HttpApi.Client.csproj"
}
} else {
}
# DBMigrator
if ($service -eq $admin_name)
{
Write-Output "CREATE DbMigrator"
$migrator_path = "./$name/services/$folder/host"
Write-Output "dotnet new console -n "$name.$service.DbMigrator" -o "$migrator_path/$name.$service.DbMigrator""
dotnet new console -n "$name.$service.DbMigrator" -o "$migrator_path/$name.$service.DbMigrator"
dotnet add $migrator_path/$name.$service.DbMigrator/$name.$service.DbMigrator.csproj package Microsoft.EntityFrameworkCore.Tools -v "8.0.4"
dotnet add $migrator_path/$name.$service.DbMigrator/$name.$service.DbMigrator.csproj package Microsoft.Extensions.Hosting -v "8.0.*"
dotnet add $migrator_path/$name.$service.DbMigrator/$name.$service.DbMigrator.csproj package Serilog.Extensions.Logging -v "3.1.0"
dotnet add $migrator_path/$name.$service.DbMigrator/$name.$service.DbMigrator.csproj package Serilog.Sinks.Async -v "1.5.0"
dotnet add $migrator_path/$name.$service.DbMigrator/$name.$service.DbMigrator.csproj package Serilog.Sinks.File -v "5.0.0"
dotnet add $migrator_path/$name.$service.DbMigrator/$name.$service.DbMigrator.csproj package Serilog.Sinks.ColoredConsole -v "3.0.1"
dotnet add $migrator_path/$name.$service.DbMigrator/$name.$service.DbMigrator.csproj package Volo.Abp.Autofac -v $abpver
dotnet add $migrator_path/$name.$service.DbMigrator/$name.$service.DbMigrator.csproj package Volo.Abp.BackgroundJobs -v $abpver
dotnet add $migrator_path/$name.$service.DbMigrator/$name.$service.DbMigrator.csproj package Volo.Abp.TenantManagement.EntityFrameworkCore -v $abpver
dotnet add $migrator_path/$name.$service.DbMigrator/$name.$service.DbMigrator.csproj package Volo.Abp.EntityFrameworkCore.PostgreSql -v $abpver
dotnet add $migrator_path/$name.$service.DbMigrator/$name.$service.DbMigrator.csproj reference ./$name/services/$folder/src/$name.$service.EntityFrameworkCore/$name.$service.EntityFrameworkCore.csproj
#Copy-Item -Path "./libs/Domain/*" -Destination "$migrator_path/$name.$service.Domain/" -recurse -Force
#Copy-Item -Path "./libs/EntityFrameworkCore/*" -Destination $migrator_path/$name.$service.EntityFrameworkCore/ -recurse -Force
Copy-Item -Path "./libs/Bamboo.Shared.DbMigrator/*" -Destination "$migrator_path/$name.$service.DbMigrator/" -recurse -Force
#if ($service -ne $admin_name) {
# Copy-Item -Path "./libs/Bamboo.Shared.DbMigrator/*" -Destination "$migrator_path/$name.$service.DbMigrator/" -recurse -Force
#}
if ($service -eq $admin_name) {
#Copy-Item -Path "./libs/Bamboo.Shared.DbMigrator/*" -Destination "$migrator_path/$name.$service.DbMigrator/" -recurse -Force
#dotnet add $migrator_path/$name.$service.DbMigrator/$name.$service.DbMigrator.csproj package Volo.Abp.BackgroundJobs -v $abpver
dotnet add $migrator_path/$name.$service.DbMigrator/$name.$service.DbMigrator.csproj package Volo.Abp.Identity.Domain -v $abpver
#dotnet add $migrator_path/$name.$service.DbMigrator/$name.$service.DbMigrator.csproj package Volo.Abp.TenantManagement.Domain -v $abpver
}
if ($use_share -eq "True") {
dotnet add $migrator_path/$name.$service.DbMigrator/$name.$service.DbMigrator.csproj reference "$shared_folder/$name.$service.Application.Contracts/$name.$service.Application.Contracts.csproj"
} else {
dotnet add $migrator_path/$name.$service.DbMigrator/$name.$service.DbMigrator.csproj reference ./$name/services/$folder/src/$name.$service.Application.Contracts/$name.$service.Application.Contracts.csproj
}
dotnet sln "./$name/services/$folder/$name.$service.sln" add --solution-folder host $migrator_path/$name.$service.DbMigrator/$name.$service.DbMigrator.csproj
}
# End DBMigrator
dotnet add $shared_folder/"$name.$service".Domain.Shared/"$name.$service".Domain.Shared.csproj reference ./$shared_common/$name.Shared.Common/$name.Shared.Common.csproj
Write-Output "Solution remove ./$name/services/$folder/$name.$service.sln"
#dotnet sln "./$name/services/$folder/$name.$service.sln" remove (Get-ChildItem -r ./$name/services/$folder/host/$name.$service.Host.Shared/$name.$service.Host.Shared.csproj)
#dotnet sln "./$name/services/$folder/$name.$service.sln" remove (Get-ChildItem -r ./$name/services/$folder/src/$name.$service.MongoDB/$name.$service.MongoDB.csproj)
dotnet sln "./$name/services/$folder/$name.$service.sln" remove (Get-ChildItem -r ./$name/services/$folder/test/$name.$service.MongoDB.Tests/$name.$service.MongoDB.Tests.csproj)
dotnet sln "./$name/services/$folder/$name.$service.sln" remove (Get-ChildItem -r ./$name/services/$folder/src/$name.$service.Installer/$name.$service.Installer.csproj)
if ($service -ne $admin_name) {
#Remove-Item -Recurse -Force (Get-ChildItem -r ./$name/services/**/*.$service.AuthServer)
}
Write-Output "REMOVE UN-USE ITEMS"
#Remove-Item -Recurse -Force (Get-ChildItem -r **/*.$service.Host.Shared)
#Remove-Item -Recurse -Force ./$name/services/$folder/src/*.$service.MongoDB
Remove-Item -Recurse -Force ./$name/services/$folder/test/*.$service.MongoDB.Tests
Remove-Item -Recurse -Force ./$name/services/$folder/src/*.$service.Installer
#Remove-Item -Recurse -Force ./$name/services/$folder/angular*
Write-Output "ADD SHARED PROJECT TO SOLUTIONS"
Write-Output "Solution: add to ./$name/services/$folder/$name.$service.sln"
dotnet sln "./$name/services/$folder/$name.$service.sln" add --solution-folder shared (Get-ChildItem -r ./$shared_common/**/*.csproj)
if ($use_share -eq "True") {
dotnet sln "./$name/services/$folder/$name.$service.sln" add --solution-folder shared (Get-ChildItem -r $shared_folder/**/*.csproj)
}
Write-Output "Solution: add to ./$name/$apps_path/$folder/$name.$service.sln"
dotnet sln "./$name/$apps_path/$folder/$name.$service.sln" add --solution-folder shared (Get-ChildItem -r ./$shared_common/**/*.csproj)
if ($use_share -eq "True") {
dotnet sln "./$name/$apps_path/$folder/$name.$service.sln" add --solution-folder shared (Get-ChildItem -r $shared_folder/**/*.csproj)
}
if ($ui_enable -eq "True") {
#dotnet sln "./$name/services/$folder/$name.$service.sln" add --solution-folder "ui/shared"(Get-ChildItem -r ./$name/$apps_path/$folder/src/**/*.csproj)
#dotnet sln "./$name/services/$folder/$name.$service.sln" add --solution-folder "ui/host"(Get-ChildItem -r ./$name/$apps_path/$folder/host/**/*.csproj)
}
dotnet sln "./$name/services/$sln_service.sln" add (Get-ChildItem -r ./$name/services/$folder/**/*.csproj)
if ($use_share -eq "True") {
dotnet sln "./$name/services/$sln_service.sln" add --solution-folder "$name/modules_shared" (Get-ChildItem -r $shared_folder/**/*.csproj)
if ($ui_enable -eq "True") {
Write-Output "ADD SHARED PROJECT TO APP SOLUTIONS"
dotnet sln "./$name/$apps_path/$name.Web.Blazor.sln" add --solution-folder "ui" (Get-ChildItem -r ./$name/$apps_path/$folder/src/*.Blazor.csproj)
dotnet sln "./$name/$apps_path/$name.Web.Blazor.sln" add --solution-folder "ui" (Get-ChildItem -r ./$name/$apps_path/$folder/src/*.WebAssembly.csproj)
dotnet sln "./$name/$apps_path/$name.Web.Blazor.sln" add --solution-folder "modules_shared" (Get-ChildItem -r $shared_folder/**/*.csproj)
#dotnet add ./$name/$apps_path/$name.Blazor/$name.Blazor.csproj reference ./$name/$apps_path/$folder/src/$name.$service.Blazor.WebAssembly/$name.$service.Blazor.WebAssembly.csproj
dotnet sln "./$name/$apps_path/$name.Web.BlazorServer.sln" add --solution-folder "ui" (Get-ChildItem -r ./$name/$apps_path/$folder/src/*.Blazor.csproj)
dotnet sln "./$name/$apps_path/$name.Web.BlazorServer.sln" add --solution-folder "ui" (Get-ChildItem -r ./$name/$apps_path/$folder/src/*.Blazor.Server.csproj)
dotnet sln "./$name/$apps_path/$name.Web.BlazorServer.sln" add --solution-folder "modules_shared" (Get-ChildItem -r $shared_folder/**/*.csproj)
#dotnet add ./$name/$apps_path/$name.BlazorServer/$name.BlazorServer.csproj reference ./$name/$apps_path/$folder/src/$name.$service.Blazor.Server/$name.$service.Blazor.Server.csproj
# MVC
dotnet sln ./$name/$apps_path/$name.Web.MVC.sln add --solution-folder "ui" (Get-ChildItem -r ./$name/$apps_path/$folder/src/*.Web.csproj)
dotnet sln ./$name/$apps_path/$name.Web.MVC.sln add --solution-folder "modules_shared" (Get-ChildItem -r $shared_folder/**/*.csproj)
dotnet sln ./$name/$apps_path/$name.Web.MVC.sln add --solution-folder "modules_shared" ./$name/services/$folder/src/$name.$service.HttpApi/$name.$service.HttpApi.csproj
#dotnet add ./$name/$apps_path/$name.Web/$name.Web.csproj reference ./$name/$apps_path/$folder/src/$name.$service.Web/$name.$service.Web.csproj
#dotnet add ./$name/$apps_path/$name.Web/$name.Web.csproj reference ./$name/services/$folder/src/$name.$service.HttpApi/$name.$service.HttpApi.csproj
}
}
if ($service -eq $admin_name) {
Write-Output "ADD ADMIN PROJECT TO APP SOLUTION"
Copy-Item -Path "./libs/Bamboo.AdminExtensions" -Destination ./$name/services/$folder/src/$name.AdminExtensions -recurse -Force
Move-Item -Path "./$name/services/$folder/src/$name.AdminExtensions/Bamboo.AdminExtensions.csproj" -Destination "./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj" -Force
Copy-Item -Path "./libs/Bamboo.LoginUi.Web" -Destination ./$name/services/$folder/src/$name.LoginUi.Web -recurse -Force
Move-Item -Path "./$name/services/$folder/src/$name.LoginUi.Web/Bamboo.LoginUi.Web.csproj" -Destination "./$name/services/$folder/src/$name.LoginUi.Web/$name.LoginUi.Web.csproj" -Force
Copy-Item -Path "./libs/Data/AdminDbExtensions" -Destination ./$name/services/$folder/src/$name.$service.EntityFrameworkCore/ -recurse -Force
AdminServiceAddReference
# AuthServer
dotnet add ./$name/services/$folder/host/$name.$service.AuthServer/$name.$service.AuthServer.csproj package DistributedLock.Redis -v 1.0.2
dotnet add ./$name/services/$folder/host/$name.$service.AuthServer/$name.$service.AuthServer.csproj package Volo.Abp.EntityFrameworkCore.PostgreSql -v $abpver
dotnet add ./$name/services/$folder/host/$name.$service.AuthServer/$name.$service.AuthServer.csproj package Volo.Abp.DistributedLocking -v $abpver
dotnet remove ./$name/services/$folder/host/$name.$service.AuthServer/$name.$service.AuthServer.csproj reference "..\..\src\$name.$service.Application.Contracts\$name.$service.Application.Contracts.csproj"
dotnet add ./$name/services/$folder/host/$name.$service.AuthServer/$name.$service.AuthServer.csproj reference "$shared_folder/$name.$service.Application.Contracts/$name.$service.Application.Contracts.csproj"
#dotnet add ./$name/services/$folder/host/$name.$service.AuthServer/$name.$service.AuthServer.csproj reference "..\..\src\$name.$service.Application.Contracts\$name.$service.Application.Contracts.csproj"
#dotnet add ./$name/services/$folder/host/$name.$service.AuthServer/$name.$service.AuthServer.csproj reference ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj
dotnet add ./$name/services/$folder/host/$name.$service.AuthServer/$name.$service.AuthServer.csproj reference ./$name/services/$folder/src/$name.LoginUi.Web/$name.LoginUi.Web.csproj
dotnet add ./$name/services/$folder/host/$name.$service.AuthServer/$name.$service.AuthServer.csproj reference ./$shared_common/$name.Shared.Common/$name.Shared.Common.csproj
# Host
dotnet add ./$name/services/$folder/host/"$name.$service".HttpApi.Host/"$name.$service".HttpApi.Host.csproj package DistributedLock.Redis -v 1.0.2
dotnet add ./$name/services/$folder/host/"$name.$service".HttpApi.Host/"$name.$service".HttpApi.Host.csproj package Volo.Abp.DistributedLocking -v $abpver
#dotnet add ./$name/services/$folder/host/"$name.$service".HttpApi.Host/"$name.$service".HttpApi.Host.csproj package Volo.Abp.OpenIddict.AspNetCore -v $abpver
#dotnet add ./$name/services/$folder/host/"$name.$service".HttpApi.Host/"$name.$service".HttpApi.Host.csproj package Volo.Abp.BackgroundJobs.HangFire -v $abpver
dotnet add ./$name/services/$folder/host/$name.$service.HttpApi.Host/$name.$service.HttpApi.Host.csproj reference ./$name/services/$folder/src/$name.AdminExtensions/$name.AdminExtensions.csproj
#dotnet add ./$name/services/$folder/host/"$name.$service".HttpApi.Host/"$name.$service".HttpApi.Host.csproj reference ./$name/services/$folder/src/$name.LoginUi.Web/$name.LoginUi.Web.csproj
dotnet sln "./$name/services/$folder/$name.$service.sln" add (Get-ChildItem -r ./$name/services/$folder/src/**/*.csproj)
}
if ($service -eq 'CmsService') {
dotnet add ./$name/$apps_path/$folder/src/$name.$service.Web/$name.$service.Web.csproj package Volo.CmsKit.Public.Web -v $abpver
CmsKitAddReference
}
Remove-Item -Recurse -Force ./$name/services/$folder/host/$name.$service.HttpApi.Host/Migrations
#Remove-Item -Recurse -Force ./$name/services/$folder/host/$name.$service.DbMigrator/Migrations
# Write-Output "abp create-migration-and-run-migrator ./$name/services/$folder/src/$name.$service.Core.EntityFrameworkCore"
# MIGRATIONS
Write-Output "MIGRATIONS SCRIPTS"
Write-Output "dotnet ef migrations add Initial --startup-project ./$name/services/$folder/host/$name.$service.HttpApi.Host/$name.$service.HttpApi.Host.csproj --project ./$name/services/$folder/src/$name.$service.Core.EntityFrameworkCore/$name.$service.EntityFrameworkCore.csproj --context "$service"DbContext"
Write-Output "dotnet ef migrations add Initial --project ./$name/services/$folder/host/$name.$service.HttpApi.Host/$name.$service.HttpApi.Host.csproj"
#dotnet ef migrations add Initial --startup-project ./$name/services/$folder/host/$name.$service.HttpApi.Host/$name.$service.HttpApi.Host.csproj --project ./$name/services/$folder/src/$name.$service.Core.EntityFrameworkCore/$name.$service.EntityFrameworkCore.csproj --context $service"DbContext"
dotnet ef migrations add Initial --project ./$name/services/$folder/host/$name.$service.HttpApi.Host/$name.$service.HttpApi.Host.csproj
# Update database
Write-Output "UPDATE DATABASE SCRIPTS"
Write-Output "Change ConnectionStrings:$service in appsettings.json to correct database connection"
Write-Output "dotnet ef database update --startup-project ./$name/services/$folder/host/$name.$service.HttpApi.Host/$name.$service.HttpApi.Host.csproj --project ./$name/services/$folder/src/$name.$service.EntityFrameworkCore/$name.$service.EntityFrameworkCore.csproj --context "$service"DbContext"
Write-Output "dotnet ef database update --project ./$name/services/$folder/host/$name.$service.HttpApi.Host/$name.$service.HttpApi.Host.csproj"
#dotnet ef database update --startup-project ./$name/services/$folder/host/$name.$service.HttpApi.Host/$name.$service.HttpApi.Host.csproj --project ./$name/services/$folder/src/$name.$service.EntityFrameworkCore/$name.$service.EntityFrameworkCore.csproj --context $service"DbContext"
#dotnet ef database update --project ./$name/services/$folder/host/$name.$service.HttpApi.Host/$name.$service.HttpApi.Host.csproj"
# TEST
# dotnet ef migrations add Initial --startup-project ./Bamboo/services/core/host/Bamboo.Core.HttpApi.Host/Bamboo.Core.HttpApi.Host.csproj --project ./Bamboo/services/core/src/Bamboo.Core.EntityFrameworkCore/Bamboo.Core.EntityFrameworkCore.csproj --context CoreDbContext
# dotnet ef migrations add Initial --project ./Bamboo/services/core/host/Bamboo.Core.HttpApi.Host/Bamboo.Core.HttpApi.Host.csproj
# dotnet ef database update --project ./Bamboo/services/core/host/Bamboo.Core.HttpApi.Host/Bamboo.Core.HttpApi.Host.csproj
# DbMigrator
# dotnet ef migrations add Initial --project ./Bamboo/services/core/host/Bamboo.Core.DbMigrator/Bamboo.Core.DbMigrator.csproj
# dotnet ef database update --project ./Bamboo/services/core/host/Bamboo.Core.DbMigrator/Bamboo.Core.DbMigrator.csproj
}
}
CreateServices
cmd /c pause