could not run the ASP.NET Core MVC application - asp.net-core

when i run the ASP.NET Core MVC application from Visual studio 2022, it getting conflicts with source and module file(please refer the attached image.)
We are migrating MVC5 project to ASP.NET Core MVC and i dont know these initial configuration settings
Pls assist me on this
Thanks
I need to run the application in the browser.

Please delete the bin folder and rebuild your project.

Related

Azure Pipeline Ambiguous Selection

I've a private repository in my Azure DevOps.
It was a WebAPI built on .NET 6 preview. But when I try to create a Pipeline for this, These are the options DevOps is offering me.
My application is an ASP.NET Core WebAPI. But here it was mentioned:
"Build and Test ASP.NET Projects targeting .NET Framework".
I thought Classic ASP.NET is on .NET Framework and ASP.NET Core is for .NET Core.
Which Pipeline I can use to build my app and why ASP.NET Core has a (.NET Framework) in brackets?
If you click show more you will find:
Until today these templates do not work for modern net 5.0+ apps.
This is what should be done
https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/dotnet-core?view=azure-devops&tabs=dotnetfive

asp.net core 3.1 accountcontroller missing when creating new project

when I create a new project asp.net core 3.1 with Visual Studio with Individual User Accounts selected.
I can't find the Account Controller folder. There is an Areas folder but almost empty
Identity is working but where are the codes?
You are looking for scaffold identity
To add Identity scaffolding to a project, read:
https://learn.microsoft.com/en-us/aspnet/core/security/authentication/scaffold-identity?view=aspnetcore-3.1&tabs=netcore-cli#scaffold-identity-into-an-empty-project
However for .Net 3.1, you’ll need to add these via NuGet and select the 3.x.x versions, else dotnet will try to install the latest .Net 6 which is incompatible with .Net3.1…
Also, having done all that, you get the Area/Identity/Pages/Account folder with more .cshtml files. But still don't see the AccountController in the Controllers folder.
It turns out the code for each operation is in the .cs files for each of the views in the Account folder, per Razor page paradigm.

How to deploy ASP.NET Core Project in Windows?

I have compiled my existing ASP.NET MVC 5 project to ASP.NET Core. Compilation completed without any issue. How should I deploy this project in windows ???
Check out this link they provide step by step on how to deploy .Net Core project
https://stackify.com/how-to-deploy-asp-net-core-to-iis/
You haven't mentioned anything about web server. I am assuming you are trying to deploy in IIS.
Anyways, here is a proper step by step explanation with sufficient visualization.
https://jakeydocs.readthedocs.io/en/latest/publishing/iis.html
Hope this helps ...

Unable to build .net core AspnetBoilerplate Starter Template

I have spent quite a time trying to load the Initial Project generated by the AspnetBoilerplate startup template all to no avail. This is a .net core template (JQuery with MVC) with Target Cross platform.
See error sample below
I installed the dotnet core 2 for VS 2017. The project won't just build. I can not see anything related to NetStandard, yet that seems to be what the project supports
Any help i can get will be appreciated

ASP.Net Core Unable to restore .Net Framework 4.6.1 reference

I am new to ASP.Net core project. One of my friend has shared me his sample application with me to make improvements.
Once I downloaded the project I am not able to restore the .Net framework 4.6.1 reference in the ASP.Net Core Project.
Any suggestion how to restore it ?
I had this problem since not all my references was not successfully restored.
In order to restore it, I found that nuget was not able to restore all the files.
Finally after search, I found nuget restore is not reliable in Core. Hence "dotnet restore" in Package manager console I was able to solve the problem.