When creating a new project, there are a lot of options in the template...
How do you add more templates to Visual Studio Project. I tried to update, but it did not work.
I saw one version with a lot of items, like Web forms application, MVC web application, ...
And mine is only showing: asp.net web application...
[edit] and how do you add the blue template from VS2013 (with your logo here), instead of this black template in VS2017.
Related
Starting to work with a web app and following the steps here to use razor pages
https://learn.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/
Is there a template (either in VS or elsewhere) for adding a new razorpage (ie the cshtml and the cshtml.cs files)? As a workaround I created an MVC View page (with the .cshtml ext) and then created a .cs file and renamed it to match the naming pattern.
I'm having problems running the scaffolding as well but that is a separate issue.
You can do this in the latest version of Visual Studio 2017 just by using Add New Item and choosing Razor Page.
You can also use dotnet new. For example:
dotnet new page --name MyPage
See the documentation for dotnet new. You can always get started by just running dotnet new alone to see the available templates.
Visual Studio 2013 with update 4 does not show a shared project template. I only have the Xamarin forms project templates. I just installed a fresh update of Xamarin this morning. Based on what I've found so far, this used to be an issue with VS update 2. Any idea on how to get shared project template to show up?
From Xamarin Support:
No, there's no optional bits missing. I think Visual Studio Update 4
removed the shared project template. It's a Microsoft template, not a
Xamarin one. You can still create a Xamarin.Forms app with a Shared
Project (that's our template), but they no longer allow you to create
an independent shared project.
So, three ways to create one now if you are using Visual Studio 2013:
1) Switch to Xamarin Studio and create it there and then close it and
reopen the solution in VS. VS will recognize the project, it just
doesn't have a template to create it anymore. This is probably the
easiest approach.
2) Install the "Shared Project Template" from the Online templates -
this is a 3rd party template; I've not tried it but if you want to
stay in VS and have the template, it's worth a shot.
3) Create either a Universal Windows Store app (which uses a Shared
Proejct), or a Xamarin.Forms app and then delete all the other
projects :)
Alternatively, Visual Studio 2015 (currently in CTP); last time I
checked, it still has the project template - you can install that
side-by-side with VS2013 and use it as your IDE.
I've read about Single-Page Applications recently and wanted to try one out. After watching Steve Sanderson's presentation (http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2159) I wanted to create a Single-Page App in my Visual Studio 2010 and test it out myself. But then I found out I can't choose an SPA template anymore, as it was removed in RC version.
Now, the question is - what should I do in Visual Studio 2010 (with MVC4 installed) to be able to create an SPA? I'd like to use KnockoutJS for UI and Upshot for data, both of which I'm able to install using Nuget. I haven't found anything relevant on the Web, every single page I've been to is telling me to use the SPA template, which has been removed since.
Thanks for any suggestion!
SPA was excluded from RC because it wasn't ready in time for MVC4 release. Official ASP.NET SPA page. You can create project with MVC template and scaffold SPA via NuGet (SPA scaffolding)
For Visual Studio 2010, try using Hot Towel by John Papa.
Create an empty MVC4 app, then install a Nuget from Package Manager Console
PM> Install-Package HotTowel
I maintain a couple of legacy ASP.Net webforms solutions, that I have upgraded to use .Net 4.
However, they appear to be different in Visual Studio 2010, than other projects. If I open properties for one of the web projects in the solution, it looks like this:
The old-school dialog from previous versions. No fancy publishing and other neat "new" stuff.
What is going on here, and how do I fix it?
You appear to have created a New Web Site...
You're looking for Web Application it sounds like. Go to File > New > Project..., and ASP.NET Web Application is under there. You may also want ASP.NET Empty Web Application as it doesn't have some auto-generated junk in it.
Is it possible to use Visual Studio 2010 as a simple web site editor (HTML + JavaScript; no ASP.NET)?
VS only supports known project file types (i.e. .csproj), so I started with a C# project and I've been fiddling with the file, but VS still keeps creating .vshost files and obj directory.
Can I force it not to do this?
See Previous Question
Visual Studio Web Development is orientated to ASP.NET projects creation, but you can build without any problem, HTML & JS applications deleting the extra directories created for ASP.NET apps, which need that.
Maybe using Visual Web developer
http://technet.microsoft.com/en-us/query/9z74w20y
You can add "Project Folders" to a empty project / solution and add the files into the folders without any project "overhead" .. intellisense works fine ..