报错总结
lemonemmm
这个作者很懒,什么都没留下…
展开
-
an unsaved transient instance save the transient instance before flushing ...
报的错 catch (Exception ex)object reference an unsaved transient instance save the transient instance before flushing or set casade action for ...LEAD.ERP.Objects.Domain.Material,Enitity;LEAD.ERP.O...原创 2019-02-19 14:00:58 · 116 阅读 · 0 评论 -
报错: OwinStartupAttribute出错
OwinStartupAttribute出错 尝试加载应用时出现了以下错误。 - 找不到包含 OwinStartupAttribute 的程序集。 - 找不到包含 Startup 或 [AssemblyName].Startup 类的程序集。 若要禁用 OWIN 启动发现,请在 web.config 中为 appSetting owin:AutomaticAppStartup 添加值 “f...转载 2019-02-19 13:58:12 · 505 阅读 · 0 评论 -
报错 无法删除文件
报的错: 解决方案: 重新打开VS原创 2019-02-19 13:52:08 · 641 阅读 · 0 评论 -
报错 CS0649
报的错: CS0649 C# Field is never assigned to, and will always have its default value null解决方案: private IEnumerable<Machinetaskhistory> _lstTasks = null;原创 2019-02-19 13:52:20 · 2477 阅读 · 1 评论 -
报错CS2002 C# Source file specified multiple times
报的错:CS2002 C# Source file specified multiple times解决方案:右击obj/debug文件,选择从项目中排出原创 2019-02-19 13:52:32 · 785 阅读 · 0 评论 -
报错“索引和长度必须引用该字符串内的位置。参数名: length”错误的解析
索引和长度必须引用该字符串内的位置。 参数名: length说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.ArgumentOutOfRangeException: 索引和长度必须引用该字符串内的位置。 参数名: length错误原因:Substring(0,5)出错是由...原创 2019-02-19 13:51:53 · 19998 阅读 · 0 评论 -
报错 必须添加引用
必须添加对程序集“System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”的引用。 请检查下bin目录下有没有System.Data.Entity.dll Svn不上传bin目录.所以添加上去dll引用就可以。没有的话从:C:\Program Files\Referenc...原创 2019-02-19 13:52:51 · 207 阅读 · 0 评论 -
Batch update returned unexpected row count from update
报错:Batch update returned unexpected row count from update; actual row count: 0; expected: 16翻译:批量更新从更新返回了意外的行数; 实际行数:0; 预期:16原因:hibernate对对象持久化后,对象更改了,在事务提交时,会把更改的对象持久化到数据库,而在持久化到数据库之前,这条数据已经被删除,...原创 2019-02-19 13:57:47 · 2149 阅读 · 0 评论 -
Type mismatch in NHibernate.Criterion.SimpleExpression:
***报错***:Type mismatch in NHibernate.Criterion.SimpleExpression: Code expected type System.Int32, actual type System.String***翻译***:NHibernate.Criterion.SimpleExpression中的类型不匹配:代码期望类型System.Int32,...原创 2019-02-19 13:58:34 · 572 阅读 · 0 评论 -
No persister for: System.Collections.Generic.List'1[LEAD.ERP.Objects.Domain.Mate......]
报的错No persister for: System.Collections.Generic.List'1[LEAD.ERP.Objects.Domain.Material,LEAD.ERP.Objects,Version = 1.0.0.0,Culture = neutral,PublickeyToken = null]]没有持久性原因报错或者删除List类型时,要一条条...原创 2019-02-19 14:02:11 · 720 阅读 · 0 评论 -
集合已修改,可能无法执行枚举操作
报的错集合已修改,可能无法执行枚举操作原因不要在枚举集合的操作,比如Foreach中去执行修改集合的操作,如果需要修改,应先使用ToArray()方法例如:foreach(var x in MyList.ToArray()){ 执行可能修改MyList的操作}...原创 2019-02-19 13:58:53 · 8592 阅读 · 0 评论 -
未将对象引用设置到对象的实例
报错未将对象引用设置到对象的实例原因1.是用这个对象之前没有将其实例化2.变量出现null值3.数据库类型类型和表中定义的类型不一致原创 2019-02-19 13:53:32 · 4586 阅读 · 0 评论 -
参数计数不匹配
报错参数计数不匹配原因原创 2019-02-19 14:00:47 · 3289 阅读 · 2 评论 -
Error dehydrating property value for ....
报的错Error dehydrating property value for LEAD.ERP.Objects.Domain.Materialinstance.Material...原因表中存在级联关系 public virtual Unit unit { get; set;} Reference( x => x.MaterialUnit).Colum(“UbitID”...原创 2019-02-19 13:59:32 · 1330 阅读 · 0 评论 -
CS0006
原因:在被引用项目重新生成时删除不了以前的dll,所以会出现找不到路径的问题解决方法1.重启2.重启并手动将提示文件夹下的dll文件删除,并重新生成解决方案...原创 2019-02-19 13:58:23 · 354 阅读 · 0 评论