首页 新闻 赞助 找找看

WPF安装程序问题

-1
悬赏园豆:100 [已解决问题] 解决于 2012-09-23 01:02

例行,先谢谢

问题一:在.NET上开发的WPF开发的单机程序,数据库SQLSERVER,数据库采用本地连接,生成安装包,自己安装,运行,数据库相关操作没问题,提问,如果别人安装该程序后数据库怎么办?我个人认为是生成数据库文件引用到工程里(单机版),是这样吗?请解释一下

问题二:同样程序安装包,安装到其他机器,一运行就提示关闭程序,系统日志内容如下

再谢谢了,两个日志记录,一个是程序本身错误,一个是.NET Runtime错误

 日志名称:          Application
来源:            Application Error
日期:            2012/8/10 星期五 13:31:26
事件 ID:         1000
任务类别:          (100)
级别:            错误
关键字:           经典
用户:            暂缺
计算机:           WIN-PC758G0DTKO
描述:
错误应用程序名称: CoordinatePositioningSystem.exe,版本: 1.0.0.0,时间戳: 0x502387f0
错误模块名称: KERNELBASE.dll,版本: 6.1.7601.17651,时间戳: 0x4e211319
异常代码: 0xe0434352
错误偏移量: 0x0000b9bc
错误进程 ID: 0x1870
错误应用程序启动时间: 0x01cd76b9629111b7
错误应用程序路径: xx\CoordinatePositioningSystem.exe
错误模块路径: C:\Windows\syswow64\KERNELBASE.dll
报告 ID: a07536fd-e2ac-11e1-8d47-64315088df7d
 
 日志名称:          Application
来源:            .NET Runtime
日期:            2012/8/10 星期五 13:31:26
事件 ID:         1026
任务类别:          无
级别:            错误
关键字:           经典
用户:            暂缺
计算机:         xx
描述:
应用程序: CoordinatePositioningSystem.exe
Framework 版本: v4.0.30319
说明: 由于未经处理的异常,进程终止。
异常信息: System.Windows.Markup.XamlParseException
堆栈:
   在 System.Windows.Markup.XamlReader.RewrapException(System.Exception, System.Xaml.IXamlLineInfo, System.Uri)
   在 System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)
   在 System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)
   在 System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)
   在 System.Windows.Application.LoadBamlStreamWithSyncInfo(System.IO.Stream, System.Windows.Markup.ParserContext)
   在 System.Windows.Application.LoadComponent(System.Uri, Boolean)
   在 System.Windows.Application.DoStartup()
   在 System.Windows.Application.<.ctor>b__1(System.Object)
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   在 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   在 System.Windows.Threading.DispatcherOperation.InvokeImpl()
   在 System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   在 System.Threading.ExecutionContext.runTryCode(System.Object)
   在 System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
   在 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   在 System.Windows.Threading.DispatcherOperation.Invoke()
   在 System.Windows.Threading.Dispatcher.ProcessQueue()
   在 System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   在 MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   在 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   在 System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   在 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   在 MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   在 System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   在 System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
   在 System.Windows.Application.RunDispatcher(System.Object)
   在 System.Windows.Application.RunInternal(System.Windows.Window)
   在 System.Windows.Application.Run(System.Windows.Window)
   在 System.Windows.Application.Run()
   在 CoordinatePositioningSystem.App.Main()
我爱吃鱼的主页 我爱吃鱼 | 初学一级 | 园豆:5
提问于:2012-08-25 23:49
< >
分享
最佳答案
0

问题1: 生成数据库文件引用到工程 需要机器具有SQL Server Express版本,除非你SQL Server Compact版本,不需要机器安装引擎;或者你安装后可以修改配置文件

问题2:首先需要确定安装的机器环境是否符合WPF的运行要求,看错误好像是这个问题;另外WPF使用的图标分辨率太高的话也不行

收获园豆:100
2012 | 高人七级 |园豆:21228 | 2012-08-26 12:27

re问题1:安装程序的机器需要安装SQL Server Express版本?可否讲解一下,我在安装使用单机版时,并没有安装数据库,为和可以使用查询存档等与数据库相关功能。。。是使用了SQL Server Compact?

我爱吃鱼 | 园豆:5 (初学一级) | 2012-08-27 14:49

没有安装 SQL Server Express,不能使用attached file的模式,机***.config文件中不能是文件路径

SQL Server Compact是内嵌的库,只要包括dll文件就可操作数据库文件 http://www.cnblogs.com/2018/archive/2011/02/23/1961657.html http://www.cnblogs.com/2018/archive/2011/02/24/1961658.html 这是我以前写的数据库同步的例子,可供参考

2012 | 园豆:21228 (高人七级) | 2012-08-27 16:35
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册