Skip to content

Commit 4bf3f68

Browse files
Merge pull request #385 from martincostello/DotNet-6
Update to .NET 6
2 parents f82664a + 1869091 commit 4bf3f68

84 files changed

Lines changed: 7697 additions & 7958 deletions

File tree

Some content is hidden

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

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ csharp_prefer_simple_default_expression = true:suggestion
103103
csharp_style_pattern_local_over_anonymous_function = true:suggestion
104104
csharp_style_inlined_variable_declaration = true:suggestion
105105

106+
# Namespace preferences
107+
csharp_style_namespace_declarations = file_scoped
108+
106109
###############################
107110
# C# Formatting Rules #
108111
###############################

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- uses: codecov/codecov-action@v1
4545
name: Upload coverage to Codecov
4646
with:
47-
file: ./artifacts/coverage.net5.0.cobertura.xml
47+
file: ./artifacts/coverage.net6.0.cobertura.xml
4848
flags: ${{ matrix.os_name }}
4949

5050
- name: Publish artifacts

.vsconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"components": [
44
"Microsoft.VisualStudio.Component.CoreEditor",
55
"Microsoft.VisualStudio.Workload.CoreEditor",
6-
"Microsoft.NetCore.Component.Runtime.5.0",
6+
"Microsoft.NetCore.Component.Runtime.6.0",
77
"Microsoft.NetCore.Component.SDK",
88
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
99
"Microsoft.VisualStudio.Component.Roslyn.LanguageServices"

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,8 @@ Added overloads to support specifying the name of the Initial Catalog using the
200200
* Publish symbol packages to NuGet.org.
201201
* Use GitHub Actions for CI.
202202
* Prepare for .NET 6.
203+
204+
# SqlLocalDb v3.1.0
205+
206+
## Added
207+
* Add `net6.0` Target Framework Moniker.

CommonAssemblyInfo.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
// Copyright (c) Martin Costello, 2012-2018. All rights reserved.
1+
// Copyright (c) Martin Costello, 2012-2018. All rights reserved.
22
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
33

4-
using System;
54
using System.Reflection;
65
using System.Runtime.InteropServices;
76

Directory.Build.props

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
<EnableNETAnalyzers>true</EnableNETAnalyzers>
2020
<GenerateDocumentationFile>false</GenerateDocumentationFile>
2121
<GenerateGitMetadata Condition=" '$(CI)' != '' and '$(GenerateGitMetadata)' == '' ">true</GenerateGitMetadata>
22+
<ImplicitUsings>enable</ImplicitUsings>
2223
<LangVersion>latest</LangVersion>
2324
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
2425
<NeutralLanguage>en-US</NeutralLanguage>
25-
<NoWarn>$(NoWarn);CA1054;CA2234</NoWarn>
26+
<NoWarn>$(NoWarn);CA1054;CA1848;CA2234</NoWarn>
2627
<NoWarn Condition=" '$(GenerateDocumentationFile)' != 'true' ">$(NoWarn);SA0001</NoWarn>
2728
<Nullable>enable</Nullable>
2829
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
@@ -37,7 +38,7 @@
3738
<SignAssembly>true</SignAssembly>
3839
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
3940
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
40-
<VersionPrefix>3.0.2</VersionPrefix>
41+
<VersionPrefix>3.1.0</VersionPrefix>
4142
<VersionSuffix Condition=" '$(VersionSuffix)' == '' AND '$(GITHUB_ACTIONS)' != '' ">beta$([System.Convert]::ToInt32(`$(GITHUB_RUN_NUMBER)`).ToString(`0000`))</VersionSuffix>
4243
<VersionPrefix Condition=" $(GITHUB_REF.StartsWith(`refs/tags/v`)) ">$(GITHUB_REF.Replace('refs/tags/v', ''))</VersionPrefix>
4344
<VersionSuffix Condition=" $(GITHUB_REF.StartsWith(`refs/tags/v`)) "></VersionSuffix>
@@ -53,4 +54,12 @@
5354
<Threshold Condition=" '$(OS)' == 'Windows_NT' ">80</Threshold>
5455
<Threshold Condition=" '$(OS)' != 'Windows_NT' ">40</Threshold>
5556
</PropertyGroup>
57+
<ItemGroup>
58+
<Using Include="System.Globalization" />
59+
</ItemGroup>
60+
<ItemGroup Condition=" '$(IsTestProject)' == 'true' ">
61+
<Using Include="Shouldly" />
62+
<Using Include="Xunit" />
63+
<Using Include="Xunit.Abstractions" />
64+
</ItemGroup>
5665
</Project>

Directory.Packages.props

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
<PackageVersion Include="Humanizer" Version="2.11.10" />
88
<PackageVersion Include="MartinCostello.Logging.XUnit" Version="0.2.0" />
99
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.3" />
10-
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.11" />
10+
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0" />
1111
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
1212
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.0.0" />
1313
<PackageVersion Include="Moq" Version="4.16.1" />
1414
<PackageVersion Include="NodaTime" Version="$(NodaTimeVersion)" />
1515
<PackageVersion Include="NodaTime.Testing" Version="$(NodaTimeVersion)" />
1616
<PackageVersion Include="ReportGenerator" Version="4.8.13" />
1717
<PackageVersion Include="Shouldly" Version="4.0.3" />
18-
<PackageVersion Include="StyleCop.Analyzers" Version="1.1.118" />
18+
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.354" />
1919
<PackageVersion Include="xunit" Version="2.4.1" />
2020
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.3" />
2121
<PackageVersion Include="Xunit.SkippableFact" Version="1.4.13" />
@@ -26,17 +26,16 @@
2626
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="2.0.0" />
2727
<PackageVersion Include="Microsoft.Win32.Registry" Version="4.5.0" />
2828
</ItemGroup>
29-
<ItemGroup Condition=" '$(AssemblyName)' == 'MartinCostello.SqlLocalDb' and '$(TargetFramework)' == 'net5.0' ">
29+
<ItemGroup Condition=" '$(AssemblyName)' == 'MartinCostello.SqlLocalDb' and '$(TargetFramework)' == 'net6.0' ">
3030
<PackageVersion Include="Microsoft.Data.SqlClient" Version="2.0.1" />
31-
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
32-
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" />
33-
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0" />
31+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
32+
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
3433
</ItemGroup>
3534
<ItemGroup Condition=" '$(AssemblyName)' != 'MartinCostello.SqlLocalDb' ">
3635
<PackageVersion Include="Microsoft.Data.SqlClient" Version="3.0.1" />
37-
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" />
38-
<PackageVersion Include="Microsoft.Extensions.Logging" Version="5.0.0" />
39-
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
36+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
37+
<PackageVersion Include="Microsoft.Extensions.Logging" Version="6.0.0" />
38+
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
4039
</ItemGroup>
4140
<ItemGroup>
4241
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />

SqlLocalDb.sln

Lines changed: 2 additions & 2 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.28922.388
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31612.314
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E207A447-68A1-4D72-B24F-89FB7890AE12}"
77
ProjectSection(SolutionItems) = preProject

build.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,13 @@ function DotNetBuild {
101101
function DotNetPack {
102102
param([string]$Project)
103103

104+
$PackageOutputPath = (Join-Path $OutputPath "packages")
105+
104106
if ($VersionSuffix) {
105-
& $dotnet pack $Project --output (Join-Path $OutputPath "packages") --configuration $Configuration --version-suffix "$VersionSuffix" --include-symbols --include-source
107+
& $dotnet pack $Project --output $PackageOutputPath --configuration $Configuration --version-suffix "$VersionSuffix" --include-symbols --include-source
106108
}
107109
else {
108-
& $dotnet pack $Project --output (Join-Path $OutputPath "packages") --configuration $Configuration --include-symbols --include-source
110+
& $dotnet pack $Project --output $PackageOutputPath --configuration $Configuration --include-symbols --include-source
109111
}
110112
if ($LASTEXITCODE -ne 0) {
111113
throw "dotnet pack failed with exit code $LASTEXITCODE"

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "5.0.402",
3+
"version": "6.0.100",
44
"allowPrerelease": false,
55
"rollForward": "latestMajor"
66
}

0 commit comments

Comments
 (0)