[WebToolsE2E][Aspire] Running the eshop.web solution throws an exception: Method not found: 'Void Npgsql.TypeMapping.INpgsqlTypeMapper.AddTypeInfoResolver(Npgsql.Internal.IPgTypeInfoResolver)'.
REGRESSION INFO: Worked fine with Aspire 8.0.0-preview.1.23557.2
INSTALL STEPS
- Clean machine: Win11 x64 23h2 ENU
- Install VS 17.9 P2
- Install Aspire Preview 2 latest build 8.0.0-preview.2.23610.1
- Apply NuGet Feeds
- Install Docker Desktop
REPRO STEPS
- Clone the eShop repo
- Update NuGet.config to use the dotnet-tools feed
- Update Directory.Packages.props to use aspire version 8.0.0-preview.2.23610.1
- Update package Npgsql.EntityFrameworkCore.PostgreSQL '8.0.0' and Yarp.ReverseProxy '2.1.0'
- Open solution eShop.Web.slnf
- Build and F5
ACTUAL
System.MissingMethodException
HResult=0x80131513
Message=Method not found: 'Void Npgsql.TypeMapping.INpgsqlTypeMapper.AddTypeInfoResolver(Npgsql.Internal.IPgTypeInfoResolver)'.
Source=Pgvector
StackTrace:
at Npgsql.VectorExtensions.UseVector(INpgsqlTypeMapper mapper)
at Microsoft.EntityFrameworkCore.VectorDbContextOptionsBuilderExtensions.UseVector(NpgsqlDbContextOptionsBuilder optionsBuilder)
at Extensions.<>c.<AddApplicationServices>b__0_1(NpgsqlDbContextOptionsBuilder builder) in C:\Users\xxx\source\repos\eShop\src\Catalog.API\Extensions\Extensions.cs:line 11
at Microsoft.EntityFrameworkCore.NpgsqlDbContextOptionsBuilderExtensions.UseNpgsql(DbContextOptionsBuilder optionsBuilder, Action`1 npgsqlOptionsAction)
EXPECTED F5 to work successfully
This looks like Pgvector needs to be updated to the Npgsql v8.0 compatible version.
@v-sherryfan - can you also update these two lines?
https://github.com/dotnet/eShop/blob/1417a0c6f78b0f6e9da0352cbfc9dc5a46dda088/Directory.Packages.props#L38-L39
to be
<PackageVersion Include="Pgvector" Version="0.2.0" />
<PackageVersion Include="Pgvector.EntityFrameworkCore" Version="0.2.0" />
@eerhardt After updating the above package according to your instructions, the error will disappear.
Is this still relevant?