8000 🐛 Bug Report: C# Functions are not working with SqlClient (System.PlatformNotSupportedException) · Issue #7869 · appwrite/appwrite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
🐛 Bug Report: C# Functions are not working with SqlClient (System.PlatformNotSupportedException) #7869
Open
@Kuromory

Description

@Kuromory

👟 Reproduction steps

I created a function from the appwrite template (npm install appwrite)
I changed the StarterTemplate.csprj to:

<Project Sdk="Microsoft.NET.Sdk.Web">
	<PropertyGroup>
		<TargetFramework>net6.0</TargetFramework>
		<OutputType>Exe</OutputType>
		<!-- <RuntimeIdentifier>ubuntu.22.04-x64</RuntimeIdentifier> -->
		<Nullable>enable</Nullable>
		<ImplicitUsings>enable</ImplicitUsings>
	</PropertyGroup>
	<ItemGroup>
		<PackageReference Include="Appwrite" Version="0.8.1" />
		<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0" />
		<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
	</ItemGroup>
</Project>

I tried from Microsoft and System to use the SqlClient:

using var connection = new SqlConnection(connectionString);

👍 Expected behavior

I open a connection to my SQL server

👎 Actual Behavior

I get this exception when the function is run (depending what I use it is System or Microsoft):

System.PlatformNotSupportedException: System.Data.SqlClient is not supported on this platform.
   at System.Data.SqlClient.SqlConnection..ctor(String connectionString)

🎲 Appwrite version

Version 1.5.x

💻 Operating system

Windows

🧱 Your Environment

I use docker with the provided docker-compose.yml file

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingproduct / functionsFixes and upgrades for the Appwrite Functions.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0