开发者

Exception from .net windows executable file

开发者 https://www.devze.com 2023-03-18 02:29 出处:网络
I have create .net windows application in vs2010 with entity. I have added mydatabase.mdf file in the application to store data. It is working fine when i executed in visual studio. Now I have created

I have create .net windows application in vs2010 with entity. I have added mydatabase.mdf file in the application to store data. It is working fine when i executed in visual studio. Now I have created setup project and added mydatabase.mdf file after selecting primary output. When i installed this on my computer then i got error "System.Data.EntityException" with Stack:

at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean, System.Data.Common.DbConnection, System.Data.Common.DbConnection, System.String, System.String, Boolean ByRef)
at System.Data.EntityClient.EntityConnection.Open()
at System.Data.Objects.ObjectContext.EnsureConnection()
at System.Data.Objects.ObjectQuery`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].GetResults(System.Nullable`1<System.Data.Objects.MergeOption>)
at System.Data.Objects.ObjectQuery`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at System.Collections.Generic.List`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.Collections.Generic.IEnumerable`1<System.__Canon>)
at System.Linq.Enumerable.ToList[[System.__Canon, mscorlib, Version=4.0.0.0, Cu开发者_JAVA百科lture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
at Macro.BL.ManageMacroGroup.FetchMacroGroups()
at Macro.Macros.IntializeTreeView()
at Macro.Macros..ctor()
at Macro.Program.Main()

If some one has idea to handle this then please give me suggestion to handle this.


Running from Visual Studio allows you to avoid permission & security issues. Double check your security settings first. Also, the DLL being used in Visual Studio is a different set than the one being used daily ( SDK DLL vs Runtime DLL ). Double check the version used.

Try to Windows Update as well.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号