【问题标题】:Which Package or assembly had ISession?哪个包或程序集有 ISession?
【发布时间】:2017-06-06 06:34:06
【问题描述】:

我使用这个系列通过 ASP.NET 处理 CQRS/ES:

https://www.exceptionnotfound.net/real-world-cqrs-es-with-asp-net-and-redis-part-2-the-write-model/

我的问题出在它使用 ISession 的代码中,我不知道它有什么程序集/包。根据文档,我需要安装 CQRSLite,但是当我尝试安装它时出现错误。

private readonly ISession _session;

这是我得到的错误:

Could not install package 'CqrsLite 0.12.9'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.          

我正在使用 Visual Studio 2015 和 .net 4.5。

【问题讨论】:

    标签: c# asp.net .net cqrs event-sourcing


    【解决方案1】:

    可能有更聪明的方法,但我在编辑器中右键单击类名并选择“转到定义”。

    它会反汇编类,并在顶部显示程序集的名称和引用它的位置。如果它是一个 Nuget 包,它将为您提供包的名称。

    #region Assembly EPPlus, Version=4.1.0.0, Culture=neutral, PublicKeyToken=ea159fdaa78159a1
    // C:\.. etc... etc...\packages\EPPlus.4.1.0\lib\net40\EPPlus.dll
    //                     ^^^^^^^^^^^^^^^^^^^^
    #endregion
    

    【讨论】:

    • 这是可行的,它的引用存在于项目中,我正在编写它,它还没有在任何地方引用。
    【解决方案2】:

    我需要将项目的版本更改为 NETFramework 4.6.1 并安装 CQRSLite 包。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-08
      • 2011-09-08
      • 1970-01-01
      • 2015-02-12
      • 2010-10-30
      相关资源
      最近更新 更多