Open guardrex opened 7 months ago
I'm facing the same issue. Target framework: .NET 8.0 Operating system: Windows IDE: Visual Studio 17.10.1
@Ksdmg: Do you found a solution? I have the same issuce in .NET 8.0
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)
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!
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'?
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.
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.
For me it worked to add back the NavMenu. I looked up what got changed in a new project. Those were these files:
File a bug
Include your code
Steps to reproduce are basic use of the scaffolder without any custom code ...
Exception
Include stack traces
Stack Trace:
Result
It seems like the scaffolder is working. The
EnableAuthenticator
component is present. However, I only ask for theEnableAuthenticator
component, but the scaffolder is giving the app all of them ...Anyway ... kill the app and restart it ... here is the next exception during migrations on first run ...
I then killed the app and restarted it again ... everything seems to work. I'm able to register a test user, sign them in, and access the authenticator page ...
Include provider and version information
Microsoft.VisualStudio.Web.CodeGeneration.Design/Microsoft.DotNet.MSIdentity version: 8.0.2 Target framework: .NET 8.0 Operating system: Windows IDE: Visual Studio 17.10.0 Preview 1.0