Skip to content

Commit cee1567

Browse files
authored
Merge pull request #57 from AArnott/libTemplate
Merge latest Library.Template
2 parents 4b82103 + d1ece91 commit cee1567

File tree

73 files changed

+960
-585
lines changed

Some content is hidden

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

73 files changed

+960
-585
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:5.0.400-focal
1+
FROM mcr.microsoft.com/dotnet/sdk:6.0.401-focal
22

33
# Installing mono makes `dotnet test` work without errors even for net472.
44
# But installing it takes a long time, so it's excluded by default.

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,5 +173,14 @@ dotnet_diagnostic.CA1508.severity = warning
173173
# IDE1006: Naming Styles - StyleCop handles these for us
174174
dotnet_diagnostic.IDE1006.severity = none
175175

176+
dotnet_diagnostic.DOC100.severity = silent
177+
dotnet_diagnostic.DOC104.severity = warning
178+
dotnet_diagnostic.DOC105.severity = warning
179+
dotnet_diagnostic.DOC106.severity = warning
180+
dotnet_diagnostic.DOC107.severity = warning
181+
dotnet_diagnostic.DOC108.severity = warning
182+
dotnet_diagnostic.DOC200.severity = warning
183+
dotnet_diagnostic.DOC202.severity = warning
184+
176185
[*.sln]
177186
indent_style = tab

.github/workflows/Linux.runsettings

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

.github/workflows/Windows.runsettings

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

.github/workflows/build.yml

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ env:
1111
TreatWarningsAsErrors: true
1212
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
1313
BUILDCONFIGURATION: Release
14-
codecov_token: 4dc9e7e2-6b01-4932-a180-847b52b43d35 # Get a new one from https://codecov.io/
15-
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
14+
codecov_token: 7995bed3-1625-445a-9ce0-a8ac4494de88
15+
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages/
1616

