While it is true that Visual Studio 2017 does not support Silverlight5 projects I have found out that MSBuild shipped with Visual Studio 2017 is able to build them if you have Silverlight5 SDK installed.
I know that it is not an ideal solution but at least I don't need to keep older Visual Studio installed if I just need to rebuild the SL5 code.
For example I am using following build.bat
file to build SL5 project with VS2017:
@setlocal
@rem Initialize build environment of Visual Studio 2017
call "c:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7ToolsVsMSBuildCmd.bat"
@echo on
@rem Delete output directory
rmdir /S /Q sl5
@rem Clean project
msbuild ..srcPkcs11InteropPkcs11InteropPkcs11Interop.csproj /p:Configuration=Release /p:Platform=AnyCPU /target:Clean || goto :error
@rem Build project
msbuild ..srcPkcs11InteropPkcs11InteropPkcs11Interop.csproj /p:Configuration=Release /p:Platform=AnyCPU /target:Build || goto :error
@rem Copy result to output directory
mkdir sl5 || goto :error
copy ..srcPkcs11InteropPkcs11InteropinReleasePkcs11Interop.dll sl5 || goto :error
copy ..srcPkcs11InteropPkcs11InteropinReleasePkcs11Interop.xml sl5 || goto :error
@echo *** BUILD SL5 SUCCESSFUL ***
@endlocal
@exit /b 0
:error
@echo *** BUILD SL5 FAILED ***
@endlocal
@exit /b 1
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…