I want to create a Visual Studio 2010 Project Template, which is essentially a ASP.net 3.5 Webforms Application.
However, I would like to automatically add a NuGet Package Reference. I can bundle the actual nupkg with the template if needed, but I wonder if it’s possible to instead run the Install-Package command to always retrieve the latest version when creating a new Project? (I can guarantee that future versions never break the template)
Is that possible? I only made small changes to Project Templates so far, so I don’t know exactly where I would start. I found some stuff for MVC 3, but as said, I’m on Webforms (and .net 3.5).
You can create a custom template for it, however it won’t be fetched from the web, it’ll only copy from your local disk (though maybe this will change in the future). Phil Haack wrote an article about this on his blog recently: