Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to connect to SQL server #215

Open
faahiero opened this issue Jun 17, 2024 · 13 comments
Open

Error when trying to connect to SQL server #215

faahiero opened this issue Jun 17, 2024 · 13 comments

Comments

@faahiero
Copy link

After configure the user, pass, select database and check connection, when try to access database structure in Connections Panel, it shows me the following error:

image
image

One or more errors occurred. (Scaffolding process failed with exit code: 1. dotnet-ef tool output:
Build started...
Build succeeded.
To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263.
System.PlatformNotSupportedException: Strings.PlatformNotSupported_DataSqlClient
   at Microsoft.Data.SqlClient.SqlConnection..ctor(String connectionString) in /_/artifacts/Project/obj/Release.AnyCPU/Microsoft.Data.SqlClient/netcore/netcoreapp3.1/Microsoft.Data.SqlClient.notsupported.cs:line 386
   at Microsoft.EntityFrameworkCore.SqlServer.Scaffolding.Internal.SqlServerDatabaseModelFactory.Create(String connectionString, DatabaseModelFactoryOptions options)
   at Microsoft.EntityFrameworkCore.Scaffolding.Internal.ReverseEngineerScaffolder.ScaffoldModel(String connectionString, DatabaseModelFactoryOptions databaseOptions, ModelReverseEngineerOptions modelOptions, ModelCodeGenerationOptions codeOptions)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContextImpl(String provider, String connectionString, String outputDir, String outputDbContextDir, String dbContextClassName, IEnumerable`1 schemaFilters, IEnumerable`1 tableFilters, String modelNamespace, String contextNamespace, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames, Boolean suppressOnConfiguring, Boolean noPluarlize)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.<Execute>b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContext.<>c__DisplayClass0_0.<.ctor>b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Strings.PlatformNotSupported_DataSqlClient)

.NET SDK and Runtime installed

image

@tareqimbasher
Copy link
Owner

What operating system are you running? Also is it x64 or ARM?

@faahiero
Copy link
Author

EndeavourOS (Arch Linux based) x64

@faahiero
Copy link
Author

faahiero commented Jul 2, 2024

EDIT: After update to 0.7.2, the error changed to:

One or more errors occurred. (No scaffolded files found in output dir.)
(Copied from clipboard when clicking the red error messagem in GUI)

stdout: [13:50:37 ERR] (NetPad.Middlewares.ExceptionHandlerMiddleware) An error occurred in request pipeline
System.InvalidOperationException: No scaffolded files found in output dir.
   at NetPad.Apps.Data.EntityFrameworkCore.Scaffolding.EntityFrameworkDatabaseScaffolder.GetScaffoldedModelAsync() in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/Data/EntityFrameworkCore/Scaffolding/EntityFrameworkDatabaseScaffolder.cs:line 219
   at NetPad.Apps.Data.EntityFrameworkCore.Scaffolding.EntityFrameworkDatabaseScaffolder.ScaffoldAsync() in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/Data/EntityFrameworkCore/Scaffolding/EntityFrameworkDatabaseScaffolder.cs:line 59
   at NetPad.Apps.Data.EntityFrameworkCore.Scaffolding.EntityFrameworkDatabaseScaffolder.ScaffoldAsync() in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/Data/EntityFrameworkCore/Scaffolding/EntityFrameworkDatabaseScaffolder.cs:line 67
   at NetPad.Apps.Data.EntityFrameworkCore.EntityFrameworkResourcesGenerator.GenerateSourceCodeAsync(DataConnection dataConnection, DotNetFrameworkVersion targetFrameworkVersion) in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/Data/EntityFrameworkCore/EntityFrameworkResourcesGenerator.cs:line 39
   at NetPad.Apps.Data.FileSystemDataConnectionResourcesCache.<>c__DisplayClass13_0.<<GetSourceGeneratedCodeAsync>b__0>d.MoveNext() in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/Data/FileSystemDataConnectionResourcesCache.cs:line 103
