Skip to content

Commit 39cc191

Browse files
feat: upgrade to net5.0 (#42)
1 parent 4663029 commit 39cc191

File tree

14 files changed

+71
-52
lines changed

14 files changed

+71
-52
lines changed

.template.config/templates/hosted/src/Client/AntDesign.Pro.Template.Client.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.1</TargetFramework>
5-
<RazorLangVersion>3.0</RazorLangVersion>
4+
<TargetFramework>net5.0</TargetFramework>
65
</PropertyGroup>
76

87
<ItemGroup>
98
<PackageReference Include="AntDesign" Version="0.5.0-*" />
109
<PackageReference Include="AntDesign.Charts" Version="0.2.0-*" />
1110
<PackageReference Include="AntDesign.Pro.Layout" Version="0.1.0-*" />
12-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.0" />
13-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Build" Version="3.2.0" PrivateAssets="all" />
14-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="3.2.0" PrivateAssets="all" />
15-
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="3.1.6" />
16-
<PackageReference Include="System.Net.Http.Json" Version="3.2.0" />
11+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0" />
12+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.0" PrivateAssets="all" />
13+
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0" />
14+
<PackageReference Include="System.Net.Http.Json" Version="5.0.0" />
1715
</ItemGroup>
1816

1917
<PropertyGroup Condition=" '$(SolutionDir)'==''">
@@ -38,9 +36,4 @@
3836
<Exec WorkingDirectory="$(SolutionDir)" Command="npm install" />
3937
<Exec WorkingDirectory="$(SolutionDir)" Command="npm run gulp:pro" />
4038
</Target>
41-
42-
<ItemGroup>
43-
<Watch Include="**\*.razor" />
44-
<Watch Include="**\*.less" />
45-
</ItemGroup>
4639
</Project>

.template.config/templates/hosted/src/Client/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class Program
1515
public static async Task Main(string[] args)
1616
{
1717
var builder = WebAssemblyHostBuilder.CreateDefault(args);
18-
builder.RootComponents.Add<App>("app");
18+
builder.RootComponents.Add<App>("#app");
1919

2020
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
2121
builder.Services.AddAntDesign();

.template.config/templates/hosted/src/Server/AntDesign.Pro.Template.Server.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net5.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="3.2.0" />
8+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="5.0.0" />
99
</ItemGroup>
1010

1111
<ItemGroup>

.template.config/templates/hosted/src/Server/appsettings.Development.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
"Microsoft.Hosting.Lifetime": "Information"
77
}
88
}
9-
}
9+
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"Logging": {
3-
"LogLevel": {
3+
"LogLevel": {
44
"Default": "Information",
55
"Microsoft": "Warning",
66
"Microsoft.Hosting.Lifetime": "Information"
7-
}
8-
},
9-
"AllowedHosts": "*"
10-
}
7+
}
8+
},
9+
"AllowedHosts": "*"
10+
}

.template.config/templates/server/AntDesign.Pro.Template.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net5.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>
88
<PackageReference Include="AntDesign" Version="0.5.0-*" />
99
<PackageReference Include="AntDesign.Charts" Version="0.2.0-*" />
1010
<PackageReference Include="AntDesign.Pro.Layout" Version="0.1.0-*" />
11-
<PackageReference Include="System.Net.Http.Json" Version="3.2.0" />
11+
<PackageReference Include="System.Net.Http.Json" Version="5.0.0" />
1212
</ItemGroup>
1313

1414
<PropertyGroup Condition=" '$(SolutionDir)'==''">
@@ -33,9 +33,4 @@
3333
<Exec WorkingDirectory="$(SolutionDir)" Command="npm install" />
3434
<Exec WorkingDirectory="$(SolutionDir)" Command="npm run gulp:pro" />
3535
</Target>
36-
37-
<ItemGroup>
38-
<Watch Include="**\*.razor" />
39-
<Watch Include="**\*.less" />
40-
</ItemGroup>
4136
</Project>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"iisSettings": {
3+
"windowsAuthentication": false,
4+
"anonymousAuthentication": true,
5+
"iisExpress": {
6+
"applicationUrl": "http://localhost:53775",
7+
"sslPort": 44358
8+
}
9+
},
10+
"profiles": {
11+
"IIS Express": {
12+
"commandName": "IISExpress",
13+
"launchBrowser": true,
14+
"environmentVariables": {
15+
"ASPNETCORE_ENVIRONMENT": "Development"
16+
}
17+
},
18+
"AntDesign.Pro.Template": {
19+
"commandName": "Project",
20+
"dotnetRunMessages": "true",
21+
"launchBrowser": true,
22+
"applicationUrl": "https://localhost:5001;http://localhost:5000",
23+
"environmentVariables": {
24+
"ASPNETCORE_ENVIRONMENT": "Development"
25+
}
26+
}
27+
}
28+
}

.template.config/templates/wasm/AntDesign.Pro.Template.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.1</TargetFramework>
4+
<TargetFramework>net5</TargetFramework>
55
<RazorLangVersion>3.0</RazorLangVersion>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="AntDesign" Version="0.5.0-*" />
1010
<PackageReference Include="AntDesign.Charts" Version="0.2.0-*" />
1111
<PackageReference Include="AntDesign.Pro.Layout" Version="0.1.0-*" />
12-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.0" />
13-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Build" Version="3.2.0" PrivateAssets="all" />
14-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="3.2.0" PrivateAssets="all" />
15-
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="3.1.6" />
16-
<PackageReference Include="System.Net.Http.Json" Version="3.2.0" />
12+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0" />
13+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.0" PrivateAssets="all" />
14+
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0" />
15+
<PackageReference Include="System.Net.Http.Json" Version="5.0.0" />
1716
</ItemGroup>
1817

1918
<PropertyGroup Condition=" '$(SolutionDir)'==''">
@@ -38,9 +37,4 @@
3837
<Exec WorkingDirectory="$(SolutionDir)" Command="npm install" />
3938
<Exec WorkingDirectory="$(SolutionDir)" Command="npm run gulp:pro" />
4039
</Target>
41-
42-
<ItemGroup>
43-
<Watch Include="**\*.razor" />
44-
<Watch Include="**\*.less" />
45-
</ItemGroup>
4640
</Project>

.template.config/templates/wasm/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class Program
1515
public static async Task Main(string[] args)
1616
{
1717
var builder = WebAssemblyHostBuilder.CreateDefault(args);
18-
builder.RootComponents.Add<App>("app");
18+
builder.RootComponents.Add<App>("#app");
1919

2020
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
2121
builder.Services.AddAntDesign();

.template.config/templates/wasm/wwwroot/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@
1818

1919
<body>
2020
<noscript>Out-of-the-box mid-stage front/design solution!</noscript>
21-
<app id="root">
21+
<div id="app">
2222
<style>
2323
html,
2424
body,
25-
#root {
25+
#app {
2626
height: 100%;
2727
margin: 0;
2828
padding: 0;
2929
}
3030

31-
#root {
31+
#app {
3232
background-image: url('<%= context.config.publicPath +"home_bg.png"%>');
3333
background-repeat: no-repeat;
3434
background-size: 100% auto;
@@ -199,7 +199,7 @@
199199
Ant Design Blazor
200200
</div>
201201
</div>
202-
</app>
202+
</div>
203203

204204
<script src="_content/AntDesign.Charts/g2plot.js"></script>
205205
<script src="_content/AntDesign/js/ant-design-blazor.js"></script>

0 commit comments

Comments
 (0)