Visual Studio 2017 Blazor Project Templates Missing - visual-studio

I'm exploring building a Blazor SPA app for a test project I'm working on using Visual Studio 2017 (15.9.4). I have installed .NET Core 2.2.1 and the Blazor Language Services extension but when I open Visual Studio to create a new project, no Blazor template is shown. I was able to create a project using the CLI but when I open the project in Visual Studio it gives several errors inside even though the project runs. There are also no Blazor page templates available when I try to New Item. What can I do to get the templates to load in Visual Studio?

Okay, so I figured it out. I went to File >> New >> Project, selected "ASP.Net Core Web Application" then on the next window I had to change "ASP.NET Core 2.2" to "ASP.NET Core 2.1", then the templates were there.

Related

run asp.net core mvc Application in visual Studio code

I have already developed asp.net core MVC Application before in visual studio 2017
and I Decided to run and debug this app on visual studio code, What are the required changes for configuration in vs code and in my application?
Not a single change. VS code is an editor after all you go to your folder.
Not on the sln folder and run on the cmd
dotnet run

typescript Web page development in Visual Studio 2017

I am trying to set up a project in Visual Studio 2017 that does what I am already doing in Visual Studio Code.
I have is a typescript Web page which uses THREE for WebGL so it is client intensive. It needs to interface to a custom Web server running on localhost. For Visual Studio Code I open the Web site, set up the source maps and I can set breakpoints in the typescript for the Chrome debugger inside Visual Studio Code. A true IDE for typescript.
Here is what I have tried with Visual Studio 2017:
1- Open a Web Site. This is the same Web site that works in Visual Studio Code. I cannot get the typescript to build.
2- Create node.js typescript project. Typescript builds but I cannot connect to any Web server and see my code. I can only start up server.ts. In theory I can build a Web server in node.js but I need to connect to my custom Web server.
3- Set up a C# ASP project. I can build typescript and set breakpoints but the breakpoints are not hit.
The third option was recommended as a way to get typescript to compile but it builds C# DLL’s and doesn’t seem logical. I don’t remember whether I could attach to my custom Web server or not. This was in response to the disappearance of the typescript Web page from the templates on VS2017.
Visual Studio Code has its advantages but it is brittle. The breakpoints stop working sometimes and now I can’t get source maps to work. In theory this should all work perfectly on Visual Studio 2017 right?

How to Migrate Old Visual Studio Project to Visual Studio 2017?

Goal:
I try to open a visual studio project (c#) with CLR code for SQL Server from the Pluralsight course.
Issue:
I get no error messages just warnings below after One-way upgrade on Visual Studio 2017.
Your project is targeting .NET Framework 2.0 or 3.0. If your project
uses assemblies requiring a newer .NET Framework, your project will
fail to build. You can change the .NET Framework version by clicking
Properties on the project menu and then selecting a new version in the
'.NET Framework' dropdown box. (In Visual Basic, this is located on
the Compile tab by clicking the 'Advanced Compiler Options...'
button.)
When I open a solution with single project inside I get message below
The Project Needs to be migrated
or
The Project Needs to be loaded
Tried:
I tried editing csproj files with newer/older version numbers.
I tried different PCs with Visual Studio 2017 and Visual Studio 2015
Idea: Install Visual Studio 2010 as course was released in 2010 BUT I really do not want that.
When I got this issue, I tried reloading the project and when I did, it told me that I did not have an SDK installed and then it offered to install the SDK. Once I had the SDK installed, the project loaded and I was able to work with the project.

Visual Studio 2017 – Enterprise restarts on .Net Core Projects

Just installed Visual Studio 2017 – Enterprise Edition with the following workloads:
Universal Windows Platform Development
ASP.Net and Web Development
.Net Desktop Development
.Net Core cross-platform Development
After this installation, when I create a new .net core or .net standard project, the visual studio restarts while loading the project template.
Steps to create the behavior:
File ⇒ New Project ⇒ .Net Core ⇒ Asp.Net Core Application (.Net Core)
Visual Studio tries to load the selected template then suddenly it disappears and the windows show the dialogue box to Check online help, debug or close it.
Next, visual studio reboots to the start page.
This only happens when I select any .Net Core or .Net Standard project templates.
Much appreciate your help in advance.
I had the exact same issue. It turned out that when a .Net core or .Net standard project template is selected, it tries to restore the packages from NuGet and somehow it was unable to do that or clear the NuGet’s local cache.
Here are the steps to fix it:
Download NuGet
https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
Open the command prompt as “Administrator” – this is important other
cache may not get cleared due to permission issues.
Navigate to the folder where the NuGet is downloaded
Run the following command to clear the cache
nuget locals all -clear
Open Visual Studio 2017
Create a new ASP.Net core project with default templates
Hope this helps!

Open .NETCore Yeoman generated projects in Xamarin Studio or Visual Studio Preview (Mac)

I've generated a .NETCore project using the Yeoman CLI tool on my Mac. I'm able to run the project using Visual Studio Code. However I want to be able to open and run the project with either Xamarin Studio or Visual Studio Preview. Is this possible? Both IDEs seem to require an .sln file, however the Yeoman generated project doesn't provide one.
To be correct, both IDEs supports .csproj file, not project.json, that was announced with latest .NET Core Tools. What you may try to do is to migrate your project.json using the dotnet migrate command:
dotnet-migrate -- Migrates a Preview 2 .NET Core project to Preview 3 .NET Core project

Resources