Skip to content

Commit 0590ddf

Browse files
committed
Converted target framework to .netcoreapp1.1.
1 parent 1d9992c commit 0590ddf

File tree

10 files changed

+30
-56
lines changed

10 files changed

+30
-56
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
.vs/
55
obj/
66
bin/
7-
/aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Host/App_Data/Logs/Logs.txt
8-
aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Host/App_Data/Logs/Logs.txt
7+
aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Host/App_Data/Logs/
8+
aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/App_Data/Logs/

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/AbpCompanyName.AbpProjectName.Web.Mvc.csproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net461</TargetFramework>
4+
<TargetFramework>netcoreapp1.1</TargetFramework>
55
<PreserveCompilationContext>true</PreserveCompilationContext>
66
<AssemblyName>AbpCompanyName.AbpProjectName.Web.Mvc</AssemblyName>
77
<OutputType>Exe</OutputType>
@@ -10,6 +10,10 @@
1010
<RootNamespace>AbpCompanyName.AbpProjectName.Web</RootNamespace>
1111
</PropertyGroup>
1212

13+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
14+
<DefineConstants>FEATURE_SIGNALR</DefineConstants>
15+
</PropertyGroup>
16+
1317
<ItemGroup>
1418
<Content Include="wwwroot\images\app-logo-small.png" />
1519
</ItemGroup>
@@ -33,7 +37,7 @@
3337
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="1.1.0">
3438
<PrivateAssets>All</PrivateAssets>
3539
</PackageReference>
36-
<PackageReference Include="AspNet.Security.OpenIdConnect.Server" Version="1.0.0-beta6-final" />
40+
<PackageReference Include="AspNet.Security.OpenIdConnect.Server" Version="1.0.0-rc1-final" />
3741
<PackageReference Include="PaulMiami.AspNetCore.Mvc.Recaptcha" Version="1.2.0" />
3842
<PackageReference Include="Castle.LoggingFacility.MsLogging" Version="2.0.0" />
3943
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="1.1.1" />
@@ -52,9 +56,7 @@
5256
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.0" />
5357
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
5458
<PackageReference Include="Abp.HangFire" Version="2.0.1" />
55-
<PackageReference Include="Abp.Owin" Version="2.0.1" />
5659
<PackageReference Include="Abp.RedisCache" Version="2.0.1" />
57-
<PackageReference Include="Abp.Web.SignalR" Version="2.0.1" />
5860
<PackageReference Include="Abp.Castle.Log4Net" Version="2.0.1" />
5961
</ItemGroup>
6062

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Controllers/AccountController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public async Task<ActionResult> Register(RegisterViewModel model)
164164
externalLoginInfo = await _signInManager.GetExternalLoginInfoAsync();
165165
if (externalLoginInfo == null)
166166
{
167-
throw new ApplicationException("Can not external login!");
167+
throw new Exception("Can not external login!");
168168
}
169169

170170
model.UserName = model.EmailAddress;

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Startup/AbpProjectNameWebMvcModule.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Reflection;
22
using Abp.Modules;
3+
using Abp.Reflection.Extensions;
34
using AbpCompanyName.AbpProjectName.Configuration;
45
using Microsoft.AspNetCore.Hosting;
56
using Microsoft.Extensions.Configuration;
@@ -25,7 +26,7 @@ public override void PreInitialize()
2526

2627
public override void Initialize()
2728
{
28-
IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
29+
IocManager.RegisterAssemblyByConvention(typeof(AbpProjectNameWebMvcModule).GetAssembly());
2930
}
3031
}
3132
}

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Startup/Owin/BuilderExtensions.cs

Lines changed: 0 additions & 36 deletions
This file was deleted.

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Startup/Startup.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using Abp.AspNetCore;
33
using Abp.Castle.Logging.Log4Net;
4-
using Abp.Owin;
54
using AbpCompanyName.AbpProjectName.Authorization.Roles;
65
using AbpCompanyName.AbpProjectName.Authorization.Users;
76
using AbpCompanyName.AbpProjectName.Configuration;
@@ -15,8 +14,12 @@
1514
using Microsoft.Extensions.Configuration;
1615
using Microsoft.Extensions.DependencyInjection;
1716
using Microsoft.Extensions.Logging;
18-
using AbpCompanyName.AbpProjectName.Web.Startup.Owin;
17+
18+
#if FEATURE_SIGNALR
1919
using Owin;
20+
using Abp.Owin;
21+
using AbpCompanyName.AbpProjectName.Owin;
22+
#endif
2023

