Solution for developing in Windows Silverlight in Visual Studio 2017?

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 Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat"
@echo on

@rem Delete output directory
rmdir /S /Q sl5

@rem Clean project
msbuild ..\src\Pkcs11Interop\Pkcs11Interop\Pkcs11Interop.csproj /p:Configuration=Release /p:Platform=AnyCPU /target:Clean || goto :error

@rem Build project
msbuild ..\src\Pkcs11Interop\Pkcs11Interop\Pkcs11Interop.csproj /p:Configuration=Release /p:Platform=AnyCPU /target:Build || goto :error

@rem Copy result to output directory
mkdir sl5 || goto :error
copy ..\src\Pkcs11Interop\Pkcs11Interop\bin\Release\Pkcs11Interop.dll sl5 || goto :error
copy ..\src\Pkcs11Interop\Pkcs11Interop\bin\Release\Pkcs11Interop.xml sl5 || goto :error

@echo *** BUILD SL5 SUCCESSFUL ***
@endlocal
@exit /b 0

:error
@echo *** BUILD SL5 FAILED ***
@endlocal
@exit /b 1

I'm left using both IDEs as 2017 does not support it. The solution uses 2017 but if I have to edit SL code I have to go back to the previous IDE version.

To quote Visual Studio 2017 Platform Targeting and Compatibility

Compatibility with Previous Releases

Installation

You can install and use Visual Studio 2017 alongside previous versions of Visual Studio, including Visual Studio 2015, Visual Studio 2013, and Visual Studio 2012.

Silverlight

Silverlight projects are not supported in this version of Visual Studio. To maintain Silverlight applications, continue to use Visual Studio 2015.


The Silverlight for Visual Studio extension on the Visual Studio Marketplace unofficially supports Silverlight projects in Visual Studio 2017 and Visual Studio 2019.

It's FREE.

Disclosure:
I published the Visual Studio extension.