Giter VIP home page Giter VIP logo

Comments (8)

Ksdmg avatar Ksdmg commented on August 24, 2024 1

I'm facing the same issue.
Target framework: .NET 8.0
Operating system: Windows
IDE: Visual Studio 17.10.1

from scaffolding.

elbec avatar elbec commented on August 24, 2024

@Ksdmg: Do you found a solution? I have the same issuce in .NET 8.0

from scaffolding.

constructor avatar constructor commented on August 24, 2024

I ran into this issue today.
What is the precise cause?
Anyone got a solution/work around?
@Ksdmg @elbec

Using database provider 'Npgsql.EntityFrameworkCore.PostgreSQL'!
Value cannot be null. (Parameter 'path')
at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.b__6_0()
at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.Execute(String[] args)
at Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execute(String[] args)

from scaffolding.

elbec avatar elbec commented on August 24, 2024

Hello, yes i found yesterday a workaround for me. It did not work for me directly in Visual Stuido. But when i run in project folder with cmd dotnet aspnet-codegenerator identity. Then all files were created without an error!

from scaffolding.

constructor avatar constructor commented on August 24, 2024

I have a IDesignTimeDbContextFactory, that creates a DbContext. I have checked this by launching a debugger during scaffolding. When the IDesignTimeDbContextFactory returns the DbContext, I still get:

Using database provider 'Npgsql.EntityFrameworkCore.PostgreSQL'!
Value cannot be null. (Parameter 'path')
at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.b__6_0()
at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.Execute(String[] args)
at Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execute(String[] args)

Is there any more information on this error? What is the Parameter 'path'?

from scaffolding.

constructor avatar constructor commented on August 24, 2024

In the very latest VS, with all updates, in my project I have tried:

  1. EF Migrations, and they work perfectly.
  2. RtClick > Add >New Scaffold Item > Razor Pages > Razor Pages using Entity Framwork (CRUD)
    This works perfectly.
  3. RtClick > Add >New Scaffold Item > Razor Component > Razor Components using Entity Framwork (CRUD)
    I get the output:

Building project ...
Finding the generator 'blazor'...
Running the generator 'blazor'...
Attempting to figure out the EntityFramework metadata for the model and DbContext: 'RadProjectItem'

Using database provider 'Npgsql.EntityFrameworkCore.PostgreSQL'!

Value cannot be null. (Parameter 'path')
at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.b__6_0()
at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.Execute(String[] args)
at Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execute(String[] args)

There is no information anywhere to be found.

from scaffolding.

constructor avatar constructor commented on August 24, 2024

The App.razor file must exist in order for scaffolding to work. I am not using the App.razor file, therefore I removed it. Adding it back into the project makes the scaffolding operation complete without error.

from scaffolding.

Dennis951 avatar Dennis951 commented on August 24, 2024

For me it worked to add back the NavMenu. I looked up what got changed in a new project. Those were these files:

Screenshot 2024-06-22 030923

from scaffolding.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.