ASP.NET Boilerplate SqlException at first run - aspnetboilerplate

After download/restore zip template for ABP v2.3.0 i had the following exception raised after the first application run
stack track herehttps://pastebin.com/g2XYAwp1
Before first execution I did the following steps:
Opened solution on Visual Studio 2015
Changed the database connection string
Restored nuget packages for the solution
Select the 'Web' project as startup project
Run the EntityFramework's 'Update-Database' command
(database created successfully)
Run the application
Unfortunately I don't have the ability to work with VS2017 (and then to use ABP 3.0 template generated online)
It's possibile to download ABP v2.3.0 template as generated here ?

After download/restore zip template for ABP v2.3.0 i had the following exception raised after the first application run
The exception is from a missing foreign key reference in AbpSettings.
Remove invalid entries in that table and your application should run fine.
It's possibile to download ABP v2.3.0 template as generated here ?
You can only choose the project version for premium startup templates.
You can build your own from module-zero-core-template/releases/tag/v2.5.1.

Related

Visual Studio for Mac trying to find .NET Full Framework in build properties

Visual Studio for Mac (Version 8.8.7 (build 18)) is unable to upgrade netcoreapp3.1 asp.net mvc project to .net5.0 target framework. It throws below error:
/usr/local/share/dotnet/sdk/3.1.405/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(5,5):
Error NETSDK1005: Assets file 'App.Mvc/project.assets.json' doesn't
have a target for '.NETFramework,Version=v5.0'. Ensure that restore
has run and that you have included 'net50' in the TargetFrameworks for
your project. (NETSDK1005) (App.Mvc)
It will create a net5.0 mvc project from scratch alright but upgrade fails with the error. I've also tried to move all the files over into a new net5.0 from my netcoreapp3.1 project and somehow it converts the new project to .net full framework again. There's no clear indication as to what's causing this issue.
Ok I figured it out. I had a global.json pointing to version 3.1.*. Had 5.0.102 and it worked.

.NET Core Web API 5.0 build errors

Severity Code Description Project File Line Suppression State
Error NETSDK1005 Assets file 'D:\Working On\Gra\Gra\obj\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v5.0'. Ensure that restore has run and that you have included 'netcoreapp5.0' in the TargetFrameworks for your project. Gra C:\Program Files\dotnet\sdk\5.0.100-preview.1.20155.7\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets 234
I've just create ASP.NET Core Web Application, and then when I run, I it's show message errors!
In my publish profile the Target Framework was set to NET5.0.
Changed it to NET6.0 and the problem was gone.
Update to Nuget 5.8
Clear the local cache
error NETSDK1005: Assets file 'project.assets.json' ....
Try updating NuGet.exe to the 5.8.0 version or above:
nuget update -self
if you prefer to update the nuget version in Visual Studio, just follow this steps. Then, clear NuGet cache:
dotnet nuget locals all --clear
Download Nuget
found here
Delete the 'obj' folder and re-build the project.
You're using an extremely old .NET 5 preview. ASP.NET Core Preview 1 specifically had no new features, it was essentially a version number change. There's no netcoreapp5.0 framework target any more, it's net5.0.
The latest version is 5.0 RC1 which is feature-complete and supported in production. Install it and create a new project with, eg dotnet new webapp or dotnet new webapi etc.
This version is supported by the latest Visual Studio 2019 Preview version.

Asp net core 3.1 webapp doesn't refresh on modify razor template

i'm using visual studio code on mac osx for running a simply web app in asp net core 3.1.
I run application with command dotnet run in visual studio code terminal.
Now, if i modify a .cshtml template and refresh my browser, modify don't show.
Why? How can i resolve?
Thanks
To enable runtime compilation in vs code, you need to follow below steps:
1.Add a reference to the Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation package,run the command in the terminal
dotnet add package Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation -v 3.1.0
2.Update the project's Startup.ConfigureServices method to include a call to AddRazorRuntimeCompilation.
services.AddControllersWithViews().AddRazorRuntimeCompilation();//for MVC
//services.AddRazorPages().AddRazorRuntimeCompilation();//for Razor Pages
Refer to https://learn.microsoft.com/en-us/aspnet/core/mvc/views/view-compilation?view=aspnetcore-3.1#runtime-compilation

How to Build Entity Framework Project using Npanday

I am using Npnday 1.5. I have tried to build my project using Npanday. But DLL generated using Npanday has some issue. Because When I replace that DLL with other DLL which is generated by Visual Studio 2010, then my web application runs perfectly.
Have any one buid Entity Framework Project using Napanday??
Please tell me What are the steps required to build an entity framework project using Npanday.
Mainly what changes are required to do in POM.xml file???

Create a project template that retrieve references from a repository

I'm trying to create a project template that loads a couple of projects and adds a reference to a dll located on a remote server. That dll is a common framework that I want to reference and always have the latest version.
I'm building my template using GAX and NuGet. I could also use T4.
Thanks a bunch!
You can do with but will need to write your own Visual Studio Template wizard. When the template wizard is running you can get a IVsPackageInstaller (Found with MEF) and call install package. You can get a list of packages from a folder, config, or just hard code them. This is how MVC 3 tooling update does its pre-installed packages.

Resources