Activities of "maliming"

Method not found: 'Volo.Abp.Localization.LocalizationResource Volo.Abp.Localization.LocalizationResourceExtensions.AddVirtualJson(Volo.Abp.Localization.LocalizationResource, System.String)'.

This seems to be caused by inconsistent package versions.

Have you tried to reproduce the problem using a template project? Does your docker have any build residue/cache used?

However, for my real project, I have a lot of seed methods. Is there any other way than adding the if condition to every insert statement now?

hi

There is no good way. we have to query first. like:

https://github.com/abpframework/abp/blob/08034310b15e9056c019403f500a507e2b4efbdd/modules/openiddict/app/OpenIddict.Demo.Server/EntityFrameworkCore/ServerDataSeedContributor.cs#L28 https://github.com/abpframework/abp/blob/e3e1779de6df5d26f01cdc8e99ac9cbcb3d24d3c/modules/cms-kit/host/Volo.CmsKit.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs#L68

OK

hi

How can I reproduce your problem?

hi

hi

Please try to update your AddressesDataSeedContributor.

using System;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Uow;
using test04012022.Addresses;

namespace test04012022.Addresses
{
    public class AddressesDataSeedContributor : IDataSeedContributor, ITransientDependency
    {
        private readonly IAddressRepository _addressRepository;
        private readonly IUnitOfWorkManager _unitOfWorkManager;

        public AddressesDataSeedContributor(IAddressRepository addressRepository, IUnitOfWorkManager unitOfWorkManager)
        {
            _addressRepository = addressRepository;
            _unitOfWorkManager = unitOfWorkManager;
        }

        public async Task SeedAsync(DataSeedContext context)
        {
            if (await _addressRepository.FindAsync(Guid.Parse("a4821c19-b073-4dd4-94c0-299f3712a7ed")) == null)
            {
                await _addressRepository.InsertAsync(new Address
                (
                    id: Guid.Parse("a4821c19-b073-4dd4-94c0-299f3712a7ed"),
                    firstname: "e60f19e1c89147d4958618eecd2e6"
                ));
            }

            if (await _addressRepository.FindAsync(Guid.Parse("87175640-2b9d-4c28-a1c2-b6aceca4969f")) == null)
            {
                await _addressRepository.InsertAsync(new Address
                (
                    id: Guid.Parse("87175640-2b9d-4c28-a1c2-b6aceca4969f"),
                    firstname: "b23b24db6d974e7493ef2e1bdb915ed185da359993974b27bd30cb50b0c33c2ea02b782148f845"
                ));
            }

            await _unitOfWorkManager.Current.SaveChangesAsync();
        }
    }
}

ok, I will check it.

hi Please send your project to liming.ma@volosoft.com

Is it possible to reproduce the problem in a new project template?

ok, I will check it.

Showing 7121 to 7130 of 10642 entries
Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 10, 2025, 06:30