16

I've installed nuget package manager and I really love mvc-scaffold extension. I would like to write similar tool for my projects.

Is there any API reference or some documentation for nuget I can learn from ? TIA for any suggestions.

Edit: Question is already 'answered' (thx one more time), here are some links that can be helpful:

Jarek
  • 5,885
  • 6
  • 41
  • 55

1 Answers1

30

I wrote the current version of MvcScaffolding that you mention in your question. Here's how it adds PowerShell cmdlets to the Package Manager Console:

Note that it's not actually necessary to write your cmdlets in C# and call Import-Module. A simpler alternative is to write them in PowerShell (see http://technet.microsoft.com/en-us/magazine/ff677563.aspx) and define them inline in your NuGet package's init.ps1 file.

Or, if your question is about how to add custom scaffolders to MvcScaffolding (e.g., so you can say "Scaffold MyCustomThing -somecustomparams"), then use the command "Scaffold CustomScaffolder MyCustomThing", and then edit the PS1/T4 files that appear in your CodeTemplates/Scaffolders folder. I'll blog more details about this soon.

Simon Ness
  • 2,272
  • 22
  • 28
  • THX!Your third point was something that I was looking for ! :> There are no docs about it. I think it's a really great feature (I want to scaffold some Windows Forms controls at work (to replace shitty templates), and distribute package to another developers to promote nuGet :)). Great job with MvcScaffolding, I like RoR :)) – Jarek Feb 23 '11 at 17:54
  • 1
    Also have a look at @steven-sanderson great feature rich presentation at mix 11: [Scaffolding – ASP.NET, NuGet, Entity Framework Code First and More](http://channel9.msdn.com/Events/MIX/MIX11/FRM13) – Örjan Jämte Jun 15 '11 at 11:54