Skip to content

Commit c956059

Browse files
3.x Release: net8.0 and Microsoft.Data.SqlClient support (#222)
* chore: dependencies upgrade * Few more tidy bits from local build * Fix comment ref * chore: review stuffs * Bump to net8.0 and fix up builds * Re-consolidate packages * Write skip reason to console * Fix Microsoft.Data.SqlClient tests * Fix appveyor connection string * Review tidy up --------- Co-authored-by: Nick Craver <[email protected]>
1 parent e52a618 commit c956059

39 files changed

+233
-167
lines changed

.github/workflows/packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ jobs:
5757
PostgreSqlConnectionString: Server=localhost;Port=${{ job.services.postgres.ports[5432] }};Database=test;User Id=postgres;Password=postgres;
5858
SQLServerConnectionString: Server=tcp:127.0.0.1,${{ job.services.sqlserver.ports[1433] }};Database=tempdb;User Id=sa;Password=g0d4mm!tSQLServer;
5959
- name: .NET Lib Pack
60-
run: dotnet pack Build.csproj --no-build -c Release /p:Packing=true /p:PackageOutputPath=%CD%\.nupkgs /p:CI=true
60+
run: dotnet pack Build.csproj --no-build -c Release /p:Packing=true /p:PackageOutputPath=$PWD/.nupkgs /p:CI=true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*.suo
1010
*.user
1111
*.sln.docstates
12+
*.binlog
1213
.vs/
1314
.vscode/
1415
**/Properties/launchSettings.json

Build.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<ItemGroup>
33
<ProjectReference Include="src\**\*.csproj" />
44
</ItemGroup>
5-
<ItemGroup Condition="$(Packing) != 'true'">
5+
<ItemGroup Condition="$(Packing) != 'true' and $(_IsPacking) != 'true'">
66
<ProjectReference Include="samples\**\*.csproj" Exclude="samples\**\*Mvc5*.csproj" />
77
<ProjectReference Include="tests\**\*.csproj" />
88
</ItemGroup>

NuGet.config

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
4-
<clear />
5-
<add key="xunit myget" value="https://www.myget.org/F/xunit/api/v3/index.json" />
6-
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
4+
<clear/>
5+
<add key="xunit myget" value="https://www.myget.org/F/xunit/api/v3/index.json"/>
6+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3"/>
77
</packageSources>
8+
<packageSourceMapping>
9+
<!-- key value for <packageSource> should match key values from <packageSources> element -->
10+
<packageSource key="nuget.org">
11+
<package pattern="*"/>
12+
</packageSource>
13+
</packageSourceMapping>
814
</configuration>

StackExchange.Exceptional.sln

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.29519.161
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.7.33711.374
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "global", "global", "{9D33C076-4A0C-4366-89B8-9A735E6867EA}"
77
ProjectSection(SolutionItems) = preProject
@@ -26,9 +26,14 @@ EndProject
2626
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8B91532F-A112-4F73-80BD-A95B7359BBC3}"
2727
ProjectSection(SolutionItems) = preProject
2828
src\Directory.Build.props = src\Directory.Build.props
29+
src\Directory.Packages.props = src\Directory.Packages.props
2930
EndProjectSection
3031
EndProject
3132
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{001E5AA4-42C8-4AC3-B14A-AF1DFA02E9FB}"
33+
ProjectSection(SolutionItems) = preProject
34+
samples\Directory.Build.props = samples\Directory.Build.props
35+
samples\Directory.Packages.props = samples\Directory.Packages.props
36+
EndProjectSection
3237
EndProject
3338
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StackExchange.Exceptional.Shared", "src\StackExchange.Exceptional.Shared\StackExchange.Exceptional.Shared.csproj", "{D316FA70-8563-4360-A60F-1A43F3FA30E5}"
3439
EndProject
@@ -46,6 +51,7 @@ EndProject
4651
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{7D435EF2-8616-460D-82DB-EF4D74EEC459}"
4752
ProjectSection(SolutionItems) = preProject
4853
tests\Directory.Build.props = tests\Directory.Build.props
54+
tests\Directory.Packages.props = tests\Directory.Packages.props
4955
EndProjectSection
5056
EndProject
5157
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StackExchange.Exceptional.Tests.AspNetCore", "tests\StackExchange.Exceptional.Tests.AspNetCore\StackExchange.Exceptional.Tests.AspNetCore.csproj", "{30BDD61C-A94B-4558-BB58-E9EEC0B8B845}"
@@ -56,7 +62,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StackExchange.Exceptional.P
5662
EndProject
5763
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StackExchange.Exceptional.MongoDB", "src\StackExchange.Exceptional.MongoDB\StackExchange.Exceptional.MongoDB.csproj", "{8CFA59A5-5180-4466-A32E-507F3D541163}"
5864
EndProject
59-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.ConsoleNetCore", "samples\Samples.ConsoleNetCore\Samples.ConsoleNetCore.csproj", "{6CE269E1-6DC9-43A4-B6B8-683CE8A19E6A}"
65+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples.ConsoleNetCore", "samples\Samples.ConsoleNetCore\Samples.ConsoleNetCore.csproj", "{6CE269E1-6DC9-43A4-B6B8-683CE8A19E6A}"
6066
EndProject
6167
Global
6268
GlobalSection(SolutionConfigurationPlatforms) = preSolution