--- End of stack trace from previous location ---
   at NetPad.Apps.Data.FileSystemDataConnectionResourcesCache.GetSourceGeneratedCodeAsync(DataConnection dataConnection, DotNetFrameworkVersion targetFrameworkVersion) in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/Data/FileSystemDataConnectionResourcesCache.cs:line 129
   at NetPad.Apps.Data.EntityFrameworkCore.EntityFrameworkResourcesGenerator.GenerateAssemblyAsync(DataConnection dataConnection, DotNetFrameworkVersion targetFrameworkVersion) in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/Data/EntityFrameworkCore/EntityFrameworkResourcesGenerator.cs:line 57
   at NetPad.Apps.Data.FileSystemDataConnectionResourcesCache.<>c__DisplayClass14_0.<<GetAssemblyAsync>b__0>d.MoveNext() in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/Data/FileSystemDataConnectionResourcesCache.cs:line 159
--- End of stack trace from previous location ---
   at NetPad.Apps.Data.FileSystemDataConnectionResourcesCache.GetAssemblyAsync(DataConnection dataConnection, DotNetFrameworkVersion targetFrameworkVersion) in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/Data/FileSystemDataConnectionResourcesCache.cs:line 185
   at NetPad.Apps.Data.EntityFrameworkCore.EntityFrameworkDatabaseConnectionMetadataProvider.CreateDbContextAsync(EntityFrameworkDatabaseConnection dbConnection) in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/Data/EntityFrameworkCore/EntityFrameworkDatabaseConnectionMetadataProvider.cs:line 35
   at NetPad.Apps.Data.EntityFrameworkCore.EntityFrameworkDatabaseConnectionMetadataProvider.GetDatabaseStructureAsync(DatabaseConnection databaseConnection) in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/Data/EntityFrameworkCore/EntityFrameworkDatabaseConnectionMetadataProvider.cs:line 23
   at NetPad.Apps.CQs.GetDatabaseConnectionStructureQuery.Handler.Handle(GetDatabaseConnectionStructureQuery request, CancellationToken cancellationToken) in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/CQs/GetDatabaseConnectionStructureQuery.cs:line 17
   at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at NetPad.Services.MediatorRequestPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next) in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.App/Services/MediatorRequestPipeline.cs:line 19
   at NetPad.Plugins.OmniSharp.OmniSharpMediatorPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next) in /home/tips/Source/TIPS/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/OmniSharpMediatorPipeline.cs:line 48
   at NetPad.Controllers.DataConnectionsController.GetDatabaseStructure(Guid id) in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.App/Controllers/DataConnectionsController.cs:line 103
   at lambda_method170(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at NetPad.Middlewares.ExceptionHandlerMiddleware.InvokeAsync(HttpContext httpContext) in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.App/Middlewares/ExceptionHandlerMiddleware.cs:line 32

(Copied from terminal execution of AppImage)

Same environment as before

@tareqimbasher
Copy link
Owner

tareqimbasher commented Jul 2, 2024

@faahiero thanks for the update. I wasn't able to replicate this on my system (Arch Linux) or on other Windows and macOS machines, but I was able to replicate on one specific macOS VM. But even there, I can make the error show up only if I try to expand the connection in the tree to get the tables, but if I run a script using that connection it works just fine. Does running a script against the connection work for you?

@faahiero
Copy link
Author

faahiero commented Jul 3, 2024

@tareqimbasher Yes, I tested it now that you mentioned, and the connection works fine when I run scripts against the database, whether pure SQL Queries or LINQ/Lambda Expressions. But the table structure tree continues to show an error.
Thank you for the tip, now i can query over database! :)

@tareqimbasher
Copy link
Owner

Thanks for confirming. I'll check out the issue with the tree view. Can you please post dotnet --info?

@RichardNobel
Copy link

RichardNobel commented Jul 3, 2024

Similar issue on my PC, 😢 with NetPad v0.7.2 running on Windows 11 Pro (23H2).

In the (New/Edit) Data Connection dialog window, I can connect to (localdb)\MSSQLLocalDB successfully and the local databases are shown in the dropdown list.

But expanding the structure tree doesn't work, nor does running a SQL statement in a Script tab. Both actions result in the same error: No scaffolded files found in output dir.

Below I have included the output of dotnet --info. Although I'm pretty sure that NetPad is running on .NET 6 ? I believe it showed me a window on first start, which prompted me to install dotnet-ef tools. Now I can't find that window anymore (through the Settings dialog).

Exception stack trace

System.InvalidOperationException: No scaffolded files found in output dir.
   at NetPad.Apps.Data.EntityFrameworkCore.Scaffolding.EntityFrameworkDatabaseScaffolder.GetScaffoldedModelAsync() in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/Data/EntityFrameworkCore/Scaffolding/EntityFrameworkDatabaseScaffolder.cs:line 219
   at NetPad.Apps.Data.EntityFrameworkCore.Scaffolding.EntityFrameworkDatabaseScaffolder.ScaffoldAsync() in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/Data/EntityFrameworkCore/Scaffolding/EntityFrameworkDatabaseScaffolder.cs:line 59
   at NetPad.Apps.Data.EntityFrameworkCore.Scaffolding.EntityFrameworkDatabaseScaffolder.ScaffoldAsync() in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/Data/EntityFrameworkCore/Scaffolding/EntityFrameworkDatabaseScaffolder.cs:line 67
   at NetPad.Apps.Data.EntityFrameworkCore.EntityFrameworkResourcesGenerator.GenerateSourceCodeAsync(DataConnection dataConnection, DotNetFrameworkVersion targetFrameworkVersion) in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/Data/EntityFrameworkCore/EntityFrameworkResourcesGenerator.cs:line 39
   at NetPad.Apps.Data.FileSystemDataConnectionResourcesCache.<>c__DisplayClass13_0.<<GetSourceGeneratedCodeAsync>b__0>d.MoveNext() in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/Data/FileSystemDataConnectionResourcesCache.cs:line 103
--- End of stack trace from previous location ---
   at NetPad.Apps.Data.FileSystemDataConnectionResourcesCache.GetSourceGeneratedCodeAsync(DataConnection dataConnection, DotNetFrameworkVersion targetFrameworkVersion) in /home/tips/Source/TIPS/NetPad/src/Apps/NetPad.Apps.Common/Data/FileSystemDataConnectionResourcesCache.cs:line 129
   at NetPad.ExecutionModel.External.ExternalScriptRunner.GetDataConnectionResourcesAsync(DataConnection dataConnection) in /home/tips/Source/TIPS/NetPad/src/Core/NetPad.Runtime/ExecutionModel/External/ExternalScriptRunner.Setup.cs:line 131
   at NetPad.ExecutionModel.External.ExternalScriptRunner.GetRunDependencies(RunOptions runOptions) in /home/tips/Source/TIPS/NetPad/src/Core/NetPad.Runtime/ExecutionModel/External/ExternalScriptRunner.Setup.cs:line 33
   at NetPad.ExecutionModel.External.ExternalScriptRunner.RunScriptAsync(RunOptions runOptions) in /home/tips/Source/TIPS/NetPad/src/Core/NetPad.Runtime/ExecutionModel/External/ExternalScriptRunner.cs:line 105

( Copied from NetPad output pane, after trying to run a simple SELECT SQL query. )

Output of dotnet --info

Click to view output

.NET SDK:
 Version:           8.0.204
 Commit:            c338c7548c
 Workload version:  8.0.200-manifests.7d36c14f

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22631
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\8.0.204\

