Error 1001 Exception occurred while initializing the installation. System.BadImageFormatException

Предыдущий Следующий

Не устанавливается windows service, пишет ошибку:

Error 1001 Exception occurred while initializing the installation. System.BadImageFormatException: Could not load file or assembly or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.


Долго с ней парился, пока на одном из сайтов не нашел решение:

  1. Click on the installer project, then go to Project>Properties.
  2. Click on the Prerequisites button
  3. Check the “Microsoft .NET Framework 4 (x86 and x64)” box and uncheck the previous version of the framework
  4. Hit ok on the Prerequisites window and on the the properties window.
  5. Right click on the installer project and go to View>Launch Conditions
  6. Highlight the .NET Framework condition and update the following fields in the properties box
    a. InstallURL : http://msdn.microsoft.com/en-us/netframework/aa569263.aspx
    b. Version: .NET Framework 4
  7. Rebuild the installer


Комментариев пока нету
Самостоятельный отпуск Опыт заказа вывоза мусора в Киеве