diff --git a/README.md b/README.md
index 1fcdecfe..78cb6914 100644
--- a/README.md
+++ b/README.md
@@ -2,11 +2,10 @@ Pkcs11Interop
=============
**Managed .NET wrapper for unmanaged PKCS#11 libraries**
-[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/Pkcs11Interop/Pkcs11Interop/blob/master/LICENSE.md)
-[![AppVeyor](https://ci.appveyor.com/api/projects/status/lb1jxb4t4203g3t9?svg=true)](https://ci.appveyor.com/project/pkcs11interop/pkcs11interop)
-[![Coverity](https://img.shields.io/coverity/scan/2961.svg)](https://scan.coverity.com/projects/pkcs11interop-pkcs11interop)
+[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/Pkcs11Interop/Pkcs11Interop/blob/4.x-maintenance/LICENSE.md)
+[![AppVeyor](https://ci.appveyor.com/api/projects/status/lb1jxb4t4203g3t9/branch/4.x-maintenance?svg=true)](https://ci.appveyor.com/project/pkcs11interop/pkcs11interop/branch/4.x-maintenance)
[![NuGet](https://img.shields.io/badge/nuget-pkcs11interop-blue.svg)](https://www.nuget.org/packages/Pkcs11Interop/)
-[![Stack Overflow](https://img.shields.io/badge/stack%20overflow-pkcs11interop-blue.svg)](https://stackoverflow.com/questions/tagged/pkcs11interop)
+[![Stack Overflow](https://img.shields.io/badge/stack-pkcs11interop-blue.svg)](https://stackoverflow.com/questions/tagged/pkcs11interop)
[![Twitter](https://img.shields.io/badge/twitter-p11interop-blue.svg)](https://twitter.com/p11interop)
## Table of Contents
diff --git a/appveyor.yml b/appveyor.yml
index d9bb3c98..240de22f 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,33 +1,61 @@
-version: 4.0.0-{build}
-image: Visual Studio 2015
+version: 4-{build}
+
branches:
only:
- - master
+ - 4.x-maintenance
+
skip_tags: true
+
environment:
matrix:
- - Platform: net20
- - Platform: net40
- - Platform: net45
- - Platform: sl5
+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+ Platform: net20
+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+ Platform: net40
+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+ Platform: net45
+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+ Platform: sl5
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
Platform: netstandard1.3
- - Platform: monoandroid2.3
- - Platform: xamarinios1.0
+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+ Platform: netstandard2.0
+ - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
+ Platform: netstandard2.0
+ - APPVEYOR_BUILD_WORKER_IMAGE: macos
+ Platform: netstandard2.0
+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+ Platform: monoandroid2.3
+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+ Platform: xamarinios1.0
+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+ Platform: xamarinmac2.0
+
install:
-- cmd: IF "%Platform%"=="monoandroid2.3" (powershell -File ./build/appveyor-install-android-sdk.ps1)
+- cmd: IF "%Platform%"=="monoandroid2.3" (powershell -File ./build/appveyor-switch-android-sdk.ps1)
+
build_script:
- cmd: IF "%Platform%"=="net20" (cd build && build-net20.bat --with-tests)
- cmd: IF "%Platform%"=="net40" (cd build && build-net40.bat --with-tests)
- cmd: IF "%Platform%"=="net45" (cd build && build-net45.bat)
- cmd: IF "%Platform%"=="sl5" (cd build && build-sl5.bat)
- cmd: IF "%Platform%"=="netstandard1.3" (cd build && build-netstandard1.3.bat --with-tests)
+- cmd: IF "%Platform%"=="netstandard2.0" (cd build && build-netstandard2.0.bat --with-tests --skip-cleaning)
- cmd: IF "%Platform%"=="monoandroid2.3" (cd build && build-monoandroid2.3.bat)
- cmd: IF "%Platform%"=="xamarinios1.0" (cd build && build-xamarinios1.0.bat)
+- cmd: IF "%Platform%"=="xamarinmac2.0" (cd build && build-xamarinmac2.0.bat)
+- sh: dotnet --info && dotnet restore -p:Configuration=Release -p:Platform="Any CPU" -v normal ./src/Pkcs11Interop.NetStandard/ && dotnet build -p:Configuration=Release -p:Platform="Any CPU" -v normal ./src/Pkcs11Interop.NetStandard/
+
test_script:
- cmd: IF "%Platform%"=="net20" (nunit-console-x86 .\src\Pkcs11Interop\Pkcs11InteropTests\bin\Release\Pkcs11InteropTests.dll)
- cmd: IF "%Platform%"=="net40" (nunit-console .\src\Pkcs11Interop\Pkcs11InteropTests\bin\Release\Pkcs11InteropTests.dll)
-- cmd: IF "%Platform%"=="netstandard1.3" (dotnet vstest .\src\Pkcs11Interop.NetStandard\Pkcs11Interop.DotNetCore.Tests\bin\Release\Pkcs11Interop.DotNetCore.Tests.dll)
+- cmd: IF "%Platform%"=="netstandard1.3" (cd .\src\Pkcs11Interop.NetStandard\Pkcs11Interop.DotNetCore.Tests\ && nuget install Appveyor.TestLogger && cd ..\..\..)
+- cmd: IF "%Platform%"=="netstandard1.3" (dotnet vstest .\src\Pkcs11Interop.NetStandard\Pkcs11Interop.DotNetCore.Tests\bin\Release\netcoreapp1.0\Pkcs11Interop.DotNetCore.Tests.dll --Framework:".NETCoreApp,Version=v1.0" --TestAdapterPath:. --logger:Appveyor)
+- cmd: IF "%Platform%"=="netstandard2.0" (cd .\src\Pkcs11Interop.NetStandard\Pkcs11Interop.DotNetCore.Tests\ && nuget install Appveyor.TestLogger && cd ..\..\..)
+- cmd: IF "%Platform%"=="netstandard2.0" (dotnet vstest .\src\Pkcs11Interop.NetStandard\Pkcs11Interop.DotNetCore.Tests\bin\Release\netcoreapp2.0\Pkcs11Interop.DotNetCore.Tests.dll --Framework:".NETCoreApp,Version=v2.0" --TestAdapterPath:. --logger:Appveyor)
+- sh: cd ./src/Pkcs11Interop.NetStandard/Pkcs11Interop.DotNetCore.Tests/ && nuget install Appveyor.TestLogger && cd ../../..
+- sh: dotnet test -f netcoreapp2.0 --test-adapter-path:. --logger:Appveyor ./src/Pkcs11Interop.NetStandard/Pkcs11Interop.DotNetCore.Tests/
+
artifacts:
- path: build/$(Platform)
name: $(Platform)
\ No newline at end of file
diff --git a/build/Pkcs11Interop.nuspec b/build/Pkcs11Interop.nuspec
index c2428006..f4983e30 100644
--- a/build/Pkcs11Interop.nuspec
+++ b/build/Pkcs11Interop.nuspec
@@ -2,7 +2,7 @@
Pkcs11Interop
- 4.0.0
+ 4.1.2
Pkcs11Interop
Jaroslav Imrich
Jaroslav Imrich
@@ -12,7 +12,7 @@
https://www.pkcs11interop.net/nuget/pkcs11interop-icon-64x64.png
Managed .NET wrapper for unmanaged PKCS#11 libraries
- Copyright 2012-2017 The Pkcs11Interop Project
+ Copyright 2012-2020 The Pkcs11Interop Project
pkcs pkcs11 security crypto cryptography smartcard hsm
@@ -21,10 +21,12 @@
-
+
+
+
\ No newline at end of file
diff --git a/build/appveyor-install-android-sdk.ps1 b/build/appveyor-install-android-sdk.ps1
deleted file mode 100644
index 3e10cceb..00000000
--- a/build/appveyor-install-android-sdk.ps1
+++ /dev/null
@@ -1,30 +0,0 @@
-$AndroidToolPath = "${env:ProgramFiles(x86)}\Android\android-sdk\tools\android"
-
-Function Get-AndroidSDKs() {
- $output = & $AndroidToolPath list sdk --all
- $sdks = $output |% {
- if ($_ -match '(?\d+)- (?.+), revision (?[\d\.]+)') {
- $sdk = New-Object PSObject
- Add-Member -InputObject $sdk -MemberType NoteProperty -Name Index -Value $Matches.index
- Add-Member -InputObject $sdk -MemberType NoteProperty -Name Name -Value $Matches.sdk
- Add-Member -InputObject $sdk -MemberType NoteProperty -Name Revision -Value $Matches.revision
- $sdk
- }
- }
- $sdks
-}
-
-Function Install-AndroidSDK() {
- [CmdletBinding()]
- Param(
- [Parameter(Mandatory=$true, Position=0)]
- [PSObject[]]$sdks
- )
-
- $sdkIndexes = $sdks |% { $_.Index }
- $sdkIndexArgument = [string]::Join(',', $sdkIndexes)
- Echo 'y' | & $AndroidToolPath update sdk -u -a -t $sdkIndexArgument
-}
-
-$sdks = Get-AndroidSDKs |? { $_.name -like 'sdk platform*API 10*' -or $_.name -like 'google apis*api 10' }
-Install-AndroidSDK -sdks $sdks
\ No newline at end of file
diff --git a/build/appveyor-switch-android-sdk.ps1 b/build/appveyor-switch-android-sdk.ps1
new file mode 100644
index 00000000..de6c3bc1
--- /dev/null
+++ b/build/appveyor-switch-android-sdk.ps1
@@ -0,0 +1,5 @@
+$file = 'src\Pkcs11Interop.Android\Pkcs11Interop\Pkcs11Interop.csproj'
+$s1 = 'False'
+$s2 = 'True'
+
+(Get-Content $file).replace($s1, $s2) | Set-Content $file
diff --git a/build/build-all.bat b/build/build-all.bat
index 89864764..e950129a 100644
--- a/build/build-all.bat
+++ b/build/build-all.bat
@@ -8,8 +8,10 @@ call build-net40.bat %arg1% || goto :error
call build-net45.bat %arg1% || goto :error
call build-sl5.bat %arg1% || goto :error
call build-netstandard1.3.bat %arg1% || goto :error
+call build-netstandard2.0.bat %arg1% || goto :error
call build-monoandroid2.3.bat %arg1% || goto :error
call build-xamarinios1.0.bat %arg1% || goto :error
+call build-xamarinmac2.0.bat %arg1% || goto :error
@echo *** BUILD ALL SUCCESSFUL ***
@endlocal
diff --git a/build/build-for-coverity-scan.bat b/build/build-for-coverity-scan.bat
deleted file mode 100644
index 4d25790d..00000000
--- a/build/build-for-coverity-scan.bat
+++ /dev/null
@@ -1,39 +0,0 @@
-@setlocal
-
-@rem Add COVERITY tools to PATH
-@set PATH=%PATH%;d:\temp\coverity\cov-analysis-win64-8.7.0\bin\
-
-@rem Initialize Visual Studio build environment:
-@rem - Visual Studio 2017 Community/Professional/Enterprise is the preferred option
-@rem - Visual Studio 2015 is the fallback option (which might or might not work)
-@set tools=
-@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\vsvars32.bat"
-@if exist %tmptools% set tools=%tmptools%
-@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"
-@if exist %tmptools% set tools=%tmptools%
-@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsMSBuildCmd.bat"
-@if exist %tmptools% set tools=%tmptools%
-@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
-@if exist %tmptools% set tools=%tmptools%
-@if not defined tools goto :error
-call %tools%
-@echo on
-
-@rem Clean solution
-msbuild ..\src\Pkcs11Interop\Pkcs11Interop.sln ^
- /p:Configuration=Release /p:Platform="Any CPU" /p:TargetFrameworkVersion=v4.0 ^
- /target:Clean || goto :error
-
-@rem Build Pkcs11Interop project
-cov-build --dir cov-int msbuild ..\src\Pkcs11Interop\Pkcs11Interop\Pkcs11Interop.csproj ^
- /p:Configuration=Release /p:Platform=AnyCPU /p:TargetFrameworkVersion=v4.0 ^
- /p:DefineConstants=COVERITY /target:Build || goto :error
-
-@echo *** BUILD FOR COVERITY SCAN SUCCESSFUL ***
-@endlocal
-@exit /b 0
-
-:error
-@echo *** BUILD FOR COVERITY SCAN FAILED ***
-@endlocal
-@exit /b 1
diff --git a/build/build-monoandroid2.3.bat b/build/build-monoandroid2.3.bat
index 7b197c09..d8dd9714 100644
--- a/build/build-monoandroid2.3.bat
+++ b/build/build-monoandroid2.3.bat
@@ -3,18 +3,20 @@
@rem Argument "--with-tests" forces the build of test project
@set arg1=%1
-@rem Initialize Visual Studio build environment:
-@rem - Visual Studio 2017 Community/Professional/Enterprise is the preferred option
-@rem - Visual Studio 2015 is the fallback option (which might or might not work)
+@rem Initialize build environment of Visual Studio 2017 or 2019 Community/Professional/Enterprise
@set tools=
-@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\vsvars32.bat"
-@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
@if not defined tools goto :error
call %tools%
@echo on
@@ -27,19 +29,19 @@ msbuild ..\src\Pkcs11Interop.Android\Pkcs11Interop.Android.sln ^
/p:Configuration=Release /p:Platform="Any CPU" /target:Clean || goto :error
@if "%arg1%"=="--with-tests" (
- @rem Build both Pkcs11Interop.Android and Pkcs11Interop.Android.Tests projects via solution
+ @rem Build both Pkcs11Interop and Pkcs11Interop.Android.Tests projects via solution
msbuild ..\src\Pkcs11Interop.Android\Pkcs11Interop.Android.sln ^
/p:Configuration=Release /p:Platform="Any CPU" /target:Build || goto :error
) else (
- @rem Build only Pkcs11Interop.Android project
- msbuild ..\src\Pkcs11Interop.Android\Pkcs11Interop.Android\Pkcs11Interop.Android.csproj ^
+ @rem Build only Pkcs11Interop project
+ msbuild ..\src\Pkcs11Interop.Android\Pkcs11Interop\Pkcs11Interop.csproj ^
/p:Configuration=Release /p:Platform=AnyCPU /target:Build || goto :error
)
@rem Copy result to output directory
mkdir monoandroid2.3 || goto :error
-copy ..\src\Pkcs11Interop.Android\Pkcs11Interop.Android\bin\Release\Pkcs11Interop.Android.dll monoandroid2.3 || goto :error
-copy ..\src\Pkcs11Interop.Android\Pkcs11Interop.Android\bin\Release\Pkcs11Interop.Android.xml monoandroid2.3 || goto :error
+copy ..\src\Pkcs11Interop.Android\Pkcs11Interop\bin\Release\Pkcs11Interop.dll monoandroid2.3 || goto :error
+copy ..\src\Pkcs11Interop.Android\Pkcs11Interop\bin\Release\Pkcs11Interop.xml monoandroid2.3 || goto :error
@echo *** BUILD MONOANDROID2.3 SUCCESSFUL ***
@endlocal
diff --git a/build/build-net20.bat b/build/build-net20.bat
index db865a58..c89d85ae 100644
--- a/build/build-net20.bat
+++ b/build/build-net20.bat
@@ -3,18 +3,20 @@
@rem Argument "--with-tests" forces the build of test project
@set arg1=%1
-@rem Initialize Visual Studio build environment:
-@rem - Visual Studio 2017 Community/Professional/Enterprise is the preferred option
-@rem - Visual Studio 2015 is the fallback option (which might or might not work)
+@rem Initialize build environment of Visual Studio 2017 or 2019 Community/Professional/Enterprise
@set tools=
-@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\vsvars32.bat"
-@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
@if not defined tools goto :error
call %tools%
@echo on
diff --git a/build/build-net40.bat b/build/build-net40.bat
index 588368a8..43a5f20a 100644
--- a/build/build-net40.bat
+++ b/build/build-net40.bat
@@ -3,18 +3,20 @@
@rem Argument "--with-tests" forces the build of test project
@set arg1=%1
-@rem Initialize Visual Studio build environment:
-@rem - Visual Studio 2017 Community/Professional/Enterprise is the preferred option
-@rem - Visual Studio 2015 is the fallback option (which might or might not work)
+@rem Initialize build environment of Visual Studio 2017 or 2019 Community/Professional/Enterprise
@set tools=
-@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\vsvars32.bat"
-@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
@if not defined tools goto :error
call %tools%
@echo on
diff --git a/build/build-net45.bat b/build/build-net45.bat
index 69098fca..61062265 100644
--- a/build/build-net45.bat
+++ b/build/build-net45.bat
@@ -3,18 +3,20 @@
@rem Argument "--with-tests" forces the build of test project
@set arg1=%1
-@rem Initialize Visual Studio build environment:
-@rem - Visual Studio 2017 Community/Professional/Enterprise is the preferred option
-@rem - Visual Studio 2015 is the fallback option (which might or might not work)
+@rem Initialize build environment of Visual Studio 2017 or 2019 Community/Professional/Enterprise
@set tools=
-@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\vsvars32.bat"
-@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
@if not defined tools goto :error
call %tools%
@echo on
diff --git a/build/build-netstandard1.3.bat b/build/build-netstandard1.3.bat
index 7a2b4f2e..5b1ea828 100644
--- a/build/build-netstandard1.3.bat
+++ b/build/build-netstandard1.3.bat
@@ -3,7 +3,10 @@
@rem Argument "--with-tests" forces the build of test project
@set arg1=%1
-@rem Initialize build environment of Visual Studio 2017 Community/Professional/Enterprise
+@rem Argument "--skip-cleaning" skips solution cleaning
+@set arg2=%2
+
+@rem Initialize build environment of Visual Studio 2017 or 2019 Community/Professional/Enterprise
@set tools=
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
@@ -11,6 +14,12 @@
@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
@if not defined tools goto :error
call %tools%
@echo on
@@ -18,28 +27,32 @@ call %tools%
@rem Delete output directory
rmdir /S /Q netstandard1.3
-@rem Clean solution
-msbuild ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop.NetStandard.sln ^
- /p:Configuration=Release /p:Platform="Any CPU" /target:Clean || goto :error
-
@rem Restore dependencies for the solution
msbuild ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop.NetStandard.sln ^
/p:Configuration=Release /p:Platform="Any CPU" /target:Restore || goto :error
-@rem Build Pkcs11Interop.NetStandard project
-msbuild ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop.NetStandard\Pkcs11Interop.NetStandard.csproj ^
- /p:Configuration=Release /p:Platform=AnyCPU /target:Build || goto :error
+@if not "%arg2%"=="--skip-cleaning" (
+ @rem Clean solution
+ msbuild ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop.NetStandard.sln ^
+ /p:Configuration=Release /p:Platform="Any CPU" /target:Clean || goto :error
+)
+
+@rem Build Pkcs11Interop project
+msbuild ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop\Pkcs11Interop.csproj ^
+ /p:Configuration=Release /p:Platform=AnyCPU /p:TargetFramework=netstandard1.3 ^
+ /target:Build || goto :error
@if "%arg1%"=="--with-tests" (
@rem Build Pkcs11Interop.DotNetCore.Tests project
msbuild ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop.DotNetCore.Tests\Pkcs11Interop.DotNetCore.Tests.csproj ^
- /p:Configuration=Release /p:Platform=AnyCPU /target:Build || goto :error
+ /p:Configuration=Release /p:Platform=AnyCPU /p:TargetFramework=netcoreapp1.0 ^
+ /target:Build || goto :error
)
@rem Copy result to output directory
mkdir netstandard1.3 || goto :error
-copy ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop.NetStandard\bin\Release\Pkcs11Interop.NetStandard.dll netstandard1.3 || goto :error
-copy ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop.NetStandard\bin\Release\Pkcs11Interop.NetStandard.xml netstandard1.3 || goto :error
+copy ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop\bin\Release\netstandard1.3\Pkcs11Interop.dll netstandard1.3 || goto :error
+copy ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop\bin\Release\netstandard1.3\Pkcs11Interop.xml netstandard1.3 || goto :error
@echo *** BUILD NETSTANDARD1.3 SUCCESSFUL ***
@endlocal
diff --git a/build/build-netstandard2.0.bat b/build/build-netstandard2.0.bat
new file mode 100644
index 00000000..99346eb3
--- /dev/null
+++ b/build/build-netstandard2.0.bat
@@ -0,0 +1,64 @@
+@setlocal
+
+@rem Argument "--with-tests" forces the build of test project
+@set arg1=%1
+
+@rem Argument "--skip-cleaning" skips solution cleaning
+@set arg2=%2
+
+@rem Initialize build environment of Visual Studio 2017 or 2019 Community/Professional/Enterprise
+@set tools=
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@if not defined tools goto :error
+call %tools%
+@echo on
+
+@rem Delete output directory
+rmdir /S /Q netstandard2.0
+
+@rem Restore dependencies for the solution
+msbuild ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop.NetStandard.sln ^
+ /p:Configuration=Release /p:Platform="Any CPU" /target:Restore || goto :error
+
+@if not "%arg2%"=="--skip-cleaning" (
+ @rem Clean solution
+ msbuild ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop.NetStandard.sln ^
+ /p:Configuration=Release /p:Platform="Any CPU" /target:Clean || goto :error
+)
+
+@rem Build Pkcs11Interop project
+msbuild ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop\Pkcs11Interop.csproj ^
+ /p:Configuration=Release /p:Platform=AnyCPU /p:TargetFramework=netstandard2.0 ^
+ /target:Build || goto :error
+
+@if "%arg1%"=="--with-tests" (
+ @rem Build Pkcs11Interop.DotNetCore.Tests project
+ msbuild ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop.DotNetCore.Tests\Pkcs11Interop.DotNetCore.Tests.csproj ^
+ /p:Configuration=Release /p:Platform=AnyCPU /p:TargetFramework=netcoreapp2.0 ^
+ /target:Build || goto :error
+)
+
+@rem Copy result to output directory
+mkdir netstandard2.0 || goto :error
+copy ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop\bin\Release\netstandard2.0\Pkcs11Interop.dll netstandard2.0 || goto :error
+copy ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop\bin\Release\netstandard2.0\Pkcs11Interop.xml netstandard2.0 || goto :error
+
+@echo *** BUILD netstandard2.0 SUCCESSFUL ***
+@endlocal
+@exit /b 0
+
+:error
+@echo *** BUILD netstandard2.0 FAILED ***
+@endlocal
+@exit /b 1
diff --git a/build/create-nuget.bat b/build/build-nuget.bat
similarity index 52%
rename from build/create-nuget.bat
rename to build/build-nuget.bat
index 63535630..5dc5fd53 100644
--- a/build/create-nuget.bat
+++ b/build/build-nuget.bat
@@ -11,8 +11,10 @@ mkdir nuget\lib\net40 || goto :error
mkdir nuget\lib\net45 || goto :error
mkdir nuget\lib\sl5 || goto :error
mkdir nuget\lib\netstandard1.3 || goto :error
+mkdir nuget\lib\netstandard2.0 || goto :error
mkdir nuget\lib\monoandroid2.3 || goto :error
mkdir nuget\lib\xamarinios1.0 || goto :error
+mkdir nuget\lib\xamarinmac2.0 || goto :error
@rem Copy assemblies to output directories
copy net20\Pkcs11Interop.dll nuget\lib\net20 || goto :error
@@ -21,14 +23,18 @@ copy net40\Pkcs11Interop.dll nuget\lib\net40 || goto :error
copy net40\Pkcs11Interop.xml nuget\lib\net40 || goto :error
copy net45\Pkcs11Interop.dll nuget\lib\net45 || goto :error
copy net45\Pkcs11Interop.xml nuget\lib\net45 || goto :error
-copy sl5\Pkcs11Interop.Silverlight.dll nuget\lib\sl5 || goto :error
-copy sl5\Pkcs11Interop.Silverlight.xml nuget\lib\sl5 || goto :error
-copy netstandard1.3\Pkcs11Interop.NetStandard.dll nuget\lib\netstandard1.3 || goto :error
-copy netstandard1.3\Pkcs11Interop.NetStandard.xml nuget\lib\netstandard1.3 || goto :error
-copy monoandroid2.3\Pkcs11Interop.Android.dll nuget\lib\monoandroid2.3 || goto :error
-copy monoandroid2.3\Pkcs11Interop.Android.xml nuget\lib\monoandroid2.3 || goto :error
-copy xamarinios1.0\Pkcs11Interop.iOS.dll nuget\lib\xamarinios1.0 || goto :error
-copy xamarinios1.0\Pkcs11Interop.iOS.xml nuget\lib\xamarinios1.0 || goto :error
+copy sl5\Pkcs11Interop.dll nuget\lib\sl5 || goto :error
+copy sl5\Pkcs11Interop.xml nuget\lib\sl5 || goto :error
+copy netstandard1.3\Pkcs11Interop.dll nuget\lib\netstandard1.3 || goto :error
+copy netstandard1.3\Pkcs11Interop.xml nuget\lib\netstandard1.3 || goto :error
+copy netstandard2.0\Pkcs11Interop.dll nuget\lib\netstandard2.0 || goto :error
+copy netstandard2.0\Pkcs11Interop.xml nuget\lib\netstandard2.0 || goto :error
+copy monoandroid2.3\Pkcs11Interop.dll nuget\lib\monoandroid2.3 || goto :error
+copy monoandroid2.3\Pkcs11Interop.xml nuget\lib\monoandroid2.3 || goto :error
+copy xamarinios1.0\Pkcs11Interop.dll nuget\lib\xamarinios1.0 || goto :error
+copy xamarinios1.0\Pkcs11Interop.xml nuget\lib\xamarinios1.0 || goto :error
+copy xamarinmac2.0\Pkcs11Interop.dll nuget\lib\xamarinmac2.0 || goto :error
+copy xamarinmac2.0\Pkcs11Interop.xml nuget\lib\xamarinmac2.0 || goto :error
@rem Copy license to output directory
copy ..\src\Pkcs11Interop\Pkcs11Interop\LICENSE.txt nuget || goto :error
@@ -38,11 +44,11 @@ copy ..\src\Pkcs11Interop\Pkcs11Interop\NOTICE.txt nuget || goto :error
copy Pkcs11Interop.nuspec nuget || goto :error
%NUGET% pack nuget\Pkcs11Interop.nuspec || goto :error
-@echo *** CREATE NUGET SUCCESSFUL ***
+@echo *** BUILD NUGET SUCCESSFUL ***
@endlocal
@exit /b 0
:error
-@echo *** CREATE NUGET FAILED ***
+@echo *** BUILD NUGET FAILED ***
@endlocal
@exit /b 1
diff --git a/build/build-sl5.bat b/build/build-sl5.bat
index 5dfd5c7a..a7f6b773 100644
--- a/build/build-sl5.bat
+++ b/build/build-sl5.bat
@@ -6,18 +6,20 @@
@rem Add signtool.exe location to PATH
@set PATH=%PATH%;C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\
-@rem Initialize Visual Studio build environment:
-@rem - Visual Studio 2017 Community/Professional/Enterprise is the preferred option
-@rem - Visual Studio 2015 is the fallback option (which might or might not work)
+@rem Initialize build environment of Visual Studio 2017 or 2019 Community/Professional/Enterprise
@set tools=
-@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\vsvars32.bat"
-@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
@if not defined tools goto :error
call %tools%
@echo on
@@ -29,8 +31,8 @@ rmdir /S /Q sl5
msbuild ..\src\Pkcs11Interop.Silverlight\Pkcs11Interop.Silverlight.sln ^
/p:Configuration=Release /p:Platform="Any CPU" /target:Clean || goto :error
-@rem Build Pkcs11Interop.Silverlight project
-msbuild ..\src\Pkcs11Interop.Silverlight\Pkcs11Interop.Silverlight\Pkcs11Interop.Silverlight.csproj ^
+@rem Build Pkcs11Interop project
+msbuild ..\src\Pkcs11Interop.Silverlight\Pkcs11Interop\Pkcs11Interop.csproj ^
/p:Configuration=Release /p:Platform=AnyCPU /target:Build || goto :error
@if "%arg1%"=="--with-tests" (
@@ -41,8 +43,8 @@ msbuild ..\src\Pkcs11Interop.Silverlight\Pkcs11Interop.Silverlight\Pkcs11Interop
@rem Copy result to output directory
mkdir sl5 || goto :error
-copy ..\src\Pkcs11Interop.Silverlight\Pkcs11Interop.Silverlight\bin\Release\Pkcs11Interop.Silverlight.dll sl5 || goto :error
-copy ..\src\Pkcs11Interop.Silverlight\Pkcs11Interop.Silverlight\bin\Release\Pkcs11Interop.Silverlight.xml sl5 || goto :error
+copy ..\src\Pkcs11Interop.Silverlight\Pkcs11Interop\bin\Release\Pkcs11Interop.dll sl5 || goto :error
+copy ..\src\Pkcs11Interop.Silverlight\Pkcs11Interop\bin\Release\Pkcs11Interop.xml sl5 || goto :error
@echo *** BUILD SL5 SUCCESSFUL ***
@endlocal
diff --git a/build/build-xamarinios1.0.bat b/build/build-xamarinios1.0.bat
index 0f48d8c6..864e5124 100644
--- a/build/build-xamarinios1.0.bat
+++ b/build/build-xamarinios1.0.bat
@@ -3,18 +3,20 @@
@rem Argument "--with-tests" forces the build of test project
@set arg1=%1
-@rem Initialize Visual Studio build environment:
-@rem - Visual Studio 2017 Community/Professional/Enterprise is the preferred option
-@rem - Visual Studio 2015 is the fallback option (which might or might not work)
+@rem Initialize build environment of Visual Studio 2017 or 2019 Community/Professional/Enterprise
@set tools=
-@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\vsvars32.bat"
-@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
@if not defined tools goto :error
call %tools%
@echo on
@@ -27,19 +29,19 @@ msbuild ..\src\Pkcs11Interop.iOS\Pkcs11Interop.iOS.sln ^
/p:Configuration=Release /p:Platform="Any CPU" /target:Clean || goto :error
@if "%arg1%"=="--with-tests" (
- @rem Build both Pkcs11Interop.iOS and Pkcs11Interop.iOS.Tests projects via solution
+ @rem Build both Pkcs11Interop and Pkcs11Interop.iOS.Tests projects via solution
msbuild ..\src\Pkcs11Interop.iOS\Pkcs11Interop.iOS.sln ^
/p:Configuration=Release /p:Platform="Any CPU" /target:Build || goto :error
) else (
- @rem Build only Pkcs11Interop.iOS project
- msbuild ..\src\Pkcs11Interop.iOS\Pkcs11Interop.iOS\Pkcs11Interop.iOS.csproj ^
+ @rem Build only Pkcs11Interop project
+ msbuild ..\src\Pkcs11Interop.iOS\Pkcs11Interop\Pkcs11Interop.csproj ^
/p:Configuration=Release /p:Platform=AnyCPU /target:Build || goto :error
)
@rem Copy result to output directory
mkdir xamarinios1.0 || goto :error
-copy ..\src\Pkcs11Interop.iOS\Pkcs11Interop.iOS\bin\Release\Pkcs11Interop.iOS.dll xamarinios1.0 || goto :error
-copy ..\src\Pkcs11Interop.iOS\Pkcs11Interop.iOS\bin\Release\Pkcs11Interop.iOS.xml xamarinios1.0 || goto :error
+copy ..\src\Pkcs11Interop.iOS\Pkcs11Interop\bin\Release\Pkcs11Interop.dll xamarinios1.0 || goto :error
+copy ..\src\Pkcs11Interop.iOS\Pkcs11Interop\bin\Release\Pkcs11Interop.xml xamarinios1.0 || goto :error
@echo *** BUILD XAMARINIOS1.0 SUCCESSFUL ***
@endlocal
diff --git a/build/build-xamarinmac2.0.bat b/build/build-xamarinmac2.0.bat
new file mode 100644
index 00000000..bc477370
--- /dev/null
+++ b/build/build-xamarinmac2.0.bat
@@ -0,0 +1,82 @@
+@setlocal
+
+@rem Argument "--with-tests" forces the build of test project
+@set arg1=%1
+
+@rem Argument "--skip-cleaning" skips solution cleaning
+@set arg2=%2
+
+@rem Initialize build environment of Visual Studio 2017 or 2019 Community/Professional/Enterprise
+@set tools=
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@set tmptools="c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsMSBuildCmd.bat"
+@if exist %tmptools% set tools=%tmptools%
+@if not defined tools goto :error
+call %tools%
+@echo on
+
+@rem Delete output directory
+rmdir /S /Q xamarinmac2.0
+
+@rem Restore dependencies for the solution
+call :enablexamarinmac
+msbuild ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop.NetStandard.sln ^
+ /p:Configuration=Release /p:Platform="Any CPU" /target:Restore || goto :error
+
+@if not "%arg2%"=="--skip-cleaning" (
+ @rem Clean solution
+ msbuild ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop.NetStandard.sln ^
+ /p:Configuration=Release /p:Platform="Any CPU" /target:Clean || goto :error
+)
+
+@rem Build Pkcs11Interop project
+msbuild ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop\Pkcs11Interop.csproj ^
+ /p:Configuration=Release /p:Platform=AnyCPU /p:TargetFramework=xamarinmac2.0 ^
+ /target:Build || goto :error
+
+@if "%arg1%"=="--with-tests" (
+ @rem There is no test project available for Xamarin.Mac
+)
+
+@rem Copy result to output directory
+mkdir xamarinmac2.0 || goto :error
+copy ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop\bin\Release\xamarinmac2.0\Pkcs11Interop.dll xamarinmac2.0 || goto :error
+copy ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop\bin\Release\xamarinmac2.0\Pkcs11Interop.xml xamarinmac2.0 || goto :error
+
+call :disablexamarinmac
+@echo *** BUILD XAMARINMAC2.0 SUCCESSFUL ***
+@endlocal
+@exit /b 0
+
+:error
+call :disablexamarinmac
+@echo *** BUILD XAMARINMAC2.0 FAILED ***
+@endlocal
+@exit /b 1
+
+:enablexamarinmac
+@rem Use "MSBuild.Sdk.Extras" instead of "Microsoft.NET.Sdk" which does not support "xamarinmac2.0" target framework
+set csprojfile=..\src\Pkcs11Interop.NetStandard\Pkcs11Interop\Pkcs11Interop.csproj
+powershell -Command "(Get-Content %csprojfile%).replace('Microsoft.NET.Sdk', 'MSBuild.Sdk.Extras/3.0.22') | Set-Content -Encoding ASCII %csprojfile%"
+powershell -Command "(Get-Content %csprojfile%).replace('', ';xamarinmac2.0') | Set-Content -Encoding ASCII %csprojfile%"
+set assemblyinfofile=..\src\Pkcs11Interop.NetStandard\Pkcs11Interop\Properties\AssemblyInfo.cs
+powershell -Command "(Get-Content %assemblyinfofile%).replace('NetStandard version', 'Mac version') | Set-Content -Encoding ASCII %assemblyinfofile%"
+@exit /b 0
+
+:disablexamarinmac
+@rem Revert from "MSBuild.Sdk.Extras" back to "Microsoft.NET.Sdk"
+set csprojfile=..\src\Pkcs11Interop.NetStandard\Pkcs11Interop\Pkcs11Interop.csproj
+powershell -Command "(Get-Content %csprojfile%).replace('MSBuild.Sdk.Extras/3.0.22', 'Microsoft.NET.Sdk') | Set-Content -Encoding ASCII %csprojfile%"
+powershell -Command "(Get-Content %csprojfile%).replace(';xamarinmac2.0', '') | Set-Content -Encoding ASCII %csprojfile%"
+set assemblyinfofile=..\src\Pkcs11Interop.NetStandard\Pkcs11Interop\Properties\AssemblyInfo.cs
+powershell -Command "(Get-Content %assemblyinfofile%).replace('Mac version', 'NetStandard version') | Set-Content -Encoding ASCII %assemblyinfofile%"
+@exit /b 0
diff --git a/build/sign-all.bat b/build/sign-all.bat
index 1406bf2b..f1aaf07e 100644
--- a/build/sign-all.bat
+++ b/build/sign-all.bat
@@ -3,7 +3,7 @@
set SIGNTOOL="C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\signtool.exe"
@rem Define signing options
-set CERTHASH=d5de31ea974f5ea8581d633eeffa8f3ea0d479bb
+set CERTHASH=9ccadd88b898155baef4c7b8ff7b17595275b1bb
set TSAURL=http://time.certum.pl/
set LIBNAME=Pkcs11Interop
set LIBURL=https://www.pkcs11interop.net/
@@ -13,26 +13,30 @@ set LIBURL=https://www.pkcs11interop.net/
net20\Pkcs11Interop.dll ^
net40\Pkcs11Interop.dll ^
net45\Pkcs11Interop.dll ^
-sl5\Pkcs11Interop.Silverlight.dll ^
-netstandard1.3\Pkcs11Interop.NetStandard.dll ^
-monoandroid2.3\Pkcs11Interop.Android.dll ^
-xamarinios1.0\Pkcs11Interop.iOS.dll || goto :error
+sl5\Pkcs11Interop.dll ^
+netstandard1.3\Pkcs11Interop.dll ^
+netstandard2.0\Pkcs11Interop.dll ^
+monoandroid2.3\Pkcs11Interop.dll ^
+xamarinios1.0\Pkcs11Interop.dll ^
+xamarinmac2.0\Pkcs11Interop.dll || goto :error
@rem Sign all assemblies using SHA256withRSA algorithm
%SIGNTOOL% sign /sha1 %CERTHASH% /as /fd sha256 /tr %TSAURL% /td sha256 /d %LIBNAME% /du %LIBURL% ^
net20\Pkcs11Interop.dll ^
net40\Pkcs11Interop.dll ^
net45\Pkcs11Interop.dll ^
-sl5\Pkcs11Interop.Silverlight.dll ^
-netstandard1.3\Pkcs11Interop.NetStandard.dll ^
-monoandroid2.3\Pkcs11Interop.Android.dll ^
-xamarinios1.0\Pkcs11Interop.iOS.dll || goto :error
+sl5\Pkcs11Interop.dll ^
+netstandard1.3\Pkcs11Interop.dll ^
+netstandard2.0\Pkcs11Interop.dll ^
+monoandroid2.3\Pkcs11Interop.dll ^
+xamarinios1.0\Pkcs11Interop.dll ^
+xamarinmac2.0\Pkcs11Interop.dll || goto :error
-@echo *** SIGNING SUCCESSFUL ***
+@echo *** SIGN ALL SUCCESSFUL ***
@endlocal
@exit /b 0
:error
-@echo *** SIGNING FAILED ***
+@echo *** SIGN ALL FAILED ***
@endlocal
@exit /b 1
diff --git a/build/sign-nuget.bat b/build/sign-nuget.bat
new file mode 100644
index 00000000..a3abfb6f
--- /dev/null
+++ b/build/sign-nuget.bat
@@ -0,0 +1,19 @@
+@setlocal
+
+set NUGET=c:\nuget\nuget.exe
+
+@rem Define signing options
+set CERTHASH=9ccadd88b898155baef4c7b8ff7b17595275b1bb
+set TSAURL=http://time.certum.pl/
+
+%NUGET% sign Pkcs11Interop*.nupkg -CertificateFingerprint %CERTHASH% -Timestamper %TSAURL% || goto :error
+%NUGET% verify -Signature Pkcs11Interop*.nupkg
+
+@echo *** SIGN NUGET SUCCESSFUL ***
+@endlocal
+@exit /b 0
+
+:error
+@echo *** SIGN NUGET FAILED ***
+@endlocal
+@exit /b 1
diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile
index 0f939433..a3c379f2 100644
--- a/doc/doxygen/Doxyfile
+++ b/doc/doxygen/Doxyfile
@@ -38,7 +38,7 @@ PROJECT_NAME = Pkcs11Interop
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 4.0.0
+PROJECT_NUMBER = 4.1.2
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/doc/doxygen/footer.html b/doc/doxygen/footer.html
index 3bc519f0..446f7a25 100644
--- a/doc/doxygen/footer.html
+++ b/doc/doxygen/footer.html
@@ -1,9 +1,9 @@