.NET workloads installed:
 [maui-windows]
   Installation Source: VS 17.9.34728.123
   Manifest Version:    8.0.7/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maui\8.0.7\WorkloadManifest.json
   Install Type:        FileBased

 [maccatalyst]
   Installation Source: VS 17.9.34728.123
   Manifest Version:    17.2.8004/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maccatalyst\17.2.8004\WorkloadManifest.json
   Install Type:        FileBased

 [ios]
   Installation Source: VS 17.9.34728.123
   Manifest Version:    17.2.8004/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.ios\17.2.8004\WorkloadManifest.json
   Install Type:        FileBased

 [android]
   Installation Source: VS 17.9.34728.123
   Manifest Version:    34.0.52/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.android\34.0.52\WorkloadManifest.json
   Install Type:        FileBased

Host:
  Version:      8.0.4
  Architecture: x64
  Commit:       2d7eea2529

.NET SDKs installed:
  8.0.204 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 8.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found

@tareqimbasher
Copy link
Owner

tareqimbasher commented Jul 3, 2024

@RichardNobel thanks for the report. A .NET 6 Runtime or SDK is needed for the treeview to work correctly but I'm not sure yet if it being missing on your machine is what's causing this particular issue. Do you mind installing .NET 6 Runtime or SDK, restarting NetPad and see if you still get the same error?

And you can get to that window you were looking for by clicking the computer icon on the bottom right corner of the main window.

@stephenkirk
Copy link

stephenkirk commented Jul 3, 2024

I'm experiencing a similar issue when trying to run a query against a SQL database. Unlike the original post, the tree view fully loads in my case, after duplicating the connection. Here's the error I'm encountering:

System.InvalidOperationException: No scaffolded files found in output dir.
   at NetPad.Apps.Data.EntityFrameworkCore.Scaffolding.EntityFrameworkDatabaseScaffolder.GetScaffoldedModelAsync() in /Users/user248920/Downloads/source/NetPad/src/Apps/NetPad.Apps.Common/Data/EntityFrameworkCore/Scaffolding/EntityFrameworkDatabaseScaffolder.cs:line 219
   at NetPad.Apps.Data.EntityFrameworkCore.Scaffolding.EntityFrameworkDatabaseScaffolder.ScaffoldAsync() in /Users/user248920/Downloads/source/NetPad/src/Apps/NetPad.Apps.Common/Data/EntityFrameworkCore/Scaffolding/EntityFrameworkDatabaseScaffolder.cs:line 59
   at NetPad.Apps.Data.EntityFrameworkCore.Scaffolding.EntityFrameworkDatabaseScaffolder.ScaffoldAsync() in /Users/user248920/Downloads/source/NetPad/src/Apps/NetPad.Apps.Common/Data/EntityFrameworkCore/Scaffolding/EntityFrameworkDatabaseScaffolder.cs:line 67
   at NetPad.Apps.Data.EntityFrameworkCore.EntityFrameworkResourcesGenerator.GenerateSourceCodeAsync(DataConnection dataConnection, DotNetFrameworkVersion targetFrameworkVersion) in /Users/user248920/Downloads/source/NetPad/src/Apps/NetPad.Apps.Common/Data/EntityFrameworkCore/EntityFrameworkResourcesGenerator.cs:line 39
   at NetPad.Apps.Data.FileSystemDataConnectionResourcesCache.<>c__DisplayClass13_0.<<GetSourceGeneratedCodeAsync>b__0>d.MoveNext() in /Users/user248920/Downloads/source/NetPad/src/Apps/NetPad.Apps.Common/Data/FileSystemDataConnectionResourcesCache.cs:line 103
