VS2017 - ServiceStackVSPlugin - Update ServiceStack Reference throws "Object reference not set to an instance of an object"


Using Visual Studio 2017 Professional and the ServiceStackVS plugin version 2.0.1 with ServiceStack version 5.5.

I have a previously generated TypeScript dto which I want to update from 5.4.0

Right click the dto, select “Update ServiceStack Reference” and get exception “Object reference not set to an instance of an object” thrown (same exception if the server is started / not started)

Any suggestions?


I can’t repro this issue on my local VS 2017, does the Output window for ServiceStackVS show any info about the error?

Another way to update the ServiceStack reference is to use the web .NET Core tool which you can install with:

$ dotnet tool install --global web 

This will let you update all ServiceStack *dto.ts TypeScript References with:

$ web ts

Which you can run by clicking on Open Folder in File Explorer from the right-click context menu of your project, then typing cmd in Explorer’s url bar which will open the current folder in the command prompt.

You can also integrate this with Visual Studio you can create an External Tool:

Where you can then go to Tools > Update TypeScript Reference in VS .NET to update your TypeScript references or you can use the ALT+T R keyboard shortcut.

I’ve managed to update using web <file> in the web .NET Core tool.

Nothing shown in Output window when the VSPlugin fails.

I’ve tried uninstalling and re-installing the plugin without success but have a workround now.