Подтвердить что ты не робот

Невозможно скомпилировать vdproj с devenv - 'targeting' x64 'несовместимо с целевой платформой проекта' x86 ''

Я искал в Интернете последние часы, нахожу много информации, связанной с моей проблемой, но никто их не фиксирует.

Моя машина 64-разрядная с установленной 32-разрядной Visual Studio 10. Решение использует .Net 4. Решение включает 64-битную установку Crystal Reports. Решение также включает log4net.

Компиляция проекта в VS2010 подходит как для отладки, так и для выпуска, любой процессор.

Я добавил проект Web Setup, который хочу создать. Однако независимо от конфигурации я получаю следующие ошибки при компиляции (как в VS UI, так и в командной строке с использованием devenv.exe):

ERROR: File 'CrystalDecisions.ReportAppServer.Prompting.dll' targeting 'AMD64' is not compatible with the project target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.Prompting.dll' targeting 'x64' is not compatible with the project target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.ObjectFactory.dll' targeting 'AMD64' is not compatible with the project target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.ObjectFactory.dll' targeting 'x64' is not compatible with the project target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.XmlSerialize.dll' targeting 'AMD64' is not compatible with the project target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.XmlSerialize.dll' targeting 'x64' is not compatible with the project target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.CommonObjectModel.dll' targeting 'AMD64' is not compatible with the project target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.CommonObjectModel.dll' targeting 'x64' is not compatible with the project target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.CommonControls.dll' targeting 'AMD64' is not compatible with the project target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.CommonControls.dll' targeting 'x64' is not compatible with the project target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.ReportDefModel.dll' targeting 'AMD64' is not compatible with the project target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.ReportDefModel.dll' targeting 'x64' is not compatible with the project target platform 'x86'
ERROR: File 'log4net.dll' targeting 'AMD64' is not compatible with the project target platform 'x86'
WARNING: File 'log4net.dll' targeting 'x64' is not compatible with the project target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.Controllers.dll' targeting 'AMD64' is not compatible with the project target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.Controllers.dll' targeting 'x64' is not compatible with the project target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.DataDefModel.dll' targeting 'AMD64' is not compatible with the project target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.DataDefModel.dll' targeting 'x64' is not compatible with the project target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.CubeDefModel.dll' targeting 'AMD64' is not compatible with the project target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.CubeDefModel.dll' targeting 'x64' is not compatible with the project target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.ClientDoc.dll' targeting 'AMD64' is not compatible with the project target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.ClientDoc.dll' targeting 'x64' is not compatible with the project target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.CommLayer.dll' targeting 'AMD64' is not compatible with the project target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.CommLayer.dll' targeting 'x64' is not compatible with the project target platform 'x86'

Я попытался явно настроить конфигурацию для проектов как для x86, так и для x64 без каких-либо изменений.

Может ли кто-нибудь вести меня по правильному пути?

Изменить - добавлен снимок экрана, показывающий, что я не могу выбрать платформу для проекта установки.

enter image description here

4b9b3361

Ответ 1

Вы должны отметить проект установки как 64-разрядный установщик. Свойство проекта TargetPlatform проекта Setup в окне "Свойства" измените его с x86 (по умолчанию) на x64.
Также убедитесь, что вы развертываете 64-битную версию log4net и что ваш проект С# project TargetPlatform - это любой процессор.
И убедитесь, что вам действительно нужно, чтобы ваше приложение запускалось как 64-битный процесс, что редко.

Ответ 2

  • Откройте "Deployment.vdproj" в "Блокноте".
  • Найти строку "TargetPlatform" = "3: 0"
  • Перейдите в "TargetPlatform" = "3: 1" для AMD64 или "TargetPlatform" = "3: 2" для Itanium.
  • Сохранить Deployment.vdproj. В Visual Studio вы не видите никаких изменений, но ваш проект теперь AMD64.

Ответ 3

  • Откройте проект развертывания.
  • В обозревателе решений выберите проект развертывания.
  • В окне "Свойства" выберите свойство TargetPlatform.
  • Выберите либо Itanium для 64-разрядной платформы Intel Itanium, либо x64 для любой другой 64-разрядной платформы (например, наборы команд AMD64 и EM64T).
  • Во время установки будет поднята ошибка, и установка будет остановлена, если целевой компьютер несовместим с указанной платформой.

Ответ 4

  • Откройте проект развертывания.
  • В обозревателе решений выберите проект развертывания.
  • В окне "Свойства" выберите свойство TargetPlatform.
  • Выберите либо Itanium для 64-разрядной платформы Intel Itanium, либо x64 для любой другой 64-разрядной платформы (например, наборы команд AMD64 и EM64T).

Во время установки будет поднята ошибка, и установка будет остановлена, если целевой компьютер несовместим с указанной платформой.

Ответ 5

Возможно, вам понадобится установленная служба Windows x64 (думаю, PowerShell), которая должна быть связана с приложением x86. Ваш ответ (свойства/TargetPlatform) заставил меня преодолеть этот барьер.