Microsoft.Data.SqlClient is not supported on this platform
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu với source/dbalight/cmdlets/public/ConnectServer.cs tại dòng 41, nơi ServerConnection được khởi tạo, và kiểm tra project module dbalight được liên kết cùng .csproj của nó. Tái hiện lỗi trên thiết lập M1 và .NET 6 đã được báo cáo, sau đó xác định liệu cấu hình project hay phiên bản SQLManagementObjects gây ra ngoại lệ nền tảng của Microsoft.Data.SqlClient; hoàn tất khi có một cách giải quyết đã được xác minh hoặc một tình trạng không tương thích được ghi nhận.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I've searched this repository along with the sqlclient repository. There are multiple issues bring this up but are either closed or solutions provided don't seem to fix the issue I'm getting.
I'm trying to create a basic binary module in PowerShell against SQL Server. I have a basic project structure with just one cmdlet so far (trying to see if this even works) that references SMO library.
Project: https://github.com/wsmelton/dbalight/tree/modulebuilder/source/dbalight
The project compiles for dotnet 6 on my M1 and the module imports with no issues. It is not until I call the Connect-DblServer:
Exception :
Type : System.PlatformNotSupportedException
TargetSite : Void .ctor()
Message : Microsoft.Data.SqlClient is not supported on this platform.
Source : Microsoft.Data.SqlClient
HResult : -2146233031
StackTrace :
at Microsoft.Data.SqlClient.SqlConnection..ctor()
at Microsoft.SqlServer.Management.Common.ConnectionManager..ctor(IRenewableToken token, Boolean removeIntegratedSecurity)
at Microsoft.SqlServer.Management.Common.ConnectionManager..ctor()
at Microsoft.SqlServer.Management.Common.ServerConnection..ctor()
at dbalight.cmdlets.general.ConnectServerCmdlet.ProcessRecord() in
/Users/smelton/git/dbalight/source/dbalight/cmdlets/public/ConnectServer.cs:line 41
at System.Management.Automation.Cmdlet.DoProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
CategoryInfo : NotSpecified: (:) [Connect-DblServer], PlatformNotSupportedException
FullyQualifiedErrorId : System.PlatformNotSupportedException,dbalight.cmdlets.general.ConnectServerCmdlet
InvocationInfo :
MyCommand : Connect-DblDblServer
ScriptLineNumber : 1
OffsetInLine : 1
HistoryId : 26
Line : Connect-DblServer -ServerInstance 'localhost,1432' -Verbose
PositionMessage : At line:1 char:1
+ Connect-DblServer -ServerInstance 'localhost,1432' -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
InvocationName : Connect-DblServer
CommandOrigin : Internal
ScriptStackTrace : at <ScriptBlock>, <No file>: line 1
Line 41 of that cs file for the cmdlet is: ServerConnection srvCn = new ServerConnection();
- Is there something in my csproj that I have configured wrong?
- Is this just broken and I need to revert to an older version of the SQLManagementObjects library?
- Ngôn ngữ chính
- C#
- Star
- 143
- Fork
- 28
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/sqlmanagementobjects
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 74/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Tất cả issue của microsoft/sqlmanagementobjects
Issue tương tự
-
Add more to the documentation Đang mở:watch: Not Triaged dotnet-fsharp/svc
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Client customer-reported needs-team-attention question Service Attention WebPubSub
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Azure/azure-sdk-for-net#63292 · 3 bình luận · 1 reaction ·
-
Issue-Enhancement Needs-Triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
PowerShell/PowerShell#28061 · 2 reaction ·
-
dependencies needs-team-triage server-Azure.Mcp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
aspnet-core/svc aspnetcore-signalr/subsvc doc-enhancement Pri2 SignalR
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
dotnet/AspNetCore.Docs#37729 ·