File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
src/AbpCompanyName.AbpProjectName.Web/Startup
test/AbpCompanyName.AbpProjectName.Web.Tests Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 55using AbpCompanyName . AbpProjectName . Configuration ;
66using AbpCompanyName . AbpProjectName . EntityFrameworkCore ;
77using Microsoft . AspNetCore . Hosting ;
8+ using Microsoft . AspNetCore . Mvc . ApplicationParts ;
89using Microsoft . Extensions . Configuration ;
910
1011namespace AbpCompanyName . AbpProjectName . Web . Startup
@@ -38,5 +39,11 @@ public override void Initialize()
3839 {
3940 IocManager . RegisterAssemblyByConvention ( typeof ( AbpProjectNameWebModule ) . GetAssembly ( ) ) ;
4041 }
42+
43+ public override void PostInitialize ( )
44+ {
45+ IocManager . Resolve < ApplicationPartManager > ( )
46+ . AddApplicationPartsIfNotAddedBefore ( typeof ( AbpProjectNameWebModule ) . Assembly ) ;
47+ }
4148 }
4249}
Original file line number Diff line number Diff line change 11using System ;
22using System . Net ;
33using System . Net . Http ;
4+ using System . Reflection ;
45using System . Threading . Tasks ;
56using Abp . AspNetCore . TestBase ;
67using AbpCompanyName . AbpProjectName . EntityFrameworkCore ;
78using AbpCompanyName . AbpProjectName . Tests . TestDatas ;
9+ using AbpCompanyName . AbpProjectName . Web . Controllers ;
10+ using AbpCompanyName . AbpProjectName . Web . Startup ;
11+ using AbpCompanyName . AbpProjectName . Web . Tests . Controllers ;
812using AngleSharp . Html . Dom ;
913using AngleSharp . Html . Parser ;
1014using Microsoft . AspNetCore . Hosting ;
@@ -32,7 +36,8 @@ protected override IWebHostBuilder CreateWebHostBuilder()
3236 {
3337 return base
3438 . CreateWebHostBuilder ( )
35- . UseContentRoot ( ContentRootFolder . Value ) ;
39+ . UseContentRoot ( ContentRootFolder . Value )
40+ . UseSetting ( WebHostDefaults . ApplicationKey , typeof ( AbpProjectNameWebModule ) . Assembly . FullName ) ;
3641 }
3742
3843 #region Get response
You can’t perform that action at this time.
0 commit comments