Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for netstandard20 #89

Merged
merged 4 commits into from
Jun 11, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Build scripts for netstandard2.0
  • Loading branch information
jariq committed Jun 11, 2018
commit 5a8880cd3c1c07ba2b884af9bbc27e649cac451b
1 change: 1 addition & 0 deletions build/build-all.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ call build-net20.bat %arg1% || goto :error
call build-net40.bat %arg1% || goto :error
call build-net45.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

Expand Down
10 changes: 6 additions & 4 deletions build/build-netstandard1.3.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,20 @@ msbuild ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop.NetStandard.sln ^

@rem Build Pkcs11Interop project
msbuild ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop\Pkcs11Interop.csproj ^
/p:Configuration=Release /p:Platform=AnyCPU /target:Build || goto :error
/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\bin\Release\Pkcs11Interop.dll netstandard1.3 || goto :error
copy ..\src\Pkcs11Interop.NetStandard\Pkcs11Interop\bin\Release\Pkcs11Interop.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
Expand Down
53 changes: 53 additions & 0 deletions build/build-netstandard2.0.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@setlocal

@rem Argument "--with-tests" forces the build of test project
@set arg1=%1

@rem Initialize build environment of Visual Studio 2017 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%
@if not defined tools goto :error
call %tools%
@echo on

@rem Delete output directory
rmdir /S /Q netstandard2.0

@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 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
3 changes: 3 additions & 0 deletions build/build-nuget.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ mkdir nuget\lib\net20 || goto :error
mkdir nuget\lib\net40 || goto :error
mkdir nuget\lib\net45 || 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

Expand All @@ -22,6 +23,8 @@ copy net45\Pkcs11Interop.dll nuget\lib\net45 || goto :error
copy net45\Pkcs11Interop.xml nuget\lib\net45 || 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
Expand Down
2 changes: 2 additions & 0 deletions build/sign-all.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ net20\Pkcs11Interop.dll ^
net40\Pkcs11Interop.dll ^
net45\Pkcs11Interop.dll ^
netstandard1.3\Pkcs11Interop.dll ^
netstandard2.0\Pkcs11Interop.dll ^
monoandroid2.3\Pkcs11Interop.dll ^
xamarinios1.0\Pkcs11Interop.dll || goto :error

Expand All @@ -23,6 +24,7 @@ net20\Pkcs11Interop.dll ^
net40\Pkcs11Interop.dll ^
net45\Pkcs11Interop.dll ^
netstandard1.3\Pkcs11Interop.dll ^
netstandard2.0\Pkcs11Interop.dll ^
monoandroid2.3\Pkcs11Interop.dll ^
xamarinios1.0\Pkcs11Interop.dll || goto :error

Expand Down