1717
jobs:
1818
build:
@@ -32,16 +32,20 @@ jobs:
3232
run: |
3333
./init.ps1 -UpgradePrerequisites
3434
dotnet --info
35+
36+
# Print mono version if it is present.
37+
if (Get-Command mono -ErrorAction SilentlyContinue) {
38+
mono --version
39+
}
3540
shell: pwsh
3641
- name: Set pipeline variables based on source
3742
run: azure-pipelines/variables/_pipelines.ps1
3843
shell: pwsh
3944
- name: build
40-
run: dotnet build --no-restore -c ${{ env.BUILDCONFIGURATION }} /v:m /bl:"bin/build_logs/build.binlog"
41-
- name: pack
42-
run: dotnet pack --no-build -c ${{ env.BUILDCONFIGURATION }} /v:m /bl:"bin/build_logs/pack.binlog"
45+
run: dotnet build -t:build,pack --no-restore -c ${{ env.BUILDCONFIGURATION }} /v:m /bl:"${{ runner.temp }}/_artifacts/build_logs/build.binlog"
4346
- name: test
44-
run: dotnet test --no-build -c ${{ env.BUILDCONFIGURATION }} /bl:"bin/build_logs/test.binlog" --filter "TestCategory!=FailsInCloudTest" -v n /p:CollectCoverage=true --logger trx --settings "${{ github.workspace }}/.github/workflows/${{ runner.os }}.runsettings"
47+
run: azure-pipelines/dotnet-test-cloud.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} -Agent ${{ runner.os }}
48+
shell: pwsh
4549
- name: Update pipeline variables based on build outputs
4650
run: azure-pipelines/variables/_pipelines.ps1
4751
shell: pwsh
@@ -54,49 +58,57 @@ jobs:
5458
uses: actions/upload-artifact@v1
5559
with:
5660
name: projectAssetsJson-${{ runner.os }}
57-
path: obj/_artifacts/projectAssetsJson
61+
path: ${{ runner.temp }}/_artifacts/projectAssetsJson
5862
continue-on-error: true
5963
- name: Upload variables
6064
uses: actions/upload-artifact@v1
6165
with:
6266
name: variables-${{ runner.os }}
63-
path: obj/_artifacts/variables
67+
path: ${{ runner.temp }}/_artifacts/Variables
6468
continue-on-error: true
6569
- name: Upload build_logs
6670
if: always()
6771
uses: actions/upload-artifact@v1
6872
with:
6973
name: build_logs-${{ runner.os }}
70-
path: obj/_artifacts/build_logs
74+
path: ${{ runner.temp }}/_artifacts/build_logs
75+
continue-on-error: true
76+
- name: Upload test_logs
77+
if: always()
78+
uses: actions/upload-artifact@v1
79+
with:
80+
name: test_logs-${{ runner.os }}
81+
path: ${{ runner.temp }}/_artifacts/test_logs
7182
continue-on-error: true
7283
- name: Upload testResults
7384
if: always()
7485
uses: actions/upload-artifact@v1
7586
with:
7687
name: testResults-${{ runner.os }}
77-
path: obj/_artifacts/testResults
88+
path: ${{ runner.temp }}/_artifacts/testResults
7889
continue-on-error: true
7990
- name: Upload coverageResults
8091
if: always()
8192
uses: actions/upload-artifact@v1
8293
with:
8394
name: coverageResults-${{ runner.os }}
84-
path: obj/_artifacts/coverageResults
95+
path: ${{ runner.temp }}/_artifacts/coverageResults
8596
continue-on-error: true
8697
- name: Upload symbols
8798
uses: actions/upload-artifact@v1
8899
with:
89100
name: symbols-${{ runner.os }}
90-
path: obj/_artifacts/symbols
101+
path: ${{ runner.temp }}/_artifacts/symbols
91102
continue-on-error: true
92103
- name: Upload deployables
93104
uses: actions/upload-artifact@v1
94105
with:
95106
name: deployables-${{ runner.os }}
96-
path: obj/_artifacts/deployables
107+
path: ${{ runner.temp }}/_artifacts/deployables
97108
if: always()
98109
- name: Publish code coverage results to codecov.io
99-
run: bash <(curl -s https://codecov.io/bash)
100-
shell: bash
110+
run: ./azure-pipelines/publish-CodeCov.ps1 -CodeCovToken "${{ env.codecov_token }}" -PathToCodeCoverage "${{ runner.temp }}/_artifacts/coverageResults" -Name "${{ runner.os }} Coverage Results" -Flags "${{ runner.os }}Host,${{ env.BUILDCONFIGURATION }}"
111+
shell: pwsh
101112
timeout-minutes: 3
102113
continue-on-error: true
114+
if: always()

.github/workflows/macOS.runsettings

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

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
*.user
1010
*.userosscache
1111
*.sln.docstates
12+
*.lutconfig
13+
launchSettings.json
1214

1315
# User-specific files (MonoDevelop/Xamarin Studio)
1416
*.userprefs
@@ -138,6 +140,7 @@ _TeamCity*
138140
# Visual Studio code coverage results
139141
*.coverage
140142
*.coveragexml
143+
/coveragereport/
141144

142145
# NCrunch
143146
_NCrunch_*

.vscode/settings.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"files.trimTrailingWhitespace": true,
3-
"files.insertFinalNewline": true,
4-
"files.trimFinalNewlines": true,
5-
"omnisharp.enableEditorConfigSupport": true,
6-
"omnisharp.enableImportCompletion": true,
7-
"omnisharp.enableRoslynAnalyzers": true
2+
"files.trimTrailingWhitespace": true,
3+
"files.insertFinalNewline": true,
4+
"files.trimFinalNewlines": true,
5+
"omnisharp.enableEditorConfigSupport": true,
6+
"omnisharp.enableImportCompletion": true,
7+
"omnisharp.enableRoslynAnalyzers": true
88
}

