How to create a ASP.NET Core Project in VB.NET language using dotnet cli command? - vb.net

I have migrated the project from Dot.Net-Framework 4.7.2 to Asp.Net-Core 3.1 with VB.NET language. I have checked in Microsoft link below, there is no CLI Command for VB.NET in Asp.Net Core templates. They mentioned only C# language for ASP.NET Core
https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-new
Kindly let me know if there is any way to create a ASP.NET Core Project in "VB.NET"

As far as I know, asp.net core couldn't create the MVC vb.net project. You could use dotnet new --list to see the result:
Besides, according to this github issue, ASP.NET Core Doesn't provide a razor syntax that supports VB.NET.
The workaround is using the custom library like Vazor and ZML to design MVC views and Razor Pages.
More details, you could refer to this github issue.

This question is a bit older, to be sure, but the good news is that today there IS a way to build ASP.NET Core applications in VB.NET.
For the past few days I've been working with Vazor, found here and here. I've found it to be remarkable. It's a very clever solution to a long-standing problem.
The author also has plans to enable Blazor apps in VB.NET projects.

Related

ASP.NET Core Web Application with .NET Framework, I want to switch the target to .NET Core

I'm trying to change ASP.NET Core web application with .NET Framework as a target framework to use .NET Core 3.1.X
I try changing the target framework in the project file (.csproj), I encounter dependency issues, dependency conflict....
Is there any straightforward method to solve this issue?
Before you start your migration, you should know there’s several difference between .net framework and .net core, so please follow the official document to do some Pre-Migration steps.
Then you can follow this official document to migrate your application from framework to .net core 3.1.
Since your ideal .net core version is 3.1, still I suggest you can try to use .net 6. Also, you can use this upgrade tool to reach your goal. In fact, using this upgrade assistant is a batter choice than you doing it by yourself. Even if you are insisting using .net core 3.1, you can use this assistant to upgrade your version to 6 first then change it to 3.1.
Note:
Before you start your migration, please make a backup of your original project. That's because some packages in .net framework may be no longer available in .net core. So if there're some errors occur, you can go back to the original one.

Is the ASP.NET Core NuGET package Microsoft.AspNetCore.Hosting version 2.2.7 part of ASP.NET Core 5.0?

I am getting a little confused by all the naming and versioning of .NET. I think I understand the whole .NET Framework / Standard / Core thing, but I am now moving into ASP.NET Core territory (I want to give my console application a web interface with Kestrel).
When using the NuGET package manager, I can see the Microsoft.AspNetCore.Hosting package, needed to run the webserver. But the highest available version is 2.2.7.
Question now, is that 2.2.7 part of ASP.NET Core 5.0, or do I have some configuration incorrect that I do not get the latest version for my application?
And if it is indeed part of ASP.NET Core 5.0, where can I find that reference? This table helped me a lot with understanding the core libraries.
I assume you wanna this document which tells about your package :
https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.hosting?view=aspnetcore-5.0
And I think you can focus on those classes or interfaces you'll use and take a look if those are supporting .net 5 by click and refer to the details page. You'll see Applies to at the bottom of each page such as this one.
If I misunderstood in some place which made my post isn't suitable to display here, pls point it out and I'll delete it.

Where are the ASP.NET core symbols hosted?

Have the .NET / ASP.NET core symbols been hosted anywhere yet? They would be helpful in debugging and learning.
To debug Asp.Net Core, I followed the article sbouaked is mentionning, got the source from Git, and it's working perfectly. Didn't find a way to get only the symbols.

How to create report(e.g. PDF,Excel,Word) in ASP.NET Core 1.0?

I want to create report(e.g. PDF,Excel,Word) in ASP.NET Core 1.0,
but NPOI and OpenXML is not support ASP.NET Core.
There is an issue for .NET Core support for OpenXML (https://github.com/OfficeDev/Open-XML-SDK/issues/65). Some work has to be done before it is ready. Someone who had your demand as well ported it to .NET Core and published his project on GitHub (https://github.com/xrkolovos/Open-XML-SDK-for-NET-Platform-Standard). I have not tried it myself, but it may be worthwile to try.
UPDATE:
Current releases of OpenXML support .NET Core. Therefore the second GitHub project is obsolete now.
For PDF PdfReport.Core could be a solution. I can confirm that it works under netcoreapp1.1. It also should be able to export to Excel, XML and CSV (NOT tested by me).
Please check my answer here:
https://stackoverflow.com/a/42023039/1719087
There is a CI build that works with .Net Core 1.1 at
https://github.com/OfficeDev/Open-XML-SDK
the specific nuget package is at this feed:
https://dotnet.myget.org/F/open-xml-sdk/api/v3/index.json
If your application is fine to run on windows only, then using ASP.NET Core with the full .net framework let you use NPOI and OpenXML. With this approach you can start now with the new Microsoft web framework in the hope that NPOI or OpenXML will support .NET Core in the near future.

Is there a version of ELMAH for .NET 4?

I'd like to use ELMAH in an ASP.NET MVC 2 application running on .NET 4, but according to the project hosting site on Google code, it only supports .NET 1.1 and 2.0.
Is there a .NET 4 version of ELMAH already, or do I have to download the source and update whatever breaks myself?
Elmah works perfectly fine for ASP.NET 4.0.
However, there are a few tricks in getting it setup to work perfectly on an MVC website.
I have recently starting blogging about this topic so be sure to check out my blog series on logging in MVC. The first article covers getting Elmah set up and running for MVC using all the tricks that you can find about it on StackOverflow.
There is a link to downloadable code at the end of the article. Hope that helps.
http://dotnetdarren.wordpress.com/
I am using .NET 4.0 and I dont about a new version.... but I am using the elmah 1.1 and it works....:)..You may have to change source though to add custom fields or log additional values..which is bit of a pain...but get started here
Well it's open source nothing should prevent you from recompiling it using the .NET 4.0 framework.
This link has some information about running pre .NET4 web apps and .NET4 web apps in a server.
EDIT:
Actually you won't need to recompile ELMAH. According to this and this article the In-Process side by side execution should do the trick.
I had the same question so I downloaded the 1.1 src, opened it up in visual studio 2010, changed the project to target 4.0 and rebuilt it. I then dropped the dll in my ASP.NET MVC 2.0 app and it has worked fine.