appveyor.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
image: Visual Studio 2022
22

3-
init:
4-
- git config --global core.autocrlf input
5-
- SET PATH=%POSTGRES_PATH%\bin;%MYSQL_PATH%\bin;%PATH%
6-
- net start MSSQL$SQL2019
7-
83
skip_branch_with_pr: true
94
skip_tags: true
105
skip_commits:
@@ -14,15 +9,15 @@ skip_commits:
149
environment:
1510
Appveyor: true
1611
# Postgres
17-
POSTGRES_PATH: C:\Program Files\PostgreSQL\10
12+
POSTGRES_PATH: C:\Program Files\PostgreSQL\16
1813
PGUSER: postgres
1914
PGPASSWORD: Password12!
2015
POSTGRES_ENV_POSTGRES_USER: postgres
2116
POSTGRES_ENV_POSTGRES_PASSWORD: Password12!
2217
POSTGRES_ENV_POSTGRES_DB: test
2318
PostgreSqlConnectionString: Server=localhost;Port=5432;Database=test;User Id=postgres;Password=Password12!;
2419
# MySQL
25-
MYSQL_PATH: C:\Program Files\MySql\MySQL Server 5.7
20+
MYSQL_PATH: C:\Program Files\MySQL\MySQL Server 8.0
2621
MYSQL_PWD: Password12!
2722
MYSQL_ENV_MYSQL_USER: root
2823
MYSQL_ENV_MYSQL_PASSWORD: Password12!
@@ -31,12 +26,18 @@ environment:
3126
# MongoDB
3227
MongoDBConnectionString: mongodb://localhost/test
3328
# SQL Server
34-
SQLServerConnectionString: Server=(local)\SQL2019;Database=master;User ID=sa;Password=Password12!
29+
SQLServerConnectionString: Server=(local)\SQL2019;Database=master;User ID=sa;Password=Password12!;Encrypt=False
30+
3531
services:
36-
- mysql
37-
- postgresql10
3832
- mongodb
3933

34+
init:
35+
- git config --global core.autocrlf input
36+
- SET PATH=%POSTGRES_PATH%\bin;%MYSQL_PATH%\bin;%PATH%
37+
- net start MSSQL$SQL2019
38+
- net start postgresql-x64-16
39+
- ps: Start-Service MySQL80
40+
4041
nuget:
4142
disable_publish_on_pr: true
4243

docs/Releases.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ layout: "default"
66
This page tracks major changes included in any update starting with version 2.0.0.
77

88
#### Unreleased
9-
- Adds a `net6.0` build to main packages
10-
- Bumps `Newtonsoft.Json` to version 13.0.1
9+
- Moves to `net8.0` builds for main packages (dropping `netstandard2.0` and `netcoreapp*` support)
10+
- Upgraded dependencies to avoid transitive CVE warnings for consumers
1111
- Adds `Exceptional.Settings.CreatePathIfMissing` for auto-creating directories on startup (opt-in)
12+
- Moved to `Microsoft.Data.SqlClient` for `net8.0` (still `System.Data.SqlClient` for `net462`) to simplify migrations
1213

1314
#### Version 2.2.17
1415
- Bumps from `netcoreapp3.0` to `netcoreapp3.1` (since .NET Core 3.0 is no loner supported)

global.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"msbuild-sdks": {
3+
"MSBuild.SDK.SystemWeb" : "4.0.93"
4+
},
25
"sdk": {
36
"allowPrerelease": false
47
}

samples/Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project>
2-
<ItemGroup>
3-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
4-
</ItemGroup>
2+
<PropertyGroup>
3+
<IsPackable>false</IsPackable>
4+
</PropertyGroup>
55
</Project>

samples/Directory.Packages.props

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<PackageVersion Include="Microsoft.AspNet.Mvc" Version="5.2.3" />
7+
<PackageVersion Include="Microsoft.AspNet.Web.Optimization" Version="1.1.3" />
8+
<PackageVersion Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" Version="4.1.0" />
9+
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
10+
<PackageVersion Include="Microsoft.Net.Compilers.Toolset" Version="4.12.0-3.final" />
11+
</ItemGroup>
12+
<ItemGroup>
13+
<GlobalPackageReference Condition="'$(TargetFramework)'=='net8.0'" Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />
14+
</ItemGroup>
15+
</Project>

0 commit comments

Comments
 (0)