開發環境:vs2015 框架:.NET4.5
問題描述:使用vs2015開發了一個app,在部分電腦上安裝.NET4.5后能夠直接運行(win10系統下),但是在win7系統下安裝了.NET4.5運行時會出錯,找不到原因,求解
uj5u.com熱心網友回復:
報錯資訊是什么?另外你程式的目標平臺是什么?你如果拿X64的程式安裝在32位的電腦上不管是Win 幾都會出錯。主要是你的報錯資訊什么都沒有
uj5u.com熱心網友回復:
程式運行一段時間后崩潰,然后提示聯機檢查解決方案并關閉程式,目標平臺就是.NET4.5,機器的運行環境也是windows64位uj5u.com熱心網友回復:
事件查看器里下日志uj5u.com熱心網友回復:
運行一段時間后崩潰你應該把你崩潰的資訊貼出來,另外.NET 4.5是框架不是平臺。是不是亂用執行緒了?
uj5u.com熱心網友回復:
uj5u.com熱心網友回復:
在多臺機器上驗證過,有的是能一直正常運行的,有一臺比較老式的電腦運行一會就會報錯uj5u.com熱心網友回復:

這個
uj5u.com熱心網友回復:
日志名稱: Application來源: .NET Runtime
日期: 2019-09-02 17:29:27
事件 ID: 1026
任務類別: 無
級別: 錯誤
關鍵字: 經典
用戶: 暫缺
計算機: HP-PC
描述:
應用程式: CKDataCollection.exe
Framework 版本: v4.0.30319
說明: 由于未經處理的例外,行程終止。
例外資訊: System.Windows.Markup.XamlParseException
堆疊:
在 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.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
在 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.LegacyInvokeImpl(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.Threading.Dispatcher.Run()
在 System.Windows.Application.RunDispatcher(System.Object)
在 System.Windows.Application.RunInternal(System.Windows.Window)
在 System.Windows.Application.Run(System.Windows.Window)
在 CKDataCollection.App.Main()
事件 Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1026</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2019-09-02T09:29:27.000000000Z" />
<EventRecordID>47687</EventRecordID>
<Channel>Application</Channel>
<Computer>HP-PC</Computer>
<Security />
</System>
<EventData>
<Data>應用程式: CKDataCollection.exe
Framework 版本: v4.0.30319
說明: 由于未經處理的例外,行程終止。
例外資訊: System.Windows.Markup.XamlParseException
堆疊:
在 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.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
在 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.LegacyInvokeImpl(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.Threading.Dispatcher.Run()
在 System.Windows.Application.RunDispatcher(System.Object)
在 System.Windows.Application.RunInternal(System.Windows.Window)
在 System.Windows.Application.Run(System.Windows.Window)
在 CKDataCollection.App.Main()
</Data>
</EventData>
</Event>
uj5u.com熱心網友回復:
日志里顯示版本號4.0 低于4.5 是不是這個原因?uj5u.com熱心網友回復:
但是我已經手動安裝了.NET4.5,運行環境不應該有問題呀uj5u.com熱心網友回復:
運行一段時間就崩潰? 這不是一開始運行就崩潰了嗎讀取baml出錯了
最有可能的還是.net4.5沒有裝好
uj5u.com熱心網友回復:
確實是運行了一段時間奔潰的,.NET45都是官網上下載安裝的uj5u.com熱心網友回復:
你看一下電腦上是否有framework 4.0?我懷疑是有4.0的,系統使用4.0的framework運行你的程式,但你的程式是4.5編的,有可能出現問題。如果有4.0的,卸載以后,再安裝4.5的framework試試,記得安裝完重啟。轉載請註明出處,本文鏈接:https://www.uj5u.com/net/121439.html
標籤:C#
上一篇:VB.net繪制平面圖
下一篇:【分享】驗證碼識別工具
