.net - 模型存储 edmx 文件不会在 Debug模式下生成,但会在 Release模式下生成

标签 .net visual-studio entity-framework ef-code-first edmx

我的 edmx 文件是否可以在 Debug模式而不是 Release模式下生成?

public class DatabaseConfiguration : DbConfiguration
    {
        public DatabaseConfiguration() : base()
        {
            var modelStoreLocation = Config.Data.ModelStoreLocation;
            if (!modelStoreLocation.IsBlank())
            {
                var cachedDbModelStore = new MyDbModelStore(Config.Data.ModelStoreLocation);
                var dependencyResolver = new SingletonDependencyResolver<DbModelStore>(cachedDbModelStore);
                AddDependencyResolver(dependencyResolver);
            }
        }

最佳答案

我认为您的解决方案构建不正确。因此,当您在 Release模式下生成时,它可以正常工作 正确构建解决方案,然后它也可以在 Debug模式下工作。

关于.net - 模型存储 edmx 文件不会在 Debug模式下生成,但会在 Release模式下生成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54891565/

相关文章:

.net - 如何避免成千上万的不必要的ListView.SelectedIndexChanged事件?

c# - CultureInfo.Name 属性

visual-studio - 使用 Visual Studio 进行跨解决方案调试

entity-framework - 发布到 Azure Web App 的 ASP.NET Web API 中出现不可预测的 API 请求延迟峰值

entity-framework - Entity Framework : removing entity when One-to-One PK association is specified

.net - 它正在捕获 Application Insights 中 .net 4.6 应用程序支持的 SQL 命令文本吗?

c# - 所有 C# 强制转换都会导致装箱/拆箱

c# - Visual Studio 无法识别新添加的类

c++ - 宏 $(VCTargetsPath) 到底在哪里定义的?

c# - Entity Framework 拆分表删除