dotnetcore / EasyCaching

:boom: EasyCaching is an open source caching library that contains basic usages and some advanced usages of caching which can help us to handle caching more easier!
MIT License
1.92k stars 324 forks source link

EasyCaching.SQLite in Excel VSTO project is not working #516

Open ShugerS opened 6 months ago

ShugerS commented 6 months ago

Description

I use EasyCaching.SQLite in Excel VSTO project, but it reports an error while using. The error message is shown in the following figure. [Description of the bug or feature]

Steps to Reproduce

  1. Create a Excel VSTO project.
  2. Add the following code in Ribbon1.cs

Related code

private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
        {
            IServiceCollection services = new ServiceCollection();
            services.AddEasyCaching(option =>
            {
                option.UseSQLite(c =>
                {
                    c.DBConfig = new SQLiteDBOptions
                    {
                        FileName = "demo.db",
                        CacheMode = SqliteCacheMode.Default,
                        OpenMode = SqliteOpenMode.ReadWriteCreate,
                    };
                }, "m1");
            });
            IServiceProvider serviceProvider = services.BuildServiceProvider();
            var factory = serviceProvider.GetService<IEasyCachingProviderFactory>();
        }

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened] image image

Specifications

Memoyu commented 6 months ago

尝试了一下,似乎无法复现你的问题,可否提供一个demo?

image