How to scaffold views from controller separately - visual-studio-2013

I'm wondering if Visual Studio 2013 has any way to scaffold views using the controllers in MVC. I want to use a repository pattern, so for now I created that myself, and I would like to generate the views.
In Visual Studio 2012 I used the technique explained here by Scott Hanselman, but with the new scaffolding introduced in the new version of Visual Studio I was wondering if this is not supported natively

The scaffolding functionality appears to be embedded in Common7\IDE\Extensions\Microsoft\Web\Mvc\Scaffolding\Microsoft.AspNet.Scaffolding.Mvc.5.0.dll and I can't find any way to customize it further. So if there isn't a built-in means of scaffolding the way their used to be, it looks like you're doing to have to roll your own mechanism.

Related

Intellisense for Angular2 HTML templates

We've recently started to migrate to Angular2 from another framework, most of my component templates are not inline and are in separated HTML files.
Is there any plugin that would provide something like IntelliSense inside the HTML?
For example, it would be great to see a list of methods of the component, or a list of properties of an item of a collection iterated with a NgFor directive.
I have failed to find such a thing.
We are using Visual Studio 2015.
I am assuming you haven't come across the latest visual code IDE.
You can go on to Visual Studio to download the latest, I believe that only when you're using interfaces or classes, Intellisense will kick in. I encourage you to use this if you're into using this for your development.
You need to download VS Code and the Angular Language Service plug-in.

How do I install MVC3 on a server without using the Web Platform Installer (and without Visual Studio)?

How do I install MVC3 on a server without using the Web Platform Installer (and without Visual Studio)?
I can't seem to locate a standalone installer, and the server won't have VS, and I can't ensure that all the apps will have the binaries included to run it on native .NET4.
Is the only way to install MVC3 support with VS support, even if VS isn't around?
In case it isn't obvious, I'm trying to give the IT group a baseline of packages to install, and the easiest way to do that is to give them the binaries and a few scripts
Referencing the link on http://www.asp.net/mvc/mvc3 we get a link to http://www.microsoft.com/en-us/download/details.aspx?id=1491 | ASP.NET MVC 3 Tools Update
I think that's what you're looking for.
ASP.NET MVC 3 is a framework for developing highly testable and maintainable Web applications by leveraging the Model-View-Controller (MVC) pattern. The framework encourages developers to maintain a clear separation of concerns among the responsibilities of the application – the UI logic using the view, user-input handling using the controller, and the domain logic using the model. ASP.NET MVC applications are easily testable using techniques such as test-driven development (TDD).
The installation package includes templates and tools for Visual Studio 2010 to increase productivity when writing ASP.NET MVC applications. For example, the Add View dialog box takes advantage of customizable code generation (T4) templates to generate a view based on a model object. The default project template allows the developer to automatically hook up a unit-test project that is associated with the ASP.NET MVC application.
You can download it from : https://www.microsoft.com/es-es/download/details.aspx?id=4211
Is the 3.0.0.0 version and you can reference manually the DLL from : C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies\System.Web.Mvc.dll
Other versions : https://stackoverflow.com/a/5485175/5775048
Install the MVC3 runtime from this link: http://www.microsoft.com/en-us/download/details.aspx?id=4211.
Go to c:\windows\microsoft.net\framework[64]\v4.0.30319 and run aspnet_regiis -i (adjusting for whatever version of .Net is appropriate).
Restart IIS.
This has always worked for me, although at the moment I'm having an issue because the installer installs 3.0.0.0 and my app is looking for 3.0.0.1.

Creating custom designer over XML file as VSIX 2010 package

We have a set of VS 2008 packages which leverages custom Project/Item templates, designers around XML files for our in house product development using VS. We are planning to move to VS 2010 and looking for migrating our VS 2008 packages to 2010. I see that there has been a rewrite of VS from ground up using WPF/MEF, but still could not figure out how we can leverage it for our packages. I am seeing some guidelines, samples and community material on how we should be extending the VS 2010 WPF based text editor, but could not find any reference implementations on how one should implement a custom designer on top of XML using the WPF/MEF APIs of VS SDK.
Only sample I have come across regards to any custom designer implementation so far was Example.XmlWpfDesigner - http://code.msdn.microsoft.com/Designer-View-Over-XML-20a81f17 which does not talk anything about WPF/MEF way of doing custom designers.
Has anybody come across any reference implementations along these lines? Any help regarding this would be much appreciated.
Thanks,
Siva
The sample you linked to is the right one to be looking at for a designer over an XML file. It is a WPF-design surface that edits VSTemplate XML files.
The only part of the VS API's that moved to MEF in VS 2010 was the core text editor. While you are welcome to use MEF for the implementation details of your designer, you'll still need to talk to the VS COM API's to do things like buffer management, interfacing with Source Control interfaces, etc...

Visual Studio tools for manual Entity Framework modelling

Is there any tooling or support in Visual Studio 2010 for manually creating Entity Framework models?
I'm finding the designer too restrictive in terms of mapping a reasonable complex conceptual model to an efficient and performant storage model and understand that part of this may be due to not all features being supported by the edmx designer in visual studio but have yet to find any support for working with it manually - if anything the lack of xml view on the edmx makes it harder.
I'm also open to suggestions for other ORMs I can look at to replace Entity Framework for use in ASP.NET MVC projects my main requirement being that it be quick and easy to configure.
You might be a good candidate for Code First Entity Framework, it's in CTP5 currently but worth checking out.
Here's a blog post from Scott Guthrie introducing EF Code First.

Visual Studio class/file templates: Is there a way to change their content automatically per project/solution?

I've updated my default templates in Visual Studio for classes, interfaces, code files, etc. I removed the default namespaces and added a copyright header blurb.
Is there a way to use a variable or something in the template so I don't have to zip/unzip and re-run the vs installer to change the copyright header? (I'm a consultant, the code-owner isn't always me or my company).
Yes, you can. The documentation for this sort of thing is part of the Visual Studio SDK. There are already many variables you can use.
If you find you want to get fancy, look into the Guidance Automation Toolkit. A template using GAT can accept user input as well as information from the project and environment, can unfold one or more templates, filling in placeholders with the data gathered, and then can execute various actions against the unfolded templates, the project, or whatever.
You can get the complete example implemented here: Multi-Project Templates with Wizard: Visual Studio 2010 Sample

Resources