2124
namespace AbpCompanyName.AbpProjectName.Web.Startup
2225
{
@@ -78,8 +81,10 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
7881

7982
app.UseStaticFiles();
8083

84+
#if FEATURE_SIGNALR
8185
//Integrate to OWIN
8286
app.UseAppBuilder(ConfigureOwinServices);
87+
#endif
8388

8489
app.UseMvc(routes =>
8590
{
@@ -93,6 +98,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
9398
});
9499
}
95100

101+
#if FEATURE_SIGNALR
96102
private static void ConfigureOwinServices(IAppBuilder app)
97103
{
98104
app.Properties["host.AppName"] = "AbpProjectName";
@@ -101,5 +107,6 @@ private static void ConfigureOwinServices(IAppBuilder app)
101107

102108
app.MapSignalR();
103109
}
110+
#endif
104111
}
105112
}

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Account/Login.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969

7070
Func<string, string> getSocialIconClass = (provider) =>
7171
{
72-
provider = provider.ToLower(CultureInfo.InvariantCulture);
72+
provider = provider.ToLowerInvariant();
7373

7474
if (provider == "microsoft")
7575
{

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Account/_Layout.cshtml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
@using Abp.Web.Security.AntiForgery
2-
@using System.Threading
1+
@using System.Globalization
2+
@using Abp.Web.Security.AntiForgery
33
@using Abp.Configuration.Startup
4-
@using Abp.Timing
54
@using AbpCompanyName.AbpProjectName.Web.Resources
65
@inject AbpCompanyName.AbpProjectName.Timing.AppTimes AppTimes
76
@inject IAbpAntiForgeryManager AbpAntiForgeryManager
@@ -100,7 +99,7 @@
10099

101100
<script>
102101
//Localizing momentjs
103-
moment.locale('@Thread.CurrentThread.CurrentUICulture.Name');
102+
moment.locale('@CultureInfo.CurrentUICulture.Name');
104103
</script>
105104

106105
<!-- Dynamic scripts of ABP system (They are created on runtime and can not be bundled) -->

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Shared/_Layout.cshtml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
@using Abp.Web.Security.AntiForgery
1+
@using System.Globalization
2+
@using Abp.Web.Security.AntiForgery
23
@using System.Threading
34
@using Abp.Configuration.Startup
45
@using Abp.Timing
@@ -94,7 +95,7 @@
9495

9596
<script>
9697
//Localizing momentjs
97-
moment.locale('@Thread.CurrentThread.CurrentUICulture.Name');
98+
moment.locale('@CultureInfo.CurrentUICulture.Name');
9899
</script>
99100

100101
<!-- Dynamic scripts of ABP system (They are created on runtime and can not be bundled) -->

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Users/Index.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,19 @@
5959
</div>
6060
<div class="form-group">
6161
<label>@L("Name")</label>
62-
<input type="text" name="Name" class="form-control" required maxlength="@AbpCompanyName.AbpProjectName.Authorization.Users.User.MaxNameLength">
62+
<input type="text" name="Name" class="form-control" required maxlength="@AbpUserBase.MaxNameLength">
6363
</div>
6464
<div class="form-group">
6565
<label>@L("Surname")</label>
66-
<input type="text" name="Surname" class="form-control" required maxlength="@AbpCompanyName.AbpProjectName.Authorization.Users.User.MaxSurnameLength">
66+
<input type="text" name="Surname" class="form-control" required maxlength="@AbpUserBase.MaxSurnameLength">
6767
</div>
6868
<div class="form-group">
6969
<label>@L("EmailAddress")</label>
7070
<input type="email" name="EmailAddress" class="form-control" maxlength="@AbpUserBase.MaxEmailAddressLength">
7171
</div>
7272
<div class="form-group">
7373
<label>@L("Password")</label>
74-
<input type="password" name="Password" class="form-control" required maxlength="@AbpCompanyName.AbpProjectName.Authorization.Users.User.MaxPlainPasswordLength">
74+
<input type="password" name="Password" class="form-control" required maxlength="@AbpUserBase.MaxPlainPasswordLength">
7575
</div>
7676
<div class="checkbox">
7777
<label>

0 commit comments

Comments
 (0)