Making MVC templates available in a Class Library (VS 2017) - visual-studio

I have an Umbraco Cloud project I am working on in Visual Studio. Umbraco Cloud provides a script that creates a Visual Studio solution consisting of two projects: An MVC website containing the CMS' files, and a Class Library for the developer's own MVC code. The Class Library project contains a Controllers and a Models folder.
The problem I am having is that Visual Studio's MVC templates are not available from within the Class Library project. When I choose Add > New Item, I get many templates under "Visual C# Items" the Installed list, but nothing for MVC.
I understand that these templates are not needed to create MVC code, but they are helpful for me, and their absence is an inconvenience.
How can I make Visual Studio's MVC templates available in this Class Library project? I looked through this site for solutions, but came up with nothing. Any help is appreciated.
Thanks,
David

Related

How to associate item templates with Project Type in Visual Studio 2019?

I would like to create a new F# Web ASPNET (not Core) Application using the MSBuild based legacy project format, not the SDK project. In Visual Studio 2019, the only available option for this project type is C#. I've attempted to reverse engineer the project setup by creating a new F# class library and modify the ProjectTypeGuids.
The C# Web Application uses the following project type GUIDs
349c5851-65df-11da-9384-00065b846f21 - ASP.NET MVC 5
fae04ec0-301f-11d3-bf4b-00c04f79efbc - C#
On a basic F# .NET Framework class library, I attempted to add the ASP.NET and F# project type guids to the project.
<ProjectTypeGuids>{349C5851-65DF-11DA-9384-00065B846F21};{F2A71F9B-5D33-465A-A702-920D77279786}</ProjectTypeGuids>
This succeeded in adding the web configuration to the project properties, but now I am unable to add any items to the project at all. It looks like in the past you needed to associate the right language templates with the project guid in the registry editor (see this link)
These entries don't appear to be anywhere that I can see in the registry, for any installed version of VS (which at this point is just 2017 and 2019). How can I enable F# item templates for my F# web application?
While not exactly an answer to the question, I think the pain of trying to do this is likely proof that you SHOULDN'T do this. In the end my approach will be to simply implement the Web Application in C#, while keeping as much code as possible in F# targeting netstandard.

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.

Which Visual Studio project type does PhoneJS use?

I am looking at phoneJs and they talk about using nuget. However they don't say what their solution is. It looks like it is a javascript solution project but I don't see that in VS2012.
PhoneJs
It can be ASP.NET project (WebForms, MVC) or Window Store Javascript application.
Screenshots at the page you refer most probably display Windows Store project. This kind of project is only available in Windows 8.
P.S. Additional project templates with PhoneJS are included in DevExtreme: documentation.

Can i combine the Visual Basic project web site pages in Visual C# project and make them single project?

I have two web projects one from C#.net and another from vb.net. Means while creating project i selected project as Visual Basic & Visual C#. Can i combine the Visual Basic project web site pages in Visual C# project and make them single project?
thanks
The project is set to compile using a specific compiler... c# or vb which do you want... so you have to separate the c# into its own project... and the vb in it own project. There is one caveat. You CAN put aspx pages that are C# and vb in the same project if you don't use code behind pages because they are compiled on the fly... just in time... ;-)

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...

Resources