Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is litedb can work in xp? #44

Closed
wincpt opened this issue Jul 21, 2015 · 2 comments
Closed

Is litedb can work in xp? #44

wincpt opened this issue Jul 21, 2015 · 2 comments
Labels

Comments

@wincpt
Copy link

wincpt commented Jul 21, 2015

I have a winform program use litedb,it work in win7 ,but in xp it work failure.
I use litedb shell open db file,in win7 work correct.in xp it have error

open message.db
db.JCYB.find
Oject reference not set an instance of an object.

in my program log the error stack is follow:
System.NullReferenceException: Object reference not set to an instance of an object.
at LiteDB.IndexNode.IsHeadTail(CollectionIndex index)
at LiteDB.IndexService.d__2.MoveNext()
at LiteDB.LiteCollection1.EnsureIndex(String field, IndexOptions options) at LiteDB.LiteCollection1.EnsureIndex(String field, Boolean unique)
at LiteDB.Query.Run[T](LiteCollection1 collection) at LiteDB.LiteCollection1.d__9.MoveNext()
at System.Linq.Enumerable.d__4d1.MoveNext() at System.Linq.Enumerable.<TakeIterator>d__3a1.MoveNext()
at System.Linq.Buffer1..ctor(IEnumerable1 source)
at System.Linq.OrderedEnumerable1.<GetEnumerator>d__0.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable`1 collection)

@fancymax
Copy link

you need to uncheck "optimize code" in project generate setting,then it will work normal in xp.

@fancymax
Copy link

你在VS的编译选项中去掉对“优化代码”的勾选,再编译生成即可正常。希望能对你有用。

@mbdavid mbdavid closed this as completed Jul 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants