FreeSql icon indicating copy to clipboard operation
FreeSql copied to clipboard

NET8 AOT 发布updaste报错 The binary operator Equal is not defined ,System.Reflection.Runtime.Typelnfos.RuntimeArrayTypelnfo

Open h0730303779 opened this issue 6 months ago • 3 comments

第一次保存正常 , 再查询出来后update 就报错了

        public async Task<int> UpdateAsync(T entity)
        {
            _context.Set<T>().Update(entity);
            return await _context.SaveChangesAsync();
        }

查询 issues发现 https://www.cnblogs.com/FreeSql/p/17836000.html 搜到一样的问题 尝试过 image Roots.xml ps:帮助过我解决反射问题 但解决不了freesql问题 image 增加了

	<assembly fullname="FreeSql" preserve="All" />

但还是不行

正常运行是正常的 image AOT后 image

数据库版本

sqlite

安装的Nuget包

<PackageReference Include="FreeSql" Version="3.2.833" />
  <PackageReference Include="FreeSql.DbContext" Version="3.2.833" />
  <PackageReference Include="FreeSql.Provider.Sqlite" Version="3.2.833" />

.net framework/. net core? 及具体版本

net 8 freesql 3.2.833

以下 AvaloniaAppFreeSqlTest最小复现代码.zip 是源码

h0730303779 avatar Aug 10 '24 16:08 h0730303779