For a long time, I have been amazed by peaple that have been written nice and usable extensions to visual studio.
So I am giving it a shot!
I’m writing ALOT of knockout at the moment så why not write something that helps me out, I wrote a Visual studio extension that generates a knockout viewmodel from your C# or VB model.
The extension can be found here: Knockout Generator
Here is how it works, the plugin adds a new Context menu item to your .cs/.vb files. Right click on a .cs/.vb file that has public properties, click the new command ”Generate Knockout ViewModel”.
A new .js file will be added to the project with a Knockout ViewModel based on the .cs/.vb files content (properties)
Example from Foo.cs and Foo.vb:
Properties that is private will not be included.