Skip to content

Commit c931d47

Browse files
authored
migrate to .net core 3 (#132)
* covert api from .net 2.2 -> 3.1 * core and services project are just standar libraries, so convert target framework to netstandard2.1 to make it lightweight * convert web FE from .net 2.2 to .net core 3.1
1 parent 0e47539 commit c931d47

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2916
-3456
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -214,4 +214,6 @@ FakesAssemblies/
214214
/src/Api/Modules/*
215215
/src/Api/Plugins/*
216216
/src/AccountGoWeb/Modules/*
217-
/src/AccountGoWeb/Plugins/*
217+
/src/AccountGoWeb/Plugins/*
218+
219+
.vscode

.vscode/RestApi/TestApi.rest

-6
This file was deleted.

.vscode/launch.json

-46
This file was deleted.

.vscode/tasks.json

-15
This file was deleted.

docs/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ Accounting System built on .net core, opensource and cross platform (ASP.NET Cor
55

66
### IMPORTANT NOTE:
77

8-
- Make sure you have the latest .net core 2.2 sdk and runtime installed. Go to https://www.microsoft.com/net/download/dotnet-core/2.2 to download the installer. Verify you have .net 2.2 sdk:
8+
- Make sure you have the latest .net core 3.1 sdk and runtime installed. Go to https://dotnet.microsoft.com/download/dotnet-core/3.1 to download the installer. Verify you have .net core 3.1.* (* means the latest) sdk:
99

1010
```
1111
% dotnet --list-sdks
12-
2.2.207 [/Users/Marvin/.dotnet/sdk]
12+
3.1.302 [/Users/Marvin/.dotnet/sdk]
1313
```
1414

1515
- You can use MacOS, Linux, Windows to develop and deploy this project.
@@ -184,7 +184,7 @@ To run everything (database, api, web) in docker container you can use docker-co
184184
1. Initialize data by calling a special api endpoint directly. http://localhost:8001/api/administration/initializedcompany
185185

186186
# Technology Stack
187-
- ASP.NET Core 2.2
187+
- ASP.NET Core 3.1
188188
- ReactJS
189189
- MobX, React-MobX
190190
- Axios

src/AccountGoWeb/.vscode/launch.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"type": "coreclr",
1010
"request": "launch",
1111
"preLaunchTask": "build",
12-
"program": "../../.build/bin/AccountGoWeb/Debug/netcoreapp2.2/AccountGoWeb.dll",
12+
"program": "../../.build/bin/AccountGoWeb/Debug/netcoreapp3.1/AccountGoWeb.dll",
1313
"args": [],
1414
"cwd": "${workspaceFolder}",
1515
"stopAtEntry": false,

src/AccountGoWeb/AccountGoWeb.csproj

+12-31
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.2</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<PreserveCompilationContext>true</PreserveCompilationContext>
66
<AssemblyName>AccountGoWeb</AssemblyName>
77
<PackageId>AccountGoWeb</PackageId>
8-
<TypeScriptToolsVersion>3.0</TypeScriptToolsVersion>
9-
<Version>0.0.1</Version>
8+
<TypeScriptToolsVersion>latest</TypeScriptToolsVersion>
9+
<Version>0.0.1-alpha</Version>
1010
<Language>Latest</Language>
11-
<!-- <EnableDefaultContentItems>false</EnableDefaultContentItems> -->
1211
</PropertyGroup>
1312

1413
<ItemGroup>
@@ -17,38 +16,20 @@
1716
</None>
1817
</ItemGroup>
1918

20-
<!-- <ItemGroup>
21-
<Content Include="**\*.json" Exclude="bin\**\*;obj\**\*" CopyToOutputDirectory="PreserveNewest" />
22-
</ItemGroup> -->
19+
<ItemGroup>
20+
<ProjectReference Include="../Dto/Dto.csproj" />
21+
<ProjectReference Include="../Infrastructure/Infrastructure.csproj" />
22+
</ItemGroup>
2323

2424
<ItemGroup>
25-
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
26-
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="2.2.0" />
27-
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="2.2.1" />
28-
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.2.0" />
29-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.2" />
30-
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
31-
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
32-
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" />
33-
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.2.0" />
34-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
35-
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.2.0" />
36-
<PackageReference Include="Microsoft.Extensions.Http" Version="2.2.0" />
37-
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0" />
38-
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.2.0" />
39-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.2.0" />
25+
<PackageReference Include="BundlerMinifier.Core" Version="3.2.449" />
26+
<PackageReference Include="ExpressiveAnnotations" Version="2.9.6" />
4027
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
4128
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.2.0" />
42-
<PackageReference Include="BundlerMinifier.Core" Version="2.9.406" />
43-
<PackageReference Include="ExpressiveAnnotations" Version="2.9.6" />
4429
</ItemGroup>
4530

4631
<ItemGroup>
47-
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.2.301" />
48-
</ItemGroup>
49-
<ItemGroup>
50-
<ProjectReference Include="..\Dto\Dto.csproj" />
51-
<ProjectReference Include="..\Infrastructure\Infrastructure.csproj" />
32+
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="3.2.449" />
5233
</ItemGroup>
5334

5435
<Target Name="NpmCommands" AfterTargets="Build">
@@ -59,6 +40,6 @@
5940
<Exec Command="npm --nodeenv=$(NODE_ENV) --apiurlspa=$(APIURLSPA) run-script webpack" />
6041
</Target>
6142

62-
<Import Project="ModulesReferences.targets" />
43+
<!-- <Import Project="ModulesReferences.targets" /> -->
6344

6445
</Project>

src/AccountGoWeb/Program.cs

+17-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
1-
using Microsoft.AspNetCore;
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
25
using Microsoft.AspNetCore.Hosting;
6+
using Microsoft.Extensions.Configuration;
7+
using Microsoft.Extensions.Hosting;
8+
using Microsoft.Extensions.Logging;
39

410
namespace AccountGoWeb
511
{
612
public class Program
713
{
8-
public static void Main(string[] args) => CreateWebHostBuilder(args).Build().Run();
14+
public static void Main(string[] args)
15+
{
16+
CreateHostBuilder(args).Build().Run();
17+
}
918

10-
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
11-
WebHost.CreateDefaultBuilder(args)
12-
.UseStartup<Startup>();
19+
public static IHostBuilder CreateHostBuilder(string[] args) =>
20+
Host.CreateDefaultBuilder(args)
21+
.ConfigureWebHostDefaults(webBuilder =>
22+
{
23+
webBuilder.UseStartup<Startup>();
24+
});
1325
}
1426
}

src/AccountGoWeb/Properties/launchSettings.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
{
1+
{
22
"iisSettings": {
33
"windowsAuthentication": false,
44
"anonymousAuthentication": true,
55
"iisExpress": {
6-
"applicationUrl": "http://localhost:8000/",
6+
"applicationUrl": "http://localhost:8000",
77
"sslPort": 0
88
}
99
},
@@ -21,7 +21,7 @@
2121
"environmentVariables": {
2222
"ASPNETCORE_ENVIRONMENT": "Development"
2323
},
24-
"applicationUrl": "http://localhost:8000/"
24+
"applicationUrl": "http://localhost:8000"
2525
}
2626
}
2727
}

src/AccountGoWeb/Resource.resx

-120
This file was deleted.

0 commit comments

Comments
 (0)