Directory.Build.props

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,19 @@
55
<BaseIntermediateOutputPath>$(RepoRootPath)obj\$([MSBuild]::MakeRelative($(RepoRootPath), $(MSBuildProjectDirectory)))\</BaseIntermediateOutputPath>
66
<BaseOutputPath Condition=" '$(BaseOutputPath)' == '' ">$(RepoRootPath)bin\$(MSBuildProjectName)\</BaseOutputPath>
77
<PackageOutputPath>$(RepoRootPath)bin\Packages\$(Configuration)\</PackageOutputPath>
8-
<LangVersion>9.0</LangVersion>
8+
<LangVersion>10.0</LangVersion>
99
<Nullable>enable</Nullable>
10+
<ImplicitUsings>enable</ImplicitUsings>
1011
<AnalysisLevel>latest</AnalysisLevel>
1112
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
1213
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1314
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
14-
<IncludePackageReferencesDuringMarkupCompilation>true</IncludePackageReferencesDuringMarkupCompilation>
15-
<GitVersionBaseDirectory>$(RepoRootPath)</GitVersionBaseDirectory>
15+
16+
<!-- https://github.com/dotnet/msbuild/blob/main/documentation/ProjectReference-Protocol.md#setplatform-negotiation -->
17+
<EnableDynamicPlatformResolution>true</EnableDynamicPlatformResolution>
18+
19+
<!-- Opt in till https://github.com/NuGet/Home/issues/9803 makes this the default. -->
20+
<RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation>
1621

1722
<!-- This entire repo has just one version.json file, so compute the version once and share with all projects in a large build. -->
1823
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory>
@@ -21,7 +26,7 @@
2126
<DebugType Condition=" '$(CI)' != 'true' and '$(TF_BUILD)' != 'true' ">embedded</DebugType>
2227

2328
<SignAssembly>true</SignAssembly>
24-
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\strongname.snk</AssemblyOriginatorKeyFile>
29+
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)strongname.snk</AssemblyOriginatorKeyFile>
2530

2631
<Company>Andrew Arnott</Company>
2732
<Authors>Andrew Arnott</Authors>
@@ -34,16 +39,6 @@
3439
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
3540
</PropertyGroup>
3641

37-
<ItemGroup>
38-
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.0.0" PrivateAssets="all" />
39-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all" />
40-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
41-
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.107" PrivateAssets="all" />
42-
<PackageReference Include="Nullable" Version="1.3.0" PrivateAssets="all" />
43-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435" PrivateAssets="all" />
44-
<PackageReference Include="CSharpIsNullAnalyzer" Version="0.1.329" PrivateAssets="all" />
45-
</ItemGroup>
46-
4742
<ItemGroup>
4843
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" />
4944
</ItemGroup>
@@ -75,7 +70,7 @@
7570
It's also not necessary to generate these assets.
7671
-->
7772
<PropertyGroup Condition="'$(IsWpfTempProject)' == 'true'">
78-
<_WpfTempProjectNuGetFilePathNoExt>$(RepoRootPath)obj\$(_TargetAssemblyProjectName)\$(_TargetAssemblyProjectName)$(MSBuildProjectExtension).nuget.g</_WpfTempProjectNuGetFilePathNoExt>
73+
<_WpfTempProjectNuGetFilePathNoExt>$(BaseIntermediateOutputPath)..\$(_TargetAssemblyProjectName)\$(_TargetAssemblyProjectName)$(MSBuildProjectExtension).nuget.g</_WpfTempProjectNuGetFilePathNoExt>
7974

8075
<EnableSourceLink>false</EnableSourceLink>
8176
<EmbedUntrackedSources>false</EmbedUntrackedSources>

Directory.Build.targets

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<Project>
2+
<ItemGroup>
3+
<Using Remove="System.Net.Http" />
4+
</ItemGroup>
5+
26
<PropertyGroup>
37
<!-- Workaround https://github.com/dotnet/wpf/issues/1718 -->
48
<EmbedUntrackedSources Condition=" '$(UseWPF)' == 'true' ">false</EmbedUntrackedSources>

0 commit comments

Comments
 (0)