peachpiecompiler / peachpie

PeachPie - the PHP compiler and runtime for .NET and .NET Core
https://www.peachpie.io
Apache License 2.0
2.33k stars 202 forks source link

ERROR: could not find driver: 'pgsql' #1078

Closed kripper closed 1 year ago

kripper commented 1 year ago

Assembly was added to .msbuildproj, but for some reason, the driver can not be found. The project was created using: dotnet new web -lang PHP

Server.csproj:

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <ProjectReference Include="..\Website\Website.msbuildproj" />
    <PackageReference Include="Peachpie.AspNetCore.Web" Version="1.0.6" />
    <PackageReference Include="Peachpie.Library.PDO.PgSQL" Version="0.9.30" />
  </ItemGroup>

</Project>

Website.msbuildproj:

<Project Sdk="Peachpie.NET.Sdk/1.0.6">

  <PropertyGroup>
    <CodePage>iso-8859-1</CodePage>
    <OutputType>Library</OutputType>
    <TargetFramework>netstandard2.1</TargetFramework>
    <AssemblyName>WebApp</AssemblyName>
        <ShortOpenTag>true</ShortOpenTag>
        <NoWarn>PHP5006,PHP5007,PHP5008,PHP5011</NoWarn>
  </PropertyGroup>

  <ItemGroup>
     ...
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Peachpie.Library.PDO.PgSQL" Version="0.9.30" />
  </ItemGroup>
</Project>
kripper commented 1 year ago

It works fine using this versions:

<PackageReference Include="Peachpie.AspNetCore.Web" Version="1.0.6" />
<PackageReference Include="Peachpie.Library.PDO.PgSQL" Version="1.0.6" />