.net core 3.10 撰寫的Form APP。在vs 2019環境下編譯正常,在2019環境下的電腦中運行編譯好的程式運行正長,但將此程式拷貝到別的電腦無法運行(其他電腦的windowsdesktop-runtime-3.1.10 已安裝),請問是什么原因呢?
附windows應用程式錯誤日志:
一:
日志名稱: Application
來源: .NET Runtime
日期: 2021/2/22 13:59:35
事件 ID: 1026
任務類別: 無
級別: 錯誤
關鍵字: 經典
用戶: 暫缺
計算機: WIN-061EVIHKD86
描述:
Application: SatMiner.exe
CoreCLR Version: 4.700.20.51601
.NET Core Version: 3.1.10
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileLoadException: Could not load file or assembly 'System.Drawing.Common, Version=4.0.2.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
File name: 'System.Drawing.Common, Version=4.0.2.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at xj193hskaldi2ngl..
.
(Object
, Object[]
)
at SatMiner.Program.()
事件 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='2021-02-22T05:59:35.310709600Z'/><EventRecordID>2177</EventRecordID><Channel>Application</Channel><Computer>WIN-061EVIHKD86</Computer><Security/></System><EventData><Data>Application: SatMiner.exe
CoreCLR Version: 4.700.20.51601
.NET Core Version: 3.1.10
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileLoadException: Could not load file or assembly 'System.Drawing.Common, Version=4.0.2.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
File name: 'System.Drawing.Common, Version=4.0.2.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at xj193hskaldi2ngl..
.
(Object
, Object[]
)
at SatMiner.Program.()
</Data></EventData></Event>
二:
日志名稱: Application
來源: Application Error
日期: 2021/2/22 13:59:35
事件 ID: 1000
任務類別: (100)
級別: 錯誤
關鍵字: 經典
用戶: 暫缺
計算機: WIN-061EVIHKD86
描述:
錯誤應用程式名稱: SatMiner.exe,版本: 1.0.0.0,時間戳: 0x600792e3
錯誤模塊名稱: KERNELBASE.dll,版本: 10.0.17763.1728,時間戳: 0xc97af40a
例外代碼: 0xe0434352
錯誤偏移量: 0x0000000000039689
錯誤行程 ID: 0xac8
錯誤應用程式啟動時間: 0x01d708dfe4b768c1
錯誤應用程式路徑: D:\netcoreapp3.1\SatMiner.exe
錯誤模塊路徑: C:\Windows\System32\KERNELBASE.dll
報告 ID: b0796bcf-febf-457d-a396-993966530510
錯誤程式包全名:
錯誤程式包相對應用程式 ID:
事件 Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2021-02-22T05:59:35.408250400Z" />
<EventRecordID>2178</EventRecordID>
<Channel>Application</Channel>
<Computer>WIN-061EVIHKD86</Computer>
<Security />
</System>
<EventData>
<Data>SatMiner.exe</Data>
<Data>1.0.0.0</Data>
<Data>600792e3</Data>
<Data>KERNELBASE.dll</Data>
<Data>10.0.17763.1728</Data>
<Data>c97af40a</Data>
<Data>e0434352</Data>
<Data>0000000000039689</Data>
<Data>ac8</Data>
<Data>01d708dfe4b768c1</Data>
<Data>D:\netcoreapp3.1\SatMiner.exe</Data>
<Data>C:\Windows\System32\KERNELBASE.dll</Data>
<Data>b0796bcf-febf-457d-a396-993966530510</Data>
<Data>
</Data>
<Data>
</Data>
</EventData>
</Event>
uj5u.com熱心網友回復:
你的程式用.net framework 4.7uj5u.com熱心網友回復:
另外發現,編譯環境的中System.Drawing.Common指向的是C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Drawing.Common.dll 版本 4.700.19.56404而不能運行的 只有C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\3.1.10\System.Drawing.Common.dll 本版 4.700.20.51901
會和這個有關系嗎?
另外C:\Program Files\dotnet\packs 和 C:\Program Files\dotnet\shared 中的System.Drawing.Common.dll有什么區別呢?
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/262298.html
標籤:C#
