Skip to content

Commit

Permalink
Update to multi target .NET Standard and .NET Framework 4.6
Browse files Browse the repository at this point in the history
Updated to SDK style csproj format.
Updated NuGet packages to latest versions.
Updated NuGet and GitHub auth tokens.
Removed sandcastle project and replaced with InheritdocInliner task.
Removed GitVersion from appveyor and added GitVersionTask as PackageReference.
Removed artifact creation.
Moved unit test build server commands to MSBuild task.
Update .gitignore
+semver: patch
  • Loading branch information
natsnudasoft committed Apr 3, 2019
1 parent d3964f2 commit 492cb97
Show file tree
Hide file tree
Showing 72 changed files with 422 additions and 1,282 deletions.
9 changes: 1 addition & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
StyleCop.Cache
/packages
/.vs
*.csproj.user
bin
obj
/OpenCover
/tools/coverage
/tools/coverage.xml
/tools/artifact
/docs/Natsnudasoft/Help
/tools/NatsnudaLibrary_Release_Any_CPU.zip
/coverage
31 changes: 0 additions & 31 deletions AssemblyInfoCommon.cs

This file was deleted.

16 changes: 0 additions & 16 deletions CustomDictionary.xml

This file was deleted.

27 changes: 27 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<NeutralLanguage>en-GB</NeutralLanguage>
<Authors>Adrian John Dunstan</Authors>
<Company>Natsnudasoft</Company>
<Copyright>Copyright © Adrian John Dunstan 2019</Copyright>
<Product>NatsnudaLibrary</Product>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(APPVEYOR)' == 'True'">
<ReportUnitTests>True</ReportUnitTests>
</PropertyGroup>
<PropertyGroup Condition="'$(APPVEYOR)' == 'True' And '$(APPVEYOR_PULL_REQUEST_NUMBER)' == ''">
<DefineConstants>$(DefineConstants);StrongNameSign</DefineConstants>
<StrongNameSign>True</StrongNameSign>
</PropertyGroup>
<PropertyGroup Condition="'$(StrongNameSign)' == 'True'">
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(SolutionDir)Natsnudasoft.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
</Project>
56 changes: 20 additions & 36 deletions Natsnudasoft.sln
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.6
VisualStudioVersion = 15.0.28307.489
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NatsnudaLibrary", "src\NatsnudaLibrary\NatsnudaLibrary.csproj", "{9B0AD511-AF08-4A36-9A68-EDCBF2EDF605}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NatsnudaLibrary", "src\NatsnudaLibrary\NatsnudaLibrary.csproj", "{83F03E55-218E-43DD-B329-0F992844E323}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestExtensions", "src\TestExtensions\TestExtensions.csproj", "{26294A1F-6DAE-4456-BACA-7B6E9D380AE7}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestExtensions", "src\TestExtensions\TestExtensions.csproj", "{7ABDA931-C300-4164-9F0A-5E00F1945E7C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Code Analysis", "Code Analysis", "{AD33630F-D030-45A2-9EAC-6DF7EAE10074}"
ProjectSection(SolutionItems) = preProject
_CodeAnalysis.docx = _CodeAnalysis.docx
CustomDictionary.xml = CustomDictionary.xml
Menees.Analyzers.Settings.xml = Menees.Analyzers.Settings.xml
src\NatsnudaLibrary\NatsnudaLibrary.ruleset = src\NatsnudaLibrary\NatsnudaLibrary.ruleset
test\unit\NatsnudasoftTests\NatsnudasoftTests.ruleset = test\unit\NatsnudasoftTests\NatsnudasoftTests.ruleset
Expand All @@ -27,7 +26,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Unit Tests", "Unit Tests",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Versioning", "Versioning", "{B505975C-8CB3-4C3F-9EE6-46B612ECD767}"
ProjectSection(SolutionItems) = preProject
AssemblyInfoCommon.cs = AssemblyInfoCommon.cs
CommonSuppressions.cs = CommonSuppressions.cs
EndProjectSection
EndProject
Expand All @@ -36,48 +34,34 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Documentation", "Documentat
README.md = README.md
EndProjectSection
EndProject
Project("{7CF6DF6D-3B04-46F8-A40B-537D21BCA0B4}") = "NatsnudasoftDocs", "docs\Natsnudasoft\NatsnudasoftDocs.shfbproj", "{82C2FB67-A2A2-4D68-87B7-EEFB7C31B212}"
ProjectSection(ProjectDependencies) = postProject
{9B0AD511-AF08-4A36-9A68-EDCBF2EDF605} = {9B0AD511-AF08-4A36-9A68-EDCBF2EDF605}
{26294A1F-6DAE-4456-BACA-7B6E9D380AE7} = {26294A1F-6DAE-4456-BACA-7B6E9D380AE7}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NatsnudasoftTests", "test\unit\NatsnudasoftTests\NatsnudasoftTests.csproj", "{0213E1F4-5ED1-455F-87B5-858B5C61821E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{6DEA4F5F-127A-496D-B91F-C51EF336E30E}"
ProjectSection(SolutionItems) = preProject
src\NatsnudaLibrary\NatsnudaLibrary.nuspec = src\NatsnudaLibrary\NatsnudaLibrary.nuspec
src\TestExtensions\TestExtensions.nuspec = src\TestExtensions\TestExtensions.nuspec
EndProjectSection
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NatsnudasoftTests", "test\unit\NatsnudasoftTests\NatsnudasoftTests.csproj", "{7BD69B3D-EE2A-4B00-BAC5-B15FEDE3A218}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9B0AD511-AF08-4A36-9A68-EDCBF2EDF605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9B0AD511-AF08-4A36-9A68-EDCBF2EDF605}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9B0AD511-AF08-4A36-9A68-EDCBF2EDF605}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9B0AD511-AF08-4A36-9A68-EDCBF2EDF605}.Release|Any CPU.Build.0 = Release|Any CPU
{26294A1F-6DAE-4456-BACA-7B6E9D380AE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{26294A1F-6DAE-4456-BACA-7B6E9D380AE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{26294A1F-6DAE-4456-BACA-7B6E9D380AE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26294A1F-6DAE-4456-BACA-7B6E9D380AE7}.Release|Any CPU.Build.0 = Release|Any CPU
{82C2FB67-A2A2-4D68-87B7-EEFB7C31B212}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{82C2FB67-A2A2-4D68-87B7-EEFB7C31B212}.Debug|Any CPU.Build.0 = Debug|Any CPU
{82C2FB67-A2A2-4D68-87B7-EEFB7C31B212}.Release|Any CPU.ActiveCfg = Release|Any CPU
{82C2FB67-A2A2-4D68-87B7-EEFB7C31B212}.Release|Any CPU.Build.0 = Release|Any CPU
{0213E1F4-5ED1-455F-87B5-858B5C61821E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0213E1F4-5ED1-455F-87B5-858B5C61821E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0213E1F4-5ED1-455F-87B5-858B5C61821E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0213E1F4-5ED1-455F-87B5-858B5C61821E}.Release|Any CPU.Build.0 = Release|Any CPU
{83F03E55-218E-43DD-B329-0F992844E323}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{83F03E55-218E-43DD-B329-0F992844E323}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83F03E55-218E-43DD-B329-0F992844E323}.Release|Any CPU.ActiveCfg = Release|Any CPU
{83F03E55-218E-43DD-B329-0F992844E323}.Release|Any CPU.Build.0 = Release|Any CPU
{7ABDA931-C300-4164-9F0A-5E00F1945E7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7ABDA931-C300-4164-9F0A-5E00F1945E7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7ABDA931-C300-4164-9F0A-5E00F1945E7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7ABDA931-C300-4164-9F0A-5E00F1945E7C}.Release|Any CPU.Build.0 = Release|Any CPU
{7BD69B3D-EE2A-4B00-BAC5-B15FEDE3A218}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7BD69B3D-EE2A-4B00-BAC5-B15FEDE3A218}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7BD69B3D-EE2A-4B00-BAC5-B15FEDE3A218}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7BD69B3D-EE2A-4B00-BAC5-B15FEDE3A218}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{82C2FB67-A2A2-4D68-87B7-EEFB7C31B212} = {AB7F6299-1645-4FE4-9AB4-6DA3101451CE}
{0213E1F4-5ED1-455F-87B5-858B5C61821E} = {4208DA10-BEA1-4B08-A573-99AC2F8C29AC}
{7BD69B3D-EE2A-4B00-BAC5-B15FEDE3A218} = {4208DA10-BEA1-4B08-A573-99AC2F8C29AC}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {45706E98-16BE-4C4B-A709-0130B6E99FEE}
EndGlobalSection
EndGlobal
26 changes: 26 additions & 0 deletions ReportUnitTests.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Project>
<Target Name="RunReportUnitTests" AfterTargets="Build" Condition="'$(TargetFramework)' != ''">
<!-- Currently we only run reports on net46 framework, however these mappings exist for future changes -->
<ItemGroup>
<TestToolMappings Include="netcoreapp2.2">
<Runner>netcoreapp2.0\xunit.console.dll</Runner>
<ReportGenerator>netcoreapp2.0\ReportGenerator.dll</ReportGenerator>
<Coveralls_io>coveralls.net.exe</Coveralls_io>
</TestToolMappings>
<TestToolMappings Include="net46">
<Runner>net46\xunit.console.exe</Runner>
<ReportGenerator>net47\ReportGenerator.exe</ReportGenerator>
<Coveralls_io>coveralls.net.exe</Coveralls_io>
</TestToolMappings>
</ItemGroup>
<Exec
Command='"$(PkgOpenCover)\tools\OpenCover.Console.exe" -register:user "-filter:+[*]* -[*Tests]* -[xunit.*]*" -target:"$(Pkgxunit_runner_console)\tools\%(TestToolMappings.Runner)" -targetargs:"\"$(OutputPath)Natsnudasoft.NatsnudasoftTests.dll\" -noshadow" -excludebyattribute:*.ExcludeFromCodeCoverage*;*.CompilerGenerated* -excludebyfile:*Designer.cs -output:$(IntermediateOutputPath)coverage.xml'
Condition="'$(TargetFramework)' == 'net46' And '%(TestToolMappings.Identity)' == '$(TargetFramework)'" />
<Exec
Command='"$(PkgReportGenerator)\tools\%(TestToolMappings.ReportGenerator)" -reports:$(IntermediateOutputPath)coverage.xml -targetdir:..\..\..\coverage\$(TargetFramework)'
Condition="'$(APPVEYOR)' != 'True' And '$(TargetFramework)' == 'net46' And '%(TestToolMappings.Identity)' == '$(TargetFramework)'" />
<Exec
Command='"$(Pkgcoveralls_io)\tools\%(TestToolMappings.Coveralls_io)" --opencover $(IntermediateOutputPath)coverage.xml'
Condition="'$(APPVEYOR)' == 'True' And '$(TargetFramework)' == 'net46' And '%(TestToolMappings.Identity)' == '$(TargetFramework)'" />
</Target>
</Project>
131 changes: 40 additions & 91 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,40 @@
-
branches:
only:
- master
environment:
COVERALLS_REPO_TOKEN:
secure: +hgrWh6vwfA7rQRwEGfD0od5TBGW/jPEyGwy2jlBM4vZrtjNwnwaa9IzCrig5A+6
STRONG_NAME_SECRET:
secure: 4W8bFbUP7bJsxCqGF6+xfy7kCUjQscJcrGmjegVxxBs=
image: Visual Studio 2017
configuration: Release
platform: Any CPU
install:
- choco install gitversion.portable -y
- choco install html-help-workshop -y
- nuget install secure-file -ExcludeVersion
- IF "%APPVEYOR_PULL_REQUEST_NUMBER%" == "" secure-file\tools\secure-file -decrypt Natsnudasoft.snk.enc -secret %STRONG_NAME_SECRET%
before_build:
- nuget restore
- gitversion /l console /output buildserver /updateassemblyinfo AssemblyInfoCommon.cs /b %APPVEYOR_REPO_BRANCH%
build:
project: Natsnudasoft.sln
verbosity: minimal
publish_nuget: true
publish_nuget_symbols: true
include_nuget_references: true
after_build:
- call tools\prepare-artifacts.bat
test:
assemblies: test\unit\NatsnudasoftTests\bin\Release\NatsnudasoftTests.dll
after_test:
- call tools\run-test-report.bat buildserver
cache:
- packages -> **\packages.config
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
artifacts:
- path: NatsnudaLibrary_Release_Any_CPU.zip
name: NatsnudaLibrary_Release_Any_CPU
deploy:
- provider: GitHub
tag: $(APPVEYOR_REPO_TAG_NAME)
release: 'NatsnudaLibrary $(APPVEYOR_REPO_TAG_NAME)'
description: ''
auth_token:
secure: Btb4eq03u8e4+k4WUyv4mWf0kfmzuxSCRo6u1nfOCtxlr4hrdpB5af5tVpt5q+1q
artifact: NatsnudaLibrary_Release_Any_CPU
draft: false
prerelease: false
on:
appveyor_repo_tag: true
- provider: NuGet
api_key:
secure: F2PKDPVrMV/KTcJ6b3U0ADkG/naA2h8TnZySyuEAUAYSHbLKfUdue+SvqhZavPrp
skip_symbols: true
artifact: /.*\.nupkg/
on:
appveyor_repo_tag: true
-
environment:
COVERALLS_REPO_TOKEN:
secure: +hgrWh6vwfA7rQRwEGfD0od5TBGW/jPEyGwy2jlBM4vZrtjNwnwaa9IzCrig5A+6
STRONG_NAME_SECRET:
secure: 4W8bFbUP7bJsxCqGF6+xfy7kCUjQscJcrGmjegVxxBs=
image: Visual Studio 2017
configuration: Release
platform: Any CPU
install:
- choco install gitversion.portable -y
- choco install html-help-workshop -y
- nuget install secure-file -ExcludeVersion
- IF "%APPVEYOR_PULL_REQUEST_NUMBER%" == "" secure-file\tools\secure-file -decrypt Natsnudasoft.snk.enc -secret %STRONG_NAME_SECRET%
before_build:
- nuget restore
- gitversion /l console /output buildserver /updateassemblyinfo AssemblyInfoCommon.cs /b %APPVEYOR_REPO_BRANCH%
build:
project: Natsnudasoft.sln
verbosity: minimal
after_build:
- call tools\prepare-artifacts.bat
test:
assemblies: test\unit\NatsnudasoftTests\bin\Release\NatsnudasoftTests.dll
after_test:
- call tools\run-test-report.bat buildserver
cache:
- packages -> **\packages.config
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
artifacts:
- path: NatsnudaLibrary_Release_Any_CPU.zip
name: NatsnudaLibrary_Release_Any_CPU
environment:
COVERALLS_REPO_TOKEN:
secure: +hgrWh6vwfA7rQRwEGfD0od5TBGW/jPEyGwy2jlBM4vZrtjNwnwaa9IzCrig5A+6
STRONG_NAME_SECRET:
secure: 4W8bFbUP7bJsxCqGF6+xfy7kCUjQscJcrGmjegVxxBs=
image: Visual Studio 2017
configuration: Release
platform: Any CPU
install:
- IF "%APPVEYOR_PULL_REQUEST_NUMBER%" == "" nuget install secure-file -ExcludeVersion
- IF "%APPVEYOR_PULL_REQUEST_NUMBER%" == "" secure-file\tools\secure-file -decrypt Natsnudasoft.snk.enc -secret %STRONG_NAME_SECRET%
before_build:
- nuget restore
build:
project: Natsnudasoft.sln
verbosity: minimal
test:
assemblies: test\unit\NatsnudasoftTests\bin\Release\**\NatsnudasoftTests.dll
cache:
- packages -> **\packages.config
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
deploy:
- provider: GitHub
tag: $(APPVEYOR_REPO_TAG_NAME)
release: 'NatsnudaLibrary $(APPVEYOR_REPO_TAG_NAME)'
description: ''
auth_token:
secure: winth2ckr0q/1fONK0Nz7MixzIikq4sYbi/uKfJ97WYgL6rKwI/TT9PNHXcX2pFF
draft: false
prerelease: false
on:
appveyor_repo_tag: true
- provider: NuGet
api_key:
secure: IL1Xdk/t8SL1Dsjfw+pzzSjR7c3qBeydU+7ey4ObYVDaoHNUv+JDxrnxQZ8Im5+q
skip_symbols: true
artifact: /.*\.nupkg/
on:
appveyor_repo_tag: true
33 changes: 0 additions & 33 deletions docs/Natsnudasoft/Content/VersionHistory/VersionHistory.aml

This file was deleted.

Loading

0 comments on commit 492cb97

Please sign in to comment.