--- End of stack trace from previous location ---
   at NetPad.Apps.Data.FileSystemDataConnectionResourcesCache.GetSourceGeneratedCodeAsync(DataConnection dataConnection, DotNetFrameworkVersion targetFrameworkVersion) in /Users/user248920/Downloads/source/NetPad/src/Apps/NetPad.Apps.Common/Data/FileSystemDataConnectionResourcesCache.cs:line 129
   at NetPad.ExecutionModel.External.ExternalScriptRunner.GetDataConnectionResourcesAsync(DataConnection dataConnection) in /Users/user248920/Downloads/source/NetPad/src/Core/NetPad.Runtime/ExecutionModel/External/ExternalScriptRunner.Setup.cs:line 131
   at NetPad.ExecutionModel.External.ExternalScriptRunner.GetRunDependencies(RunOptions runOptions) in /Users/user248920/Downloads/source/NetPad/src/Core/NetPad.Runtime/ExecutionModel/External/ExternalScriptRunner.Setup.cs:line 33
   at NetPad.ExecutionModel.External.ExternalScriptRunner.RunScriptAsync(RunOptions runOptions) in /Users/user248920/Downloads/source/NetPad/src/Core/NetPad.Runtime/ExecutionModel/External/ExternalScriptRunner.cs:line 105

Environment details:

  • OS: macOS Sonoma 14.2.1
  • Installed .NET runtimes:
> dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Note: Normal queries without a connection work fine. For example:

var foo = 42;
foo.Dump();

This outputs 42 as expected.

@RichardNobel
Copy link

RichardNobel commented Jul 3, 2024

Do you mind installing .NET 6 Runtime or SDK, restarting NetPad and see if you still get the same error?

I have installed the .NET 6 SDK.

Details

.NET SDKs installed:
  6.0.423 [C:\Program Files\dotnet\sdk]
  8.0.204 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.31 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.31 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 6.0.31 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

And, after restarting NetPad, now I can select either .NET 8 or .NET 6 on a Script tab.
But unfortunately the same error occurs. ☹️

image

And you can get to that window you were looking for by clicking the computer icon on the bottom right corner of the main window.

Thanks. Seeing this window again 🤔 made me think: Could the version (v8.0.6) of Entity Framework Core .NET Tool be causing the Scaffolding issue?

image

@RichardNobel
Copy link

Could the version (v8.0.6) of Entity Framework Core .NET Tool be causing the Scaffolding issue?

To answer my own question: downgrading dotnet-ef tools (uninstalling v8, then installing v6), doesn't appear to fix the Scaffolding. 🫤

image

@tareqimbasher
Copy link
Owner

@RichardNobel thank you for testing that and reporting back, I'll take a look at this and get a fix out soon!

@faahiero
Copy link
Author

faahiero commented Jul 4, 2024

Thanks for confirming. I'll check out the issue with the tree view. Can you please post dotnet --info?

Sure, here:

.NET SDK:
 Version:           8.0.106
 Commit:            ab2d260803
 Workload version:  8.0.100-manifests.8f6aae10

Ambiente de runtime:
 OS Name:     endeavouros
 OS Version:  
 OS Platform: Linux
 RID:         arch-x64
 Base Path:   /usr/share/dotnet/sdk/8.0.106/

Cargas de trabalho do .NET instaladas:
 Workload version: 8.0.100-manifests.8f6aae10
 [wasm-tools]
   Origem da Instalação: SDK 8.0.100
   Versão do Manifesto:    8.0.6/8.0.100
   Caminho do Manifesto:       /usr/share/dotnet/sdk-manifests/8.0.100/microsoft.net.workload.mono.toolchain.current/8.0.6/WorkloadManifest.json
   Tipo de Instalação:        FileBased

 [wasm-tools-net6]
   Origem da Instalação: SDK 8.0.100
   Versão do Manifesto:    8.0.6/8.0.100
   Caminho do Manifesto:       /usr/share/dotnet/sdk-manifests/8.0.100/microsoft.net.workload.mono.toolchain.net6/8.0.6/WorkloadManifest.json
   Tipo de Instalação:        FileBased


Host:
  Version:      8.0.6
  Architecture: x64
  Commit:       3b8b000a0e

.NET SDKs installed:
  6.0.131 [/usr/share/dotnet/sdk]
  7.0.120 [/usr/share/dotnet/sdk]
  8.0.106 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.31 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.31 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants