Asp.net Core Diagnostic Events in Visual Studio - asp.net

Im am experimenting with Asp.net Core. I am using visual studio 2015 enterprise.
I set up two MVC projects. The first is targeting the .net-framework and the other runs on .net core runtime (dotnet.exe).
I noticed that when I run the app (targeting .net framework) in visual studio, the diagnostics-tools window shows all kinds of events e.g. which controller action was called or if model state was valid.
This diagnostics view does not show any kind of information, when I run a boilerplate mvc project template targeting .net core runtime.
See
I do understand that .net core applications are executed by the core runtime and not visual studio directly, but is it normal that visual studio does not recognize those diagnostic events anymore ?
If so, what is the recommended way of viewing or log away this information ?

Related

Visual Studio 2022 - Visual Basic ASP.NET Web Application

I 've downloaded/installed Visual Studio 2022 Community Edition but there is no way to find the ability to create a new ASP.NET Web Application (.Net Framework) using Visual Basic. It looks like i can only develop Windows Desktop Application using it.
Has it been deprecated ? If not how can i bring it back to life?
Run the Visual Studio installer.
Inside the .NET group, below the ".NET Framework 4.8 targeting pack", there is a component named .NET Framework project and item templates and make sure that you have installed it.
Visual Studio 2022 Installer - individual components .in NET group
Hovering over the component, the tooltip describes it as:
Enables .NET Framework project templates, item templates & related
features for .NET Framework development.
See: https://www.howtosolutions.net/2021/11/visual-studio-missing-asp-net-web-application-template-dotnet-framework/

asp.net web application template is missing visual studio 2017

I have visual studio 2017 enterprise edition but asp.net web application template is missing. I have asp.net core 2 installed on my machine.
here are the installed components
It was there but dont know how they got removed.
Please suggest me how can i see web application template and asp.net mvc templates?
Thanks
After you select a project type of Web Project then click OK you will be taken to a dialogue which will allow you to select the web project type:
For .Net Framework:
For .Net Core:
I encountered the same issue in Visual Studio 2019 and upgrading / repair did not work. However, there is dotnet new that is very easy to use and requires less time than trying to fix VS templates. Example:
default project creation (preview)
dotnet new mvc --dry-run
help related to various options such as authentication (None, Individual etc.)
dotnet new mvc --help

Difference between asp.net core projects in Visual Studio

In Visual Studio we can create three types of project templates:
ASP.NET Web Application
ASP.NET Core Web Application (.NET Core)
ASP.NET Core Web Application (.NET Framework)
Based on the question and answer found here:
Visual Studio 2015 Web Application .NET Core vs .NET Framework
I understand that when using first option I always will be hosting my app on Windows. The same happens when I pick option 3. For the second option I can host my app on Windows, Mac or Linux. I still don't understand why option 2 and three are both called Core Web Application if for the third option I will be using .net framework. What is the difference between option 1 and 3? Both will use .net framework and both can be hosted only on Windows so why the third option is called Core?
It's all about the runtime
The first option is ASP.NET (Full, legacy, whatever you want to call it) running on the .net 4.x runtime.
The second option is ASP.NET Core (a reduced set of common functions that work on all platforms) running on .NET Core Runtime.
The third option is ASP.NET Core running on .NET 4.x runtime. This option is there so that you can write .NET Core applications today, even though you may need functionality that is only available on .net 4.x (ie, you have legacy libraries that have not been ported to .net core, or that cannot run on .net core)
In the third case, you may at a later time convert to a full core application when the dependencies become core, or when the .net core framework matures to include the functionality you need.

How do I create a ASP.NET project based on the .NET Core, not on the full Framework?

I was reading all about .NET Core after hearing about it for months. I got Visual Studio 2015, so I thought I would try it out. I go into File - New Project, choose ASP.NET Web Application, and see I can only choose a version of the full .NET Framework (such as 4.6). How do I create a ASP.NET project based on the .NET Core, not on the full Framework?
I thought there would be some tutorials on this, but I can't find any. All I see is based on the full Framework.
ASP.NET 5.0 Core beta5 shipped with VS 2015 RTM. Beta6 just shipped and be used to upgrade VS 2015. (Read the Install Instructions!)
When you create a project from one of the ASP.NET 5 Preview Templates (Empty, Web API, or Web Application) it is set up to compile both Core and 4.5.1 Framework versions every time you build.
To change this to build only Core, do the following:
Project / Properties / Application: change Platform from .NET
Framework to .NET Core
Open project.json and find the "frameworks" section. Delete
"dnx451": {}, and save.
Build
You are now running on the CoreCLR.
You can find the .net core and nightly builds at:
https://github.com/dotnet/core
https://github.com/dotnet/coreclr
Thanks for the comments and whatnot guys... Can't delete my answer since it's accepted, so here's some screenshots showing how to get to the new template. Note that the new framework version is not listed where you (at least I) would expect. You can choose the asp.net 5 tempate after you actually choose to create a web application in one of the (non 5.0) framework templates.

Is it possible to force Visual Studio 2010 to use Visual Basic 10?

To reproduce the error I'm getting:
Create a new Visual Studio 2010 ASP.NET web site in Visual Basic, targeting .NET 2.0
Type "Public Property Test As String"
Observe "Visual Basic 9.0 does not support auto-implemented properties." error
Visual Studio 2010 is happy to use VB 10 against .NET 2.0-targeted Windows Forms applications, this only appears to be an issue with ASP.NET.
Is there a way to force Visual Studio 2010 to use VB 10 when targeting .NET 2.0?
No. A Web Site project is one that compiles within ASP.NET at runtime - as such, you've chosen to ask ASP.NET to run it as a .NET 2.0 project, so it will use the .NET 2.0 vbc Visual Basic compiler that's part of .NET. That compiler has no knowledge of VB 10, and so you're rightly being warned that it will not work.
The reason it can work for other project types is because the compilation is happening using a later compiler (usually the one built into Visual Studio).

Resources