File tree 2 files changed +13
-1
lines changed
src/AbpCompanyName.AbpProjectName.Web/Startup
test/AbpCompanyName.AbpProjectName.Web.Tests
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 5
5
using AbpCompanyName . AbpProjectName . Configuration ;
6
6
using AbpCompanyName . AbpProjectName . EntityFrameworkCore ;
7
7
using Microsoft . AspNetCore . Hosting ;
8
+ using Microsoft . AspNetCore . Mvc . ApplicationParts ;
8
9
using Microsoft . Extensions . Configuration ;
9
10
10
11
namespace AbpCompanyName . AbpProjectName . Web . Startup
@@ -38,5 +39,11 @@ public override void Initialize()
38
39
{
39
40
IocManager . RegisterAssemblyByConvention ( typeof ( AbpProjectNameWebModule ) . GetAssembly ( ) ) ;
40
41
}
42
+
43
+ public override void PostInitialize ( )
44
+ {
45
+ IocManager . Resolve < ApplicationPartManager > ( )
46
+ . AddApplicationPartsIfNotAddedBefore ( typeof ( AbpProjectNameWebModule ) . Assembly ) ;
47
+ }
41
48
}
42
49
}
Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Net ;
3
3
using System . Net . Http ;
4
+ using System . Reflection ;
4
5
using System . Threading . Tasks ;
5
6
using Abp . AspNetCore . TestBase ;
6
7
using AbpCompanyName . AbpProjectName . EntityFrameworkCore ;
7
8
using AbpCompanyName . AbpProjectName . Tests . TestDatas ;
9
+ using AbpCompanyName . AbpProjectName . Web . Controllers ;
10
+ using AbpCompanyName . AbpProjectName . Web . Startup ;
11
+ using AbpCompanyName . AbpProjectName . Web . Tests . Controllers ;
8
12
using AngleSharp . Html . Dom ;
9
13
using AngleSharp . Html . Parser ;
10
14
using Microsoft . AspNetCore . Hosting ;
@@ -32,7 +36,8 @@ protected override IWebHostBuilder CreateWebHostBuilder()
32
36
{
33
37
return base
34
38
. CreateWebHostBuilder ( )
35
- . UseContentRoot ( ContentRootFolder . Value ) ;
39
+ . UseContentRoot ( ContentRootFolder . Value )
40
+ . UseSetting ( WebHostDefaults . ApplicationKey , typeof ( AbpProjectNameWebModule ) . Assembly . FullName ) ;
36
41
}
37
42
38
43
#region Get response
You can’t perform that action at this time.
0 commit comments