Skip to content

Commit 05852ee

Browse files
committed
update sample.
1 parent bb68756 commit 05852ee

File tree

7 files changed

+12
-100
lines changed

7 files changed

+12
-100
lines changed

build/version.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<VersionMajor>2</VersionMajor>
44
<VersionMinor>2</VersionMinor>
5-
<VersionPatch>2</VersionPatch>
5+
<VersionPatch>3</VersionPatch>
66
<VersionQuality></VersionQuality>
77
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</VersionPrefix>
88
</PropertyGroup>
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Microsoft.AspNetCore;
22
using Microsoft.AspNetCore.Hosting;
3-
using NLog.Web;
43

54
namespace Sample.Kafka.MySql
65
{
@@ -14,12 +13,7 @@ public static void Main(string[] args)
1413

1514
public static IWebHost BuildWebHost(string[] args) =>
1615
WebHost.CreateDefaultBuilder(args)
17-
.UseStartup<Startup>()
18-
.ConfigureLogging((hostingContext, builder) =>
19-
{
20-
hostingContext.HostingEnvironment.ConfigureNLog("nlog.config");
21-
})
22-
.UseNLog()
16+
.UseStartup<Startup>()
2317
.Build();
2418
}
2519
}
Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,20 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.0</TargetFramework>
4+
<TargetFramework>netcoreapp2.1</TargetFramework>
55
<AssemblyName>Sample.Kafka.MySql</AssemblyName>
66
<WarningsAsErrors>NU1701</WarningsAsErrors>
77
<NoWarn>NU1701</NoWarn>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.6" />
12-
<PackageReference Include="MySqlConnector" Version="0.38.0" />
13-
<PackageReference Include="NLog.Web.AspNetCore" Version="4.5.2" />
14-
<PackageReference Include="zipkin4net" Version="1.2.0" />
15-
</ItemGroup>
16-
<ItemGroup>
17-
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" />
18-
</ItemGroup>
11+
<PackageReference Include="Microsoft.AspNetCore.App" />
12+
<PackageReference Include="MySqlConnector" Version="0.40.4" />
13+
</ItemGroup>
1914
<ItemGroup>
2015
<ProjectReference Include="..\..\src\DotNetCore.CAP.Kafka\DotNetCore.CAP.Kafka.csproj" />
2116
<ProjectReference Include="..\..\src\DotNetCore.CAP.MySql\DotNetCore.CAP.MySql.csproj" />
2217
<ProjectReference Include="..\..\src\DotNetCore.CAP\DotNetCore.CAP.csproj" />
23-
</ItemGroup>
24-
<ItemGroup>
25-
<Content Update="nlog.config">
26-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
27-
</Content>
28-
</ItemGroup>
18+
</ItemGroup>
2919

3020
</Project>

samples/Sample.Kafka.MySql/nlog.config

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Microsoft.AspNetCore;
22
using Microsoft.AspNetCore.Hosting;
3-
using NLog.Web;
43

54
namespace Sample.RabbitMQ.MySql
65
{
@@ -13,12 +12,7 @@ public static void Main(string[] args)
1312

1413
public static IWebHost BuildWebHost(string[] args) =>
1514
WebHost.CreateDefaultBuilder(args)
16-
.UseStartup<Startup>()
17-
.ConfigureLogging((hostingContext, builder) =>
18-
{
19-
hostingContext.HostingEnvironment.ConfigureNLog("nlog.config");
20-
})
21-
.UseNLog()
15+
.UseStartup<Startup>()
2216
.Build();
2317
}
2418
}
Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,17 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.0</TargetFramework>
5-
</PropertyGroup>
6-
7-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
8-
<NoWarn>1701;1702;1705;3277;</NoWarn>
9-
<WarningsAsErrors>NU1605;MSB3277</WarningsAsErrors>
4+
<TargetFramework>netcoreapp2.1</TargetFramework>
105
</PropertyGroup>
116

127
<ItemGroup>
13-
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.6" />
14-
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.0.1" />
15-
<PackageReference Include="NLog.Web.AspNetCore" Version="4.5.2" />
16-
</ItemGroup>
17-
<ItemGroup>
18-
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" />
19-
</ItemGroup>
8+
<PackageReference Include="Microsoft.AspNetCore.App" />
9+
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.1.0-rc1-final" />
10+
</ItemGroup>
2011
<ItemGroup>
2112
<ProjectReference Include="..\..\src\DotNetCore.CAP.MySql\DotNetCore.CAP.MySql.csproj" />
2213
<ProjectReference Include="..\..\src\DotNetCore.CAP.RabbitMQ\DotNetCore.CAP.RabbitMQ.csproj" />
2314
<ProjectReference Include="..\..\src\DotNetCore.CAP\DotNetCore.CAP.csproj" />
2415
</ItemGroup>
25-
<ItemGroup>
26-
<Content Update="nlog.config">
27-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
28-
</Content>
29-
</ItemGroup>
3016

3117
</Project>

samples/Sample.RabbitMQ.MySql/nlog.config

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

0 commit comments

Comments
 (0)