最近第一次用WPF開發一個windows桌面應用,應用開發完成,打包的時候出現以下問題。
1>------ 已啟動全部重新生成: 專案: ExcelFill, 配置: Release Any CPU ------
1> ExcelFill -> D:\winworkspace\ExcelFill\ExcelFill\bin\Release\ExcelFill.exe
------ Starting pre-build validation for project 'ExcelFillSetup' ------
------ Starting pre-build validation for project 'ExcelFillSetup' ------
------ Starting pre-build validation for project 'ExcelFillSetup' ------
.
.
.
Building file 'D:\winworkspace\ExcelFill\ExcelFillSetup\Release\ExcelFillSetup.msi'...
Building file 'D:\winworkspace\ExcelFill\ExcelFillSetup\Release\ExcelFillSetup.msi'...
Building file 'D:\winworkspace\ExcelFill\ExcelFillSetup\Release\ExcelFillSetup.msi'...
ERROR: File 'IBM.Data.DB2.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'
ERROR: File 'IBM.Data.DB2.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'
ERROR: File 'IBM.Data.DB2.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'
WARNING: File 'IBM.Data.DB2.dll' targeting 'x64' is not compatible with the project's target platform 'x86'
WARNING: File 'IBM.Data.DB2.dll' targeting 'x64' is not compatible with the project's target platform 'x86'
WARNING: File 'IBM.Data.DB2.dll' targeting 'x64' is not compatible with the project's target platform 'x86'
Build process cancelled
========== 全部重新生成: 成功 1 個,失敗 1 個,跳過 0 個 ==========
然而我的要制作安裝包的目標平臺設定的是x64啊,弄了半天了,好痛苦,求解!

uj5u.com熱心網友回復:
頂一下,在線等啊!uj5u.com熱心網友回復:
是不是你的平臺是AnyCPU惹的禍呢?uj5u.com熱心網友回復:
設定Setup 屬性的TargetPlatform 為x64uj5u.com熱心網友回復:
x64改成x86uj5u.com熱心網友回復:
很明顯你想把程式打包成 x64 架構,但是你的程式中參考的三方庫不支持 x64,只支持 x86。轉載請註明出處,本文鏈接:https://www.uj5u.com/net/11447.html
標